Lecture 2 - Recitation 1 Flashcards

1
Q

what are programs?

A

they are sequences of instructions loaded into the computer’s memory represented in binary numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is programming?

A

it is the set of instructions that a computer can understand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what are the components of the expressions?

A

operands, operators & functions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

is everything in python an object?

A

yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is an overloaded operator?

A

it is an operator that changes its behavior depending on the data type of the operands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is the comparison operation?

A

it is the comparison of operands using the logical operator symbols <, >, =, i=, ==

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is the operator of the boolean values?

A

AND, OR, NOT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the two variants of loops?

A

WHILE loop & FOR loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is the FOR loop?

A

its when you want to iterate on a finite set of elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the WHILE loop?

A

it executes as long as the condition is true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Check yourself: what is a type?

A

They are classifications of objects, which is what python deals with, and they determine how objects are dealt with.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Check yourself: what is an expression?

A

It is composed of objects or operands and operators and can be interpreted into a value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Check yourself: what is a type conversion?

A

a type conversion turns one type of object into another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Check yourself: What is a Keyword?

A

They are words that can have special meanings within a language. they are displayed in special colors and they cannot be used as variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Check yourself: What is the difference between a straight line program and a branching program?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Check yourself: What is a conditional?

A

they start with an If statement and can also include elif and else statements.