1: why should you learn to write programs? Flashcards
Define CPU and its function
Central Processing Unit; the part of the computer that is built to be obsessed with asking you “what’s next”?
What does PDA stand for?
Personal Digital Assistant
Define main memory and its function
A location in the computer used to store information that the CPU needs in a hurry. It is nearly as fast as the CPU but the memory is stored only as long as the computer has an active power source
Define secondary memory and its function
This is another location to store memory for the CPU to use. Unlike main memory, this source is a lot slower but stores information even without a power source.
Define input and output devices along with their functions.
Parts which we use to interact with the computer and include such items as a screen, keyboard, mouse, microphone, speaker, or touchpad.
What is a program in relation to your computer?
A program is a set of instructions the programmer gives the computer in order to complete a specific tasks or series of tasks.
A sequence of python statements that have been programmed to do something.
What are reserved words?
These words each hold a very special and singular meaning in Python. One might consider them to be the “vocabulary” of the Python language.
What are variables?
Words that a programmer creates for the computer to understand. Additionally, the programmer gives a specific name and meaning to those words, but can never use any of Python’s reserved words for a name.
Name at least 10 reserved words.
And. Del. for. Is. Raise. Elif . From. Lambda. Return. Break. Else. Global. Not. Try. Class. Except. If. Or. While. Continue. Exec. Import. Pass. Yield. Def. Nally. In. Print.
Telling the computer to print is similar to….
Programming the computer to speak is called what in terms of a reserved word?
An instruction that prompts Python to display a value on the screen.
Define»_space;>
What do you want to do next human?
Name 2 ways to exit Python interactive.
quit ()
^Z
Python takes binary machine language (0101001) and transforms it into what is considered a high-level language.
Name at least 4 other high-level languages.
C++ Java PHP Ruby Basic Pearl JavaScript
Just to name a few…
Why is Python considered a high-level language?
Python takes machine-language and creates a secondary language in which humans can read, write and use for computers to read and process.
Why are high-level languages like Python so important to programmers?
Machine-language is specific for any given machine and therefor is not “portable” across different types of hardware. However, _______ languages like python or JavaScript act as translators to convert the programs to machine language so the CPU can execute the command.
What is an interpreter? Python is an example of an interpreter.
________ reads the source code of a program as written by the programmer, parses the source code and interprets the instructions.
Define the term parse.
To analyze (a sentence of code) into its parts and describe their syntactic roles.
What is the function of a compiler?
_______ takes the entire program in a file, and then runs a process to translate the high level source code into machine language. The ______ then places resulting machine language into a file for later execution.
What does .exe signify when it’s attached to the name of a file?
Executable
What does .dll signify when it’s attached to the end of a file?
Dynamically load-able library
What is a script?
A program draft that is written using a text editor to write instructions into a file. These types of files end with .py
Define sequential execution.
Perform statements one after another In the order they are encountered in the script.
Define conditional execution.
Check for certain conditions and execute or skip a sequence of statements.
Define repeated execution.
Perform some set of statements repeatedly, usually with some variation.
Define reuse.
Write a set of instructions once and give them a name and then reuse those instructions as needed throughout your program.
What are syntax errors?
A violation of the “grammar” rules of Python.
What are logic errors?
A mistake in the order of statements or how they relate to one another.
What are semantic errors?
A situation where your syntax and sequence is correct, BUT the program does not perform the task you intended it to do.
Define portability.
A property of a program that can run on more than one kind of computer.
What is a prompt?
When a program displays a message and pauses for the user to type some input to the program.