Exercise
Transcrição
Exercise
1 Serviço Nacional de Aprendizagem Industrial de Santa Catarina SENAI - Unidade São José Curso: Programação Disciplina: Inglês Instrumental Professora: Denise de Mesquita Corrêa e-mail: [email protected] [email protected] English File Programação 2008/1 Student: ___________________________________________ 2 Exercise - Verb List - Computer A- Identify the equivalent in Portuguese. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. Infinitive to register to link to connect to break to decode to compile to control to crash to click to charge to copy to drag to drop to edit to download to execute to instruct to get to interrupt to go to have to justify to know to lose to make to log to monitor to operate to output to send to paste to post to program to process to record to write Meaning 3 Exercise - Verb List A- Complete the list below. PRESENT PAST SIMPLE access accessed broke build PAST PARTICIPLE broken built apply applied catch caught drew address addressed compiled call crash delete made deleted downloaded took infect taken infected got programmed think switch gone knew made get fallen crashed went download compiled called fell know drawn programmed thought switched MEANING 4 Exercise - Verb Tenses The verb itself changes according to the tense. For example: Present Past Future I TYPE I TYPED I WILL TYPE A- Decide whether the sentence is written in the past, present or future tense. 1. A motherboard is best described as the main circuit system. 2. I will explain the meaning of programming. 3. Antivirus software usually works by checking a file for certain patterns of binary code. 4. Most good antivirus software will update these files automatically. 5. Imagine you bought an antivirus protection. 6. The antivirus software scanned all the attachments. 7. A Worm refers to a virus that can replicate. 8. A virus is basically a malicious computer program. 9. If you had 16 color selected your work would be easier. 10. Reboot the machine and see if it works. 11. A message will appear telling you the defragment percentage of your drive 12. You saved and deleted files on your computer last week. 13. Errors occur when file clusters are lost 14. This will keep your hard drive healthy and prevent crashes. 5 Exercise – Adjectives A- Complete the table. Adjective 1- dark 2- cheap 3- old 4- new 5- light 6- easy 7- bad 8- big 9- short 10- good 11- expensive 12- dangerous 13- difficult 14- special 15- small 16- long 17- careful 18- high 19- low 20- important 21- heavy 22- wide 23- slow 24- fast 25- powerful 26- successful 27- far 28- satisfactory 29- modern 30- hot 31- cold 32- innovative 33- leading 34- current 35- bright Meaning 6 Grammar Reference Adjective – Comparative and Superlative Adjective Comparative Superlative 1. small smaller smallest 2. wise wiser wisest 3. big bigger biggest stronger strongest 5. easy easier easiest 6. heavy heavier heaviest 7. dangerous more/less dangerous most/least dangerous 8. important more/less important most/least important more/less careful most/least careful more/less powerful most/least powerful more/less leading most/least leading more/less expensive most/least expensive 4. strong 9. careful 10. powerful 11. leading 12. expensive Exceptions: 13. good better best 14. bad worse worst 15. far farther/further farthest/furthest 7 Exercise - Comparative and Superlative Adjectives A- Identify the comparative or superlative adjective in each sentence and after, translate the following sentences. 1. As these viruses/worms become ever more advanced, the need for antivirus software has never been so great. 2. The internet is an excellent tool, and no doubt has changed the way most people communicate. 3. Good antivirus software will automatically check any files, but the best will detect everything which is wrong about your computer. 4. A motherboard is best described as the main circuit system. 5. Run more updated Scandisk weekly and defrag monthly. 6. This monitor is brighter. 7. Defrag arranges these scattered files in continuous blocks again, making it easier for your computer to retrieve the file next time. 8. Scandisk is a utility program included in DOS 6.0 or higher. 8 Vocabulary - Linking Expressions 1- Besides- além disso/de 2- Furthermore - além disso/de 3- Moreover - além disso/de 4- In addition- além disso/de 5- In the meantime – enquanto isso 6- Meanwhile - enquanto isso 7- At first - inicialmente 8- First - inicialmente 9- In the beginning - inicialmente 10- Actually – na verdade/de fato 11- In fact - na verdade/de fato 12- In truth - na verdade/de fato 13- As a matter of fact - na verdade 14- Indeed - na verdade/de fato 15- Otherwise - senão 16- Or else - senão 17- However - entretanto 18- Although - embora 19- Though - embora 20- On the other hand – por outro lado 21- On the contrary – do contrário 22- By the way– a propósito/mudando de assunto 23- Nevertheless - contudo 24- In spite of- apesar de/a despeito de 25- Despite - apesar de/a despeito de 26- Unless – a menos que 27- So as to - de maneira a/de modo a 28- So that - de maneira a/de modo a 29- In this way – desse modo 30- Likewise – da mesma forma 31- As a result - conseqüentemente 32- Consequently - conseqüentemente 33- Hence - conseqüentemente 34- Thus - então 35- Therefore - então 36- Because - porque/por causa de 37- As- porque/por causa de/como 38- Due to – devido a 39- Since – desde que/já que 40- Then – então/depois 41- After that - então/depois 42- At least – pelo menos 43- At last - finalmente 44- It seems that – me parece que 45- To my mind- eu acho/penso 46- In my point of view- eu acho 47- From what I understand - eu acho 48- As far as I know - eu acho/penso 49- On second thoughts – pensando melhor 50- ... I mean... – ou seja/isto é 51- That is - ou seja/isto é 52- According to – de acordo com 53- Accordingly - de acordo com 54- Instead of – ao invés de 55- Concerning – em relação à 56- In this regard - em relação à 57- To sum up - resumindo 58- In short - resumindo 59- On the whole - resumindo 60- Finally - finalmente 61- Concluding - concluindo 62- To end - concluindo 63- For instance – por exemplo 64- For example - por exemplo 65- And so on - e assim por diante 9 Exercise - Check Your English A- Identify the equivalent in Portuguese. 1- Case. a) janela 2- Machine. a) martelo 3- Printer. a) impressora 4- Keyboard. a) tela 5- Board. a) lápis b) porta c) CPU d) parede b) quadro c) prego d) máquina b) computador b) telefone c) conversor c) teclado d) microfone d) gravador b) caneta c) borracha d) borda 6- File. a) fila b) régua c) arquivo d) impressora 7- Address. a) endereço b) colega c) gerente d) presidente 8- Schedule. a) viagem b) bagagem c) horário d) roteiro 9- Data. a) data b) dados c) dado d) datas 10- key. a) semana b) tecla c) impressora d) praia 11- Mail. a) carta b) envelope c) caneta 12- Network. a) rede b) impressora c) tela d) correspondência d) régua 9 10 Vocabulary – Computers 1 A- Match the vocabulary and its definitions. 1. Assembly language 2. Cell 3. Embed 4. GB 5. Hang 6. Hub 7. Input device 8. Jam 9. Logic error 10. Loudspeaker 11. Machine code 12. Menu bar 13. Operating system 14. Peripheral 15. Plotter 16. Scroll 17. Server 18. Topology 19. Virus 20. Wide area network ( ) Suddenly and unexpectedly to stop processing during the execution of a program. ( ) To get stuck in one position. ( ) An electronic device at the center of a star network topology. ( ) To insert an object inside another object. ( ) An output device used to output drawings onto paper. ( ) The set of programs that control the basic functions of a computer. ( ) A piece of equipment that is connected to the central processing unit of a computer system. ( ) A programming mistake caused by the use of a sequence of instructions that are not logical. ( ) A row of icons on a display screen that open up menus when selected. ( ) A computer language that consists entirely of a combination of 1s and 0s. ( ) A main computer that provides a service on a network. ( ) To move displayed information smoothly, either horizontally or vertically, on the screen. ( ) The physical layout of a network. ( ) A program written deliberately to damage data or cause a computer to behave in an unusual way. ( ) Computers connected together over a large distance. ( ) A low-level computer language that uses mnemonics rather than only numbers, making it easier than , machine code for humans to read and write. ( ) The rectangular box formed where a row and a column meet in a spreadsheet. ( ) A piece of equipment used for entering data or controlling a computer. ( ) Abbreviation for a gigabyte. ( ) A sound output device. 10 11 Vocabulary – Computers 2 A- Match the vocabulary and its definitions. 1. Algorithm 2. Automation 3. Back-up 4. Bit 5. Bug 6. Cell 7. Chip 8. Compiler 9. Data bank 10. Delay 11. Disk drive 12. Field 13. Host computer 14. Link 15. Loop 16. Main storage 17. Numeric code 18. Output 19. Overtime 20. Protocol 21. Queue 22. Scope 23. Skip 24. Tag 25. Update 26. Virus 27. Track ( ) Abreviação de binary digit (dígito binário). ( ) Armazenamento interno principal. ( ) Atualizar, modificar o arquivo-mestre com informação atualizada. ( ) Banco de dados. ( ) Computador que se encarrega das operações de um grupo de computadores ligados em uma rede. ( ) Convenção que determina como a informação será comunicada entre dois dispositivos e quando começar a parar o envio de informações. ( ) Cópia sobressalente necessária em caso de algum acidente. ( ) Dispositivo que capacita o computador a ler e imprimir dados em discos. ( ) É a intersecção de uma fileira ou coluna numa tabela. Célula. ( ) Erro ou mau funcionamento que se quer analisar. ( ) Estrutura de dados da qual os itens são removidos na mesma ordem que entraram; fila. ( ) Faixa de disco magnético disponível para um cabeçote de gravação ou leitura; trilha. ( ) Hora extraordinária. ( ) Identificação de um registro em fita magnética. ( ) Informações codificadas numericamente; código numérico. ( ) Instrução de opção no fim de uma sub-rotina, para retorno do programa ao ponto de partida, ligação. ( ) Num comando de banco de dados, cláusula que especifica uma série de registros a serem endereçados pelo comando. ( ) Num registro, área específica usada para uma categoria determinada de dados. ( ) Peça retangular ou quadrada de silício na qual são impressas várias camadas de um circuito integrado. ( ) Programa de computador que, automaticamente, se autocópia e infecta outros discos ou programas sem que o usuário se aperceba disso. ( ) Programas usados para traduzir os problemas-fontes escritos em determinada linguagem de alto nível para linguagem de máquina ou assembler. ( ) Resultado ou informação transmitida para um dispositivo de saída. ( ) Salto; função de perfuradora de cartões ou de fita, equivalente à função tabular em máquina de escrever. ( ) Seqüência de instruções que é executada repetidamente até que outra condição prevaleça. ( ) Tempo despendido entre o término da confecção de um relatório e sua real possibilidade de utilização; retardo. ( )Método pelo qual máquinas são controladas por um computador a fim de executar. operações prédeterminadas em seqüência, ou determinadas por operações ou condições precedentes. ( )Série de instruções relativas à solução de um problema específico. 11 12 Vocabulary – Computers 3 A- Match the words and their definitions. Put the equivalent numbers in the parentheses below. 1. 2. 3. 4. 5. 6. 7. IBM Interface Internet Network Password Template Android 8. Bus 9. Compiler 10. Device 11. Download 12. Grid 13. Loop 14. Node ( ) A program which converts source programs into machine code. ( ) International business machine. ( ) A pre-shaped pattern used as a guide. ( ) A common boundary between two systems, devices, or programs. ( ) An informal shared public network linking UNIX and other computers world-wide using the internet protocol. ( ) Used for touch-screen and pen-based computers. ( ) A sequence of instructions that is repeated until a certain condition is reached. ( ) A system which connects up a number of computers and communications devices to enable messages and data to be passed between those devices. ( ) A method of security in which the user has to enter a unique character string before gaining access to a computer system. ( ) Either a point in a network where communications lines are interconnected, or where a workstation or a mainframe computer is attached. ( ) A mobile robot whose structure approximately resembles that of a human. ( ) A piece of hardware that is attached to a computer and is not part of the main central processor. ( ) Send programs or data from a central computer to a remote terminal or PC. ( ) A signal route within a computer to which several items may be connected so that signals may be passed between them. 12 13 Reading - The Internet 1 A- Match the addresses with the topics below. 12345( ( ( ( ( ( ( ( ( ( alt.algebra.help alt.asian-movies alt.comics.batman alt.education.disabled alt.fashion 6- alt.sport.soccer.european 7- alt.funny-jokes 8- rec.antiques.bottles 9- alt.food.wine 10- alt.music.world ) a football fan ) a student with math problems ) a collector who likes drinks ) a comic book collector ) a fan of Indian cinema ) someone interested in clothes ) a student who has a blind problem ) a singer ) a person who likes to laugh ) the owner of a restaurant The Internet 2 B - Match the internet pages with the topics. Write in the boxes below. 1- the latest scientific developments 2- caring for your cat 3- calculating your tax 4- new cars 5- advertising on the web 6- books on sport 7- sending a virtual greetings card 8- economic data on Bulgaria 9- your horoscope 10- ski conditions in Europe 1 2 3 4 a) b) c) d) e) f) g) h) i) j) 5 6 www.admarket.com www.bubble.com/webstars/ www.buildacard.com www.carlounge.com. www.encenter.com/ski/ www.petcat.co.uk www.moneyworld.co.uk www.newscientist.com/ www.thebookplace.com www.worldbank.org 7 8 9 10 13 Exercise A- Choose the odd word out in each group (1, 2, 3, etc.) 1. to find to watch complex to get 2. program fast board computer 3. virus besides moreover furthermore 4. happier more crowded smaller younger 5. data software hardware latest 6. back up scandisk peripheral practical 7. unplug disk computer tall 8. delete actually windows power 9. connection met program memory 10. running monitor screen keyboard B- Divide the following words in two groups. to develop – virus –scan – to get – file – to need – antivirus – to consider – program– to increase – load - to monitor – language – to convert – to process – machine – to design - object Group 1 - Verbs Group 2 – Non-verbs 15 Vocabulary - Computer Terms 4 A- Identify the vocabulary in Portuguese. Alternate Application Bold Clock Code Connection Control Delete Error Escape Explorer Font Function Insert Keyboard Loading Maintenance Motherboard Page down Page up Power Running Screen Shift Shut down Space bar Start Tabulation Toolbar Variables Virus 15 16 Vocabulary - Computer Terms 5 A- Match the sentences below and their equivalent. 1. power 2. energy 3. electricity 4. electrocution 5. current 6. static 7. appliance 8. device 9. machine 10. engine 11. controls 12. control panel 13. button 14. switch 15. dial 16. technician 17. broken 18. fixed / repaired 19. damage ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ) motor ) interruptor ) painel de controle ) técnico ) fixo/reparado ) botão ) eletrocutar ) máquina ) quebrado ) dispositivo ) controles ) discar ) estática ) dano ) poder/potência ) corrente ) dispositivo ) eletricidade ) energia B- Complete the translation of the following sentences. How do you use this device? Como você usa este ___________________________________? I'm trying to figure out how to use this machine. Estou tentando ____________________________ como se usa essa ____________________. The lights are off. As luzes estão ___________________________________ The engine is on. O motor está ___________________________________ The power is off. A ___________________________ está desligada. Plug in the cord. __________________________ no cordão Plug it in. ____________________________ The power is out. A ____________________________ está desligada. It's broke. Can you fix it? Está ___________________________________. Você pode reparar? That machine is out of order. We need to get it repaired. Aquela máquina está ___________________________________. Nós precisamos consertá-la. 16 17 Vocabulary - Computer Terms 6 A- Match the vocabulary below and their equivalent. 1- Rewind 2- button 3- Controls 4- push 5-switch 6- press 7- pause 8- play 9- control panel 10- fast forward 11- fix 12- repair 13- break 14- damage 15- dial 16- pull ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ) empurrar ) quebrar ) avançar ) controles ) pausar ) painel de controle ) discar ) desempenhar ) dano ) pressionar ) consertar ) puxar ) botão ) voltar ) reparar ) interruptor B- Match the vocabulary below and their definitions. 12345- Access Circuit braker Matrix Logarithm Object code 6- Virtual reality 7- Storage device 8- Record 9- Font 10- Rank ( ) All the features of text on screen or on a page. ( ) a computer program that has been translated into machine code and can be executed by the computer ( ) a piece of equipment such as tape or disks, etc. which can hold computer data ( ) a switch that controls the flow of an electric current. ( ) to store data or information in permanent form on disk or magnetic tape ( ) an arrangement of items such as numbers and other data in rows and columns ( ) to use a computer system or part of it in order to look at or to record or change (write) data ( ) an environment created by a computer that a person can experience by wearing special equipment ( ) to put something in a particular order, especially according to importance or size ( ) any of a series of numbers that can represent another number in order to make it easier to do a difficult multiplication or division sum 17 18 Exercise A- Choose the odd word out. programming search vacation coding sun language debugging program source file record newspaper routines navigation search software setting applications document system internet hardware fashion viruses network wake up link algorithm byte flowers cell chip data keyboard paper process host subject input machine B- Choose the best option according to their equivalents. a. The discipline differs from many other technical professions. b. There is an ongoing debate. c. Computer programming is the process of writing, testing, and maintaining the source code of computer programs. d. The programming language used in writing programs e. A program may be written or modified. f. Different parts of a program can be written in different languages. g. A personal computer (PC) is a computer whose original sales price, size, and capabilities make it useful for individuals. h. A keyboard is a peripheral partially modeled. • • • • • • • • Há um debate acontecendo. A linguagem de programação usada para escrever programas. Um teclado é um periférico parcialmente modelado. Programação é o processo de escrita, teste e manutenção de um programa de computador. Diferentes partes de um programa podem ser escritas em diferentes linguagens. Um computador pessoal é um computador de pequeno porte e baixo custo, que se destina ao uso pessoal (ou para uso de um pequeno grupo de indivíduos). A disciplina difere de muitas outras. Um programa pode ser escrito ou modificado. 18 19 Exercise A- Choose the odd word out. Fortran Pascal Basic Stapler CPU engine scanner Shift tape source space tabulation tag spreadsheet tree update memory paging output magazine loop rain mainframe modem nice load storage printer B- Divide the following words in two groups. Understands - mechanism - called – device - board - controlled - keywords – compiler - machine - convert – operation – unplug – user Verbs pirated - need - Computer vocabulary C- Match the sentences below and their equivalent. 1. How do you use this device? 2. I'm trying to figure out how to use this machine. 3. The power is off. 4. John used to type with me. 5. Could you program this? 6. The image is a little out of focus. 7. The lights are off. Plug it in. 8. The power is out. 9. It's broke. Can you fix it? 10. My computer always breaks down at the worst time. 11. Shut down the computer. 12. Plug in the cord. 13. The computer is on. ( ) Desligue o computador. ( ) Ligue o fio. ( ) A potência está desligada. ( ) Estou tentando avaliar como se usa essa máquina. ( ) Está quebrado. Você pode reparar? ( ) A potência está desligada. ( ) Meu computador sempre quebra na pior hora. ( ) John digitava comigo. ( ) A imagem está um pouco fora de foco. ( ) O computador está ligado. ( ) As luzes estão apagadas. Acenda. ( ) Como você usa este dispositivo? ( ) Você poderia programar isto? 19 20 Exercise A – Identify if the sentences are in the Present, Past or Future. 1. I’m typing a report tonight. 2. This program does not work well. 3. I didn’t know how to use the computer before. 4. I will not use the computer tomorrow. 5. Did you get to the internet yesterday? 6. I will program later. 7. My brother uses this program easily. 8. He scanned that document again. 9. My best friend access the internet every day. 10. Will you update this program? B- Match the sentences/words below and their equivalent. Processador – compilador - energia – velocidade - binário - sem fio – rodar muitos aplicativos - rápido – entregar – economia de energia deliver power wireless energy-saving speed processor fast to run many applications compiler binary 20 21 Reading – Computer Program A- Complete the text with the words that follow. execute - design - computer program - fail - bugs In practical terms, a ________________________might include anywhere from a dozen instructions to many millions of instructions for something like a word processor or a web browser. A typical modern computer can _____________billions of instructions every second and nearly never make a mistake over years of operation. Large computer programs may take teams of computer programmers’ years to write and the probability of the entire program having been written completely in the manner intended is unlikely. Errors in computer programs are called______________. Sometimes bugs are benign and do not affect the usefulness of the program, in other cases they might cause the program to completely __________(crash), in yet other cases there may be subtle problems. Sometimes otherwise benign bugs may be used for malicious intent, creating a security exploit. Bugs are usually not the fault of the computer. Since computers merely execute the instructions they are given, bugs are nearly always the result of programmer error or an oversight made in the program's________________. B- Make a circle around the linking expressions in the texts that follow. Controlling front-end electronics boards using commercial solutions Summary:LHCb is a dedicated B-physics experiment under construction at CERN's large hadron collider (LHC) accelerator. This paper will first describe the novel approach LHCb is taking toward controlling and monitoring of electronics boards. Instead of using the bus in a crate to exercise control over the boards, we use credit-card sized personal computers (CCPCs) connected via Ethernet to cheap control PCs. After that the CCPCs will provide a simple parallel, I2C, and JTAG buses toward the electronics board. Each board will be equipped with a CCPC and, hence, will be completely independently controlled. The advantages of this scheme versus the traditional bus-based scheme will be described. Also, the integration of the controls of the electronics boards into a commercial supervisory control and data acquisition (SCADA) system will be shown Source: http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/23/21671/01003779.pdf Powerful computers capable of translating documents from one language into another have recently been developed in Japan. The process of machine translation is complex. To translate a document from English into Japanese, for example, the computer first analyses an English sentence, determining its grammatical structure. Next, the words are translated by an EnglishJapanese dictionary. After that, another part of the computer program analyses the resulting group of words and meanings and produces an intelligible sentence based on the rules of Japanese syntax. Finally, the computer-produced translation is polished by a human bilingual editor. 21 22 Exercise A- Match the titles and the texts: 1- What is the Apple iPhone? 3- How HD Radio Works 5- Telecommunications 2- How Municipal WiFi Works 4- Skype vs. Vonage Telecommunications devices, including cell phones, satellite radio or Voice over IP, connect us to one another and to the world of information at our fingertips. Learn all about the technologies we depend upon for efficient communication in this section of HowStuffWorks. Title ___________________________ The Apple iPhone exceeds Mac lovers' lofty expectations. Learn about the iPhone and why this iPod, phone, and internet communicator could change an industry. Title ___________________________ A new radio format is set to add features to your radio listening experience: HD Radio. Learn how it works. Title ___________________________ Explore how both Skype and Vonage work and learn if one of them is right for you. Title ___________________________ Learn about the amazing things that these networks can do -- besides potentially providing free or cheap Internet access, about the technology behind them and why "Municipal WiFi" can be a misnomer. Title ___________________________ B- Identify the equivalent in English, according to the texts above. 12345- ...estas redes podem fazer... ________________________________________ ... adicionar dispositivos ...__________________________________________ ... que nós dependemos... __________________________________________ ... na ponta dos nosso dedos..._______________________________________ ... poderia alterar ... _______________________________________________ C- Identify the following vocabulary in the texts above. 12345- grátis – funciona – dispositivo barato – mundo - D- Translate the following sentence: Learn all about the technologies we depend upon for efficient communication in this section of HowStuffWorks. 22 23 Programming – Vocabulary 7 Word Groups - What group do the words belong to? Group 1 – Computer/ Programming draw adapter document work cables operate circuit algorithm process input device print software output device Group 2 – Verbs plug language think power compiler play slot mean switch system board insert get wire 23 24 Exercise - Vocabulary 8 A- Match the columns. Opposites. 1. Correct 2. Finish 3. Lock 4. Inside 5. Direct 6. Chargeable 7. Software 8. Open 9. Pull 10. Simple 11. Incompatible 12. Backward 13. Delete 14. Continue 15. Input 16. Able 17. Formatted 18. Connect 19. Load 20. Simple 21. Transmit 22. Deactivate 23. Flexible ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ) Complicated ) Outside ) Push ) Unlock ) Disconnect ) Complex ) Unload ) Restore ) Incorrect ) Interrupt ) Unformatted ) Activate ) Hardware ) Indirect ) Close ) Rigid ) Receive ) Start ) Disable ) Compatible ) Dischargeable ) Forward ) Output B- Match the words to the right title. Insert the equivalent numbers. ProgrammingNon-programming- 1- System 2- Words 3- Source 4- Input 5- Scissors 6- Board 7- Memory 8- Portrait 9- Delay 10- Bags 11- Output 12- Device 13- Data 14- Leaf 15- Storage 16- Processing 17- Ship 18- Conductors 19- Picture 20- Class 24 Exercise - Vocabulary 9 A- Match the columns. 1- ESC 2- WWW 3- I/O 4- RAM 5- Internet 6- CPU 7- ROM 8- DEL 9- IT 10- CAD 11- HTML 12- LAN 13- WAN B- Vocabulary - Programming 1. if 2. include 3. main 4. print 5. scan 6. minimum 7. screen 8. locate 9. color 10. input 11. go to 12. to 13. average 14. enter 15. float 16. null 17. for 18. return 19. else 20. def Central Processing Unit Wide area network Local area network Computer Aided Device Hypertext Markup Language Random Access Memory Escape Input/Output International network Information Technology Delete World Wide Web Read Only Memory 26 Reading – Computers A computer is a machine for manipulating data according to a list of instructions. Computers take numerous physical forms. Early electronic computers were the size of a large room, consuming as much power as several hundred modern personal computers. Today, computers can be made small enough to fit into a wrist watch and be powered from a watch battery. Society has come to recognize personal computers and their portable equivalent, the laptop computer, as icons of the information age; they are what most people think of as "a computer". However, the most common form of computer in use today is by far the embedded computer. Embedded computers are small, simple devices that are often used to control other devices—for example, they may be found in machines ranging from fighter aircraft to industrial robots, digital cameras, and even children's toys. A computer is a wristwatch. The ability to store and execute programs makes computers extremely versatile and distinguishes them from calculators. The Church–Turing thesis is a mathematical statement of this versatility: Any computer with a certain minimum capability is, in principle, capable of performing the same tasks that any other computer can perform. Therefore, computers with capability and complexity ranging from that of a personal digital assistant to a supercomputer are all able to perform the same computational tasks as long as time and storage capacity are not considerations. How computers work A general purpose computer has four main sections: the arithmetic and logic unit (ALU), the control unit, the memory, and the input and output devices (collectively termed I/O). These parts are interconnected by busses, often made of groups of wires. The control unit, ALU, registers, and basic I/O (and often other hardware closely linked with these) are collectively known as a central processing unit (CPU). Early CPUs were comprised of many separate components but since the mid-1970s CPUs have typically been constructed on a single integrated circuit called a microprocessor. Source: http://en.wikipedia.org/wiki/Main_Page 26 27 Computer program A computer program is a collection of instructions that describe a task, or set of tasks, to be carried out by a computer. The term computer program may refer to source code, written in a programming language, or to the executable form of this code. Computer programs are also known as software, applications programs, system software or simply programs. The source code of most computer programs consists of a list of instructions that explicitly implement an algorithm (known as an imperative programming style); in another form (known as declarative programming) the characteristics of the required information are specified and the method used to obtain the results, if any, is left to the platform. Computer programs are often written by people known as computer programmers, but may also be generated by other programs. Terminology Commercial computer programs aimed at end-users are commonly referred to as application software by the computer industry, as these programs are focused on the functionality of what the computer is being used for (its application), as opposed to being focused on system-level functionality (for example, as the Windows operating system software is). In practice, colloquially, both application software and system software may correctly be referred to as programs, as may be the more esoteric firmware—software firmly built into an embedded system. Programs that execute on the hardware are a set of instructions in a format understandable by the instruction set of the computer's main processor, which cause specific other instructions to execute or perform a simple computation like addition. But computers process millions of such per second and that is the program, the sequence of instructions strung together such that when executed, they do something useful, and usually repeatable and reliable. Program execution A computer program is loaded into memory (usually by the operating system) and then executed ("run"), instruction by instruction, until termination, either with success or through software or hardware error. Before a computer can execute any sort of program (including the operating system, itself a program) the computer hardware must be initialized. This initialization is done in modern PCs by a piece of software stored on programmable memory chips installed by the manufacturer, called the BIOS. The BIOS will attempt to initialize the boot sequence, making the computer ready for higherlevel program execution. 27 28 Programs vs. data The executable form of a program (that is, usually object code) is often treated as being different from the data the program operates on. In some cases this distinction is blurred with programs creating, or modifying, data, which is subsequently executed as part of the same program (this is a common occurrence for programs written in Lisp). Programming A program is likely to contain a variety of data structures and a variety of different algorithms to operate on them. Creating a computer program is the iterative process of writing new source code or modifying existing source code, followed by testing, analyzing and refining this code. A person who practices this skill is referred to as a computer programmer or software developer. The sometimes lengthy process of computer programming is now referred to as "software development" or software engineering. The latter becoming more popular due to the increasing maturity of the discipline. Two other forms of modern day approaches are team programming where each member of the group has equal say in the development process except for one person who guides the group through discrepancies. These groups tend to be around 10 people to keep the group manageable. The second form is referred to as "peer programming" or pair programming. Programming languages Programming languages provide various ways of specifying programs for computers to run. Unlike natural languages, programming languages are designed to permit no ambiguity and to be concise. They are purely written languages and are often difficult to read aloud. They are generally either translated into machine language by a compiler or an assembler before being run, or translated directly at run time by an interpreter. Sometimes programs are executed by a hybrid method of the two techniques. There are thousands of different programming languages—some intended to be general purpose, others useful only for highly specialized applications. Computer programming Computer programming (often shortened to programming or coding) is the process of writing, testing, and maintaining the source code of computer programs. The source code is written in a programming language. This code may be a modification of existing source or something completely new. The process of writing source code requires expertise in many different subjects, including knowledge of the application domain and algorithms to implement the desired behavior. Within software engineering, programming (the implementation) is regarded as one phase in a software development process. In some specialist applications or extreme situations a program may be written or modified (known as patching) by directly storing the numeric values of the machine code instructions to be executed into memory. There is an ongoing debate on the extent to which the writing of programs is an art, a craft or an engineering discipline. Another ongoing debate is the extent to which the programming language used in writing programs affects the form that the final program takes. This debate is analogous to that surrounding the Sapir Whorf hypothesis in linguistics. Source: http://en.wikipedia.org/wiki/Main_Page 28 29 Programming language A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like natural languages, are defined by syntactic and semantic rules which describe their structure and meaning respectively. Many programming languages have some form of written specification of their syntax and semantics; some are defined only by an official implementation. Programming languages are used to facilitate communication about the task of organizing and manipulating information, and to express algorithms precisely. Some authors restrict the term "programming language" to those languages that can express all possible algorithms; sometimes the term "computer language" is used for more limited artificial languages. Thousands of different programming languages have been created, and new languages are created every year. Definitions Traits often considered important for constituting a programming language: • Function: A programming language is a language used to write computer programs, which involve a computer performing some kind of computation[ or algorithm and possibly control external devices such as printers, robots, and so on. • Target: Programming languages differ from natural languages in that natural languages are only used for interaction between people, while programming languages also allow humans to communicate instructions to machines. Some programming languages are used by one device to control another. For example PostScript programs are frequently created by another program to control a computer printer or display. • Constructs: Programming languages may contain constructs for defining and manipulating data structures or controlling the flow of execution. • Expressive power: The theory of computation classifies languages by the computations they can express (see Chomsky hierarchy). All Turing complete languages can implement the same set of algorithms. ANSI/ISO SQL and Charity are examples of languages that are not Turing complete yet often called programming languages. Non-computational languages, such as markup languages like HTML or formal grammars like BNF, are usually not considered programming languages. Often a programming language is embedded in the non-computational (host) language. Purpose A prominent purpose of programming languages is to provide instructions to a computer. As such, programming languages differ from most other forms of human expression in that they require a greater degree of precision and completeness. When using a natural language to communicate with other people, human authors and speakers can be ambiguous and make small errors, and still expect their intent to be understood. However, computers do exactly what they are told to do, and cannot understand the code the programmer "intended" to write. The combination of the language 29 30 definition, the program, and the program's inputs must fully specify the external behavior that occurs when the program is executed. Many languages have been designed from scratch, altered to meet new needs, combined with other languages, and eventually fallen into disuse. Although there have been attempts to design one "universal" computer language that serves all purposes, all of them have failed to be accepted in this role. The need for diverse computer languages arises from the diversity of contexts in which languages are used: • • • • • Programs range from tiny scripts written by individual hobbyists to huge systems written by hundreds of programmers. Programmers range in expertise from novices who need simplicity above all else, to experts who may be comfortable with considerable complexity. Programs must balance speed, size, and simplicity on systems ranging from microcontrollers to supercomputers. Programs may be written once and not change for generations, or they may undergo nearly constant modification. Finally, programmers may simply differ in their tastes: they may be accustomed to discussing problems and expressing them in a particular language. One common trend in the development of programming languages has been to add more ability to solve problems using a higher level of abstraction. The earliest programming languages were tied very closely to the underlying hardware of the computer. As new programming languages have developed, features have been added that let programmers express ideas that are more removed from simple translation into underlying hardware instructions. Because programmers are less tied to the needs of the computer, their programs can do more computing with less effort from the programmer. This lets them write more programs in the same amount of time. Natural language processors have been proposed as a way to eliminate the need for a specialized language for programming. However, this goal remains distant and its benefits are open to debate. Edsger Dijkstra took the position that the use of a formal language is essential to prevent the introduction of meaningless constructs, and dismissed natural language programming as "foolish."[10] Alan Perlis was similarly dismissive of the idea. Source: http://en.wikipedia.org/wiki/Programming_language 30 31 Types of Programming 1. Logic Programming: Logical Programming languages operate on facts and relationships from which they can draw a coherent and simple conclusion. 2. Functional Programming: Functional programming languages are more closely related to the mathematical concept of `function' than imperative programming languages. This makes it easier to apply program-proving techniques and logical reasoning to functional programs. In particular, functional programs do not use the concept of variables in the traditional sense, i.e. a memory location whose contents might be changed from time to time as a program executes. 3. Imperative Programming: Imperative programming is associated with languages like C, Fortran, Pascal etc. Imperative programming is distinguished from functional programming in that the former is strongly tied to the concept of variables and memory locations. A variable is associated with a memory location and the contents of that memory location may be changed, via the variable, over the course of time. The meaning or effect of a program fragment at a particular point can only be understood by reference to the current contents of the set of relevant variables, therefore. In contrast, functional programs do not allow the contents of a variable to be changed once set (in simplified terms), hence making them easier to reason about. While languages such as C++ and Java are also imperative programming languages, strictly speaking, they are more commonly referred to as object-oriented programming languages. 4. Concurrent Programming: Concurrent programming is characterized by programming with more than one process. The main advantage of concurrent programming is that operations can run parallel in it, thus they are much faster than sequential operations. Basically, concurrent programming uses processes and communication to design elegant, responsive and reliable systems. 5. Object-Oriented Programming: Object oriented programming is the method of implementing programs which are organized as cooperative collections of objects, and each of which represents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships. In these types of programs, classes are generally viewed as static, whereas objects typically have a much more dynamic nature, which is encouraged by the existence of polymorphism. Source: http://en.wikipedia.org/ 31 32 Parse tree A parse tree or concrete syntax tree is a tree that represents the syntactic structure of a string according to some formal grammar. In a parse tree, the interior nodes are labelled by nonterminals of the grammar, while the leaf nodes are labelled by terminals of the grammar. A program that produces such trees is called a parser. Parse trees may be generated for sentences in natural languages (see natural language processing), as well as during processing of computer languages, such as programming languages. Parse trees are distinct from abstract syntax trees (also known simply as syntax trees) which are a related concept in compilers. Basic description A parse tree is made up of nodes and branches. Below is a linguistic parse tree, here representing the English sentence "John hit the ball". (Note: this is only one possible parse tree for this sentence; different kinds of linguistic parse trees exist.) The parse tree is the entire structure, starting from S and ending in each of the leaf nodes (John, hit, the, ball). A simple parse tree In a parse tree, each node is either a root node, a branch node, or a leaf node. In the above example, S is a root node, NP and VP are branch nodes, while John, hit, the, and ball are all leaf nodes. A node can also be referred to as parent node or a child node. A parent node is one that has at least one other node linked by a branch under it. In the example, S is a parent of both NP and VP. A child node is one that has at least one node directly above it to which it is linked by a branch of the tree. Again from our example, hit is a child node of V. Elements Syntax 32 33 Parse tree of Python code with inset tokenization Syntax highlighting is often used to aid programmers in the recognition of elements of source code. The language you see here is Python A programming language's surface form is known as its syntax. Most programming languages are purely textual; they use sequences of text including words, numbers, and punctuation, much like written natural languages. On the other hand, there are some programming languages which are more graphical in nature, using spatial relationships between symbols to specify a program. The syntax of a language describes the possible combinations of symbols that form a syntactically correct program. The meaning given to a combination of symbols is handled by semantics. Since most languages are textual, this article discusses textual syntax. Programming language syntax is usually defined using a combination of regular expressions (for lexical structure) and Backus-Naur Form (for grammatical structure). Below is a simple grammar, based on Lisp: expression ::= atom | list atom ::= number | symbol number ::= [+-]?['0'-'9']+ symbol ::= ['A'-'Z''a'-'z'].* list ::= '(' expression* ')' This grammar specifies the following: • • • • • an expression is either an atom or a list; an atom is either a number or a symbol; a number is an unbroken sequence of one or more decimal digits, optionally preceded by a plus or minus sign; a symbol is a letter followed by zero or more of any characters (excluding white space); and a list is a matched pair of parentheses, with zero or more expressions inside it. The following are examples of well-formed token sequences in this grammar: '12345', '()', '(a b c232 (1))' Not all syntactically correct programs are semantically correct. Many syntactically correct programs are nonetheless ill-formed, per the language's rules; and may (depending on the language 33 34 specification and the soundness of the implementation) result in an error on translation or execution. In some cases, such programs may exhibit undefined behavior. Even when a program is welldefined within a language, it may still have a meaning that is not intended by the person who wrote it. Using natural language as an example, it may not be possible to assign a meaning to a grammatically correct sentence or the sentence may be false: • • "Colorless green ideas sleep furiously." is grammatically well-formed but has no generally accepted meaning. "John is a married bachelor." is grammatically well-formed but expresses a meaning that cannot be true. The following C language fragment is syntactically correct, but performs an operation that is not semantically defined (because p is a null pointer, the operations p->real and p->im have no meaning): complex *p = NULL; complex abs_p = sqrt (p->real * p->real + p->im * p->im); The grammar needed to specify a programming language can be classified by its position in the Chomsky hierarchy. The syntax of most programming languages can be specified using a Type-2 grammar, i.e., they are context-free grammars. Source: http://en.wikipedia.org/wiki/elements 34 35 Exercise – Word Search - computers B L M S T A B J U M O N I T O R K X L S X L E T E K S I D S T N O F C F C A C H Q O D R R U W P N C O M P U T E R R Z O R R O O P F H Q Q A T F B C X F E Q I R O C M P P F G I S K R V T V W E W O N T S S M C L J B S K F Y Y A W N A M Q T C binary computer directory document floppy functions icons keyboard menu monitor printer scroll software video card R I U O F T C O N T R O L P A N E L E U U R P N Q C T A I O V O T S E R N G R T C P P K E O E O L N C I C E N T E F F M Y M W I O M Y G E I X I D D N Y A P A Y K U O L H R O V F P H S S E R R R J C A Q E B U W C I X V P T P M O O I E D E L S A Y A S R O F A Y C U M A N C I T A P boot control panel disk email floppy graphics interface links micro chip mouse programs server tool bar web page R E N B D E S R P C C E J T R R A W N S F G L D O W G I C O M D E Y E G J R Z I F K R I O A N T D I E R A C B O O T D D J A K D F G R K A U M L T H R E V R E S H R N G Z E Y D S S N O I T C N U F P P I I Y P P O L F I D R W E B P A G E P X W E M A I L P A Z Y C D R O M G X D Y A cd rom cursor display files font hard drive internet memory modem ports screen shortcut typing windows Source: http://freebies.about.com/library/words/qws021.htm Yes! It’s over! 35