Python - If codes, Equalities and Pygame
Terms in this set (20)
An if statement allows you to __________ only if a _________ is met.
run code, condition
What happens if the if condition is not met?
code is not executed
you must place a _____ at the end of an if, if else, elif statement
write an if statement that if a number is greater than 60 it prints "number is greater than 60"
if number >60:
print "number is greater than 60"
when is the else statement executed on an if -else structure?
only if the if and elif statements are FALSE
the if condition, else, and elif must be ______________. the code to condition each is indented ____________.
aligned, 4 spaces (or 1 tab)
What is the operator that determines if two values are equal?
What is the operator that determines if two values are not equal
What is the operator that determines if a value is greater than another
What is the operator that determines if a value is less than another
What is the operator that determines if a value is greater than or equal to another
What is the operator that determines if a value is less than or equal to another
What is the output for the following code:
seconds = 30
if seconds >=60:
Which structure (if, if-else, elif) allows us to look for a range of values, or an exact value?
What is the color code for BLACK?
What is the color code for WHITE?
What is the color code for RED?
What is the color code for BLUE?
What is the color code for GREEN?
True or False: If you do not indent your code exactly right, Python code will still run just fine.
YOU MIGHT ALSO LIKE...
Coding with Karel Test
CodeHS Intro to Programming with Karel the Dog (Ace)
OTHER SETS BY THIS CREATOR
Tech Exploration Test Part 2: Minecraft Info
Minecraft Identification Test
Tech Exploration Test Part 1: Google Tech
Quiz Info: ICS Chapters 9c-11
THIS SET IS OFTEN IN FOLDERS WITH...
Python - Dictionaries
Rules about Python names
Python function arguments and parameters