What is a string.
A string is a type of datatype that represents a set of text.
Is a list a data type?
No, list are used to store multiple items in a single variable.
PRINT('Hello World')
Wrong
The word print should all be lowercase instead of all uppercase.
Free points!
Yaaaaa
You get 100 points for free
What is an integer.
An integer is any number that does not contain decimals.
When creating a list, do you use () or []?
You use () for variables.
Sorry you do not get any points!
:(
What are <,>, <=,>=,!=,== called?
They are all comparison operands.
What is a float?
It is a
What is the index for a list?
It starts with 0, not 1.
def add(x, y):
return x + y
Correct
What is # used for?
It can be used for notes and anything in the line would not be executed.
What is a boolean?
Boolean is used to test whether the result of an expression is true or false.
Is there a limit to how much can be put to a list?
No, any amount is fine.
Name == input('What is my name?')
If Name = 'Aaron'
print('You are correct!')
If name != 'Aaron'
print('You are wrong.')
False
The usage of the equal sign is not correct.
What are user inputs used for?
It is used so other people can interact with your program and type something.
Which of these is not a data type.
a) boolean
b) float
c) functions
d) strings
c) functions
Functions is not a data type. It is a block of code which only runs when it is called.
What does the append function do?
It adds to a list.
password=input("What is the password?")
if password =='python':
print('access granted')
else:
print('Wrong password!')
Correct
What is the difference between random.randit and random.choice?
The random.randit function is for choosing a random thing between a minimum point and a maximum point. The random.chocie function is for choosing a random thing from what is given.