OLI Course Flashcards
What is computation?
a sequence of steps that can be executed by a computer
What is a computer’s instruction set?
The primitive instructions a computer knows how to execute
What is the SYNTAX of a programming language?
rules that determine what expressions are well-formed
What are semantics of a programming language?
associating meaning with expressions (?)
A LOW-LEVEL programming language is ____
closer to the instruction set of the computer
A HIGH-LEVEL programming language is closer to ___
natural language of humans
What is an interpreter?
a special program that converts high-level programming language instructions into low-level ones that can be executed by the computer
An interpreter combines what 2 phases?
- translation to machine language
- execution
What is imperative programming?
computation is described by a sequence of commands that change the state of data objects
What data type represents real numbers?
FLOAT
What data type contains a number with decimals?
FLOAT
How is the type STRING represented in Python?
single OR double quotes (use double for better transfer to other languages)
What type is returned by i / j (division) in Python?
ALWAYS A FLOAT
What is meant by 100 // 50 in Python - what is it called, and what does it return?
integer (floor) division
returns 2 - the quotient as an integer, ignoring any remainder
What is 50 // 100 in Python?
0 - the integer quotient, ignoring any remainder