Python Programming Flashcards
(14 cards)
What does input do?
Read from the keyboard
What does print do?
Display to the screen
What does while do?
Perform actions repeatedly
What does if do?
Check a condition to select which actions to perform
What does = do?
Asking a value to a variable
How to make a print statement?
print(“string”)
What does \n do?
Makes a new line begin
What are some types of variables in python?
Strings,integers
What is a string?
sequence of characters enclosed in either single quotes (‘’) or double quotes (“”)
What is an integer in python?
int() converts a given number or a string to an integer number.
What does else do?
decides what to do if the condition is False
What does sequence do?
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.
What does selection do?
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
What does iteration do?
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