Lecture 2 - Recitation 1 Flashcards
what are programs?
they are sequences of instructions loaded into the computer’s memory represented in binary numbers
What is programming?
it is the set of instructions that a computer can understand
what are the components of the expressions?
operands, operators & functions.
is everything in python an object?
yes.
what is an overloaded operator?
it is an operator that changes its behavior depending on the data type of the operands
what is the comparison operation?
it is the comparison of operands using the logical operator symbols <, >, =, i=, ==
what is the operator of the boolean values?
AND, OR, NOT
What are the two variants of loops?
WHILE loop & FOR loop
what is the FOR loop?
its when you want to iterate on a finite set of elements
What is the WHILE loop?
it executes as long as the condition is true
Check yourself: what is a type?
They are classifications of objects, which is what python deals with, and they determine how objects are dealt with.
Check yourself: what is an expression?
It is composed of objects or operands and operators and can be interpreted into a value.
Check yourself: what is a type conversion?
a type conversion turns one type of object into another.
Check yourself: What is a Keyword?
They are words that can have special meanings within a language. they are displayed in special colors and they cannot be used as variables.
Check yourself: What is the difference between a straight line program and a branching program?
straight line programs goes through one step only, a branching program will do more than one step depending on the conditions set within the program.