Chapter 1 - Introduction (Python)
What will print() create if entered into the console
" " (a blank space)
What are the two most important benefits of Python?
- Simple and easy to use - Portable between computer systems and various OSs -Easy to test in an interactive environment
What are the two types of storage?
-Primary -Secondary
function
A collection of programming instructions that carry out a particular task
terminal window
A place to execute a program
Integrated development environment
A place to write and test programs
text editor
A program that functions like a word processor to enter Python/coding instructions
run-time error
Any error that occurs when the program compiles and runs, but produces unexpected results
argument
Any value the function needs to carry out its task. Always enclosed in parentheses
What are computers good for?
For repetitive tasks
Who invented Python?
Guido van Possum in the early 1990s
high-level programming languages
Languages that allow a programmer to specify the desired program actions at a high level that are automatically translated into the more detailed instructions required by the CPU.
Primary storage
Made from memory chips to store data when supplied with electric power
logic error
Program runs, but does the wrong thing
Secondary storage (hard disk)
Provides slower and less expensive storage that persists without electricity.
compiler
Reads the file containing the source code and translates them into byte code
What does a hard disk consist of?
Rotating platters coated in a magnetic material and read/write heads, which can detect and change the magnetic flux on the platters.
What is an interpreter?
Something that reads a program and executes all of its steps
Central Processing Unit (CPU)
The "heart" of a computer that performs program control and data processing. Carries out arithmetic operations and fetches data from external memory.
hardware
The physical computer and peripheral devices
exception
When an instruction is syntactically correct, but is impossible to perform.
compile-time/syntax error(s)
When something is wrong based on the rules of the language.
comment
a piece of writing not to be executed by the machine. In python these are noted with "#"
virtual machine
a separate program that is similar to the CPU of a computer
string
a sequence of characters enclosed in quotation marks.
Network
an interconnected set of computers
statements
line of code (ex. print() )
How to print something in Python 3?
print("text")
folder/directory
something that can contain files as well as other folders/directories
Computer program
tells a computer a sequence of steps needed to fulfill a task
programming
the act of designing and implementing computer programs
source code
the instructions written by the programmer
Python shell
the interface for working in an interactive mode
software
the programs the computer executes
>>>
the prompt. (Indicates that you can enter instructions)
Where are data and programs saved on a computer?
the secondary storage. This is then loaded into memory when the program is started and modified data sent back to secondary storage.
byte code
very simple instructions that are understood by the virtual machine
How do you separate values in Python?
with commas