Lecture 2: Core elements of a program Flashcards

1
Q

What IDE stands for?

A

Integrated Development environment

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

What is the IDE of Python?

A

IDLE

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

What is an IDE?

A

an integrated development environment includes a specialized text editor that provides highlights, auto-completion, and smart indent. it includes a shell editor.

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

what is the shell?

A

it is the environment that actually interprets the python code. it includes a syntax highlighter and a debugger.

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

what are the “objects”?

A

everything in python is an object, including the code. objects have type.

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

what is the “type” of an object?

A

the type tells us the kind of object it is and what we can do with it.

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

what are the two kinds of types?

A

scalar & non-scalar

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

what are the scalar types?

A

they are the atoms of the programming language, they are indivisible. There’s the notion of a literal for every type, which is how we type it. they are divided into:

Integer, floats, booleans, none.

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

What is a float type?

A

they are the type that corresponds to the real numbers

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

Are floats the same thing as real numbers?

A

No

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

What is a float?

A

A float is a computer scientist approx to real numbers but not quite the same. You can pretend a floating point number is real but not always.

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

what is a boolean?

A

they are statements that are either true or false.

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

What is a none type?

A

they are used when you want to put in something temporarily.

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

What is scalar type that is not included in python?

A

Char or characters

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

what python uses instead of Char or characters?

A

Strings or Str

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

What are the literals?

A

they are the things we can literally scribe in python, for example putting abc.

17
Q

what is an expression?

A

it is a sequence of operands and operators

18
Q

what are the operands?

A

they are objects

19
Q

what is concatenation

A

it is the combination of two or more strings to form a single string

20
Q

what is an overloaded operator?

A

they have a meaning that depends on the type of the operands

21
Q

what does the ‘#’ mean in a line in a python script [program]?

A

that it is a comment and will not execute

22
Q

how do you execute a script or line of script in the shell?

A

using the print command

23
Q

what is a script [program]?

A

it is a sequence of commands that tell the interpreter to do something.

24
Q

what is an assignment statement?

A

it is used to give [binds] a value or a name or an identifier to a variable. it is also used to store value in the variables.

25
Q

what is a variable[in python]?

A

a name for an object

26
Q

what is the purpose of a comment[in python]?

A

that the program[script] is easier to read.

27
Q

what is the difference between print and raw input?

A

print is for the output and raw input is for the input

28
Q

what is a straight-line program?

A

its a sequence of commands executed one after the other without any deviations once

29
Q

what is a conditional statement?

A

it is the most primitive kind of program test, conditional statements use the words if and else

30
Q

what is a branching program?

A

its a program that

30
Q

what is a branching program?

A

its a program that

30
Q

what is a branching program?

A

It’s a sequence of commands executed independently and simultaneously in an if-or-else manner. just like straight-line programs each command is executed at least once

31
Q

what is a looping construct?

A

it is a programming structure that allows a block of code to be repeated multiple times based on certain conditions