1/54
Looks like no tags are added yet.
what is an input in python?
values which get sent from the user into the computer
what is a variable in python?
a storage container for data that allows you to save information and manipulate it
what is output in python?
the values that get sent from the computer to the user
what is a string?
any combination of keyboard characters surrounded by speech marks
integer
any whole number- the computer can do maths with this data
real
any decimal or fraction number
boolean
when something is true or false
what does python do when we input a number into our program using input()
python automatically sets the variable as a string
what is a decision in python?
deciding what to do depending on certain conditions
what symbols do we use to compare data in python?
<, ==, >, >=, <=, !=
what does the word iterate mean?
to loop or repeat
when do we use elif in python?
when do we need quotes?
When we compare strings
when do we use == in python
when we want to see if something is mathematically equal to another
what do If-else statements to do?
allows programmes to make decisions based on certain conditions
what does selection use?
If-else statements
when do we use selection in python?
when we want the computer to make a decision based on our input
what is an if statement?
a statement which allows a program to take different pathways depending on particular decisions
what will be the output of (“3 +4”)
3+4
what are data types in python
floar, integer, boolean, and strings are examples of what?
data types
what will be the output from the following code: print (3 ×4)
12
what type of data type is : true
boolean
what 3 things does a variable have ?
name, type value
what type of data type is this: 6
integer
what type of data type is this: true
boolean
what type of data type is this : “sarah”
string
what is char in python?
a single visual unit which can be a letter, symbol, or a blank space
what are the different types of data types
integers, float, booleans, string,
how do we comment in python
by using a hashtag
what is casting
converting a variable from one data type to another
what is a data type?
the type of data being used by the program
what is iteration
another name for a loop
if i asked you to clap your hands 5 times, what type of loop is this?
a for loop
If i asked someone to clap their hands until i said stop, what kind of loop is this?
while loop
what is a for loop?
a counting loop- we know how many times the loop will run
what is a while loop
a condition controlled loop - it will run until a certain condition is met
what does a while loop do?
It repeats a section of code whilst a certain condition is true
how do we make all the letters go to lower case?
.lower()
what does the word iteration mean?
loop or repeat
what are ‘while loops’
condition controlled
what are for loops?
count controlled
for the code: for x in rage (m,n,o):, what does m represent ?
the number that the loop will begin counting from
for the code: for x in rage (m,n,o):, what does n represent ?
the number that the loop will count up to
print('What is your age?')
age = int(input())
print('Total books read in 2024:')
books = int(input())
if age > 10 and books > 8:
print("That's impressive!")
elif age > 10 and books <= 8:
print("You should read more")
else:
print("I hope you like reading")
If you entered 10 for the first question, and 10 for the second question, what will be the output
I hope you like reading
for the code: for x in rage (m,n,o):, why would the nuber than n represent not show?
because it starts at m, and ends at n but not including n
hat does ‘elif’ mean?What
else if
what does the logical expression ‘or’ mean?
one or both logical expressions must be true
what does the logical expression ‘and’ mean?
both logical expressions must be true
what are floats in python?
positive or negative numbers that contains a decimal point
for the code: for x in rage (m,n,o):, what does o represent ?
the steps that the loop is counting in
what is the main purpose of using condition statements like ‘if’ in python programming?
so that there are different pathways to take depending on if something is true or false
what does a string in python do?
represents words or sentences
what is the main purpose of the print() function in python?
to display output on the screen
What happens if none of the conditions are in an ‘if’ following an ‘elif’ statement are true, and there is no else statement?
the program will continue the next line of code after the conditional block