CDT Flashcards
study (13 cards)
how to import something from a random number?
from random import randint
how to set ‘guessing’ to false
guessing = False
the 3 letters that go before a number statement
int
sleep for 8 seconds
sleep(8)
set highlight colour red
SetHighlightColour(RED)
set a random number from 1 - 100
number = randint(1,100)
set the variable ‘guessing’ to true, using while?
while guessing == True:
what is a boolean?
A true or False
What is a float?
number with a decimal
is this correct? and why/why not
numba = input(“Choose a number”)
if number == “5”:
print(“correct”)
No. because the top variable name doesn’t match the variable name after ‘if’
what is the concatenate sybol?
+
what is the assignment/comparison operator?
=
name 3 logical operators?
or, and, in