Week 5 Flashcards

1
Q

How do you make a conditional statement?

A

x =6

if x < 10

print “Hallo”

print “warum”

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

Maintain indent to indicate…

A

the scope of the block (which lines are affected by if/for)

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

What do Boolean expressions do?

A

ask a question and produce a yes or no result which we use to control programme flow.

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

What does this sign

<=

mean in Python

A

less than or equal

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

What does this sign

!=

mean in Python

A

not equal

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

What does this sign

==

mean in Python

A

equal to

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

What does this sign

>=

mean in Python

A

Greater than or equal

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

What does this sign

>

mean in Python

A

greater than

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

What does this sign

<

mean in Python

A

less than

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

What is conditional execution?

A

An execution with a condition in it

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

When do you increase indent?

A

after an “if” statement and for statement

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

Does Python care about how far a line is indented?

A

Yes, absolutely

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

What is a nested decision in Python?

A

More than 1 indentions

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

What is this?

x = 42

x > 1:

print “More than one”

if x < 100:

print “less than 100”

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

What is a two way decision?

A

something where we must choose one path or the other

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

Zeige eine two way decision

A
17
Q

show a various options decision

A
18
Q

Show the programme for a more than three options decision

A
19
Q

What are try and except there for?

A

to sorround a dangerous section