Python Programming Flashcards

(14 cards)

1
Q

What does input do?

A

Read from the keyboard

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

What does print do?

A

Display to the screen

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

What does while do?

A

Perform actions repeatedly

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

What does if do?

A

Check a condition to select which actions to perform

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

What does = do?

A

Asking a value to a variable

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

How to make a print statement?

A

print(“string”)

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

What does \n do?

A

Makes a new line begin

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

What are some types of variables in python?

A

Strings,integers

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

What is a string?

A

sequence of characters enclosed in either single quotes (‘’) or double quotes (“”)

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

What is an integer in python?

A

int() converts a given number or a string to an integer number.

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

What does else do?

A

decides what to do if the condition is False

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

What does sequence do?

A

This means that the computer will run your code in order, one line at a time from the top to the bottom of your program. It will start at line 1, then execute line 2 then line 3 and so on till it reaches the last line of your program.

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

What does selection do?

A

only want some lines of code to be run only if a condition is met, otherwise you want the computer to ignore these lines and jump over them. Uses if statements

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

What does iteration do?

A

Sometimes you want the computer to execute the same lines of code several times. This is done using a loop. There are three types of loops: For loops, while loops and repeat until loops

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