WorksheetsFirst day quiz!
Total questions: 10
Worksheet time: 6mins
What is syntax?
It's edible and tastes sour
a set of programming rules to follow
it's what stores the data
it's used to describe our codes
Which data below is count as an integer?
4
"Bernerd is smart"
True
6.9
Which data below is count as a string?
print()
hello
3.1423
"Pizza Hut"
Which data below counts as a float?
a float is whatever floats your boat
4
3.333
75691
Which data below counts as bool?
True
"True"
False
01010001
What is wrong with this variable assignment?
9gag = 'fun'
the string is not double-quoted but single-quoted instead
"fun" is not a valid data
it doesn't use an assignment operator
the variable name starts with the number 9
is this ok?
a = 5
b = 10
a = b
OK
NOT OK
What will be the final value of b?
a = 2
a += 2
b = 4
b = b + a
8
7
63
999
The difference(s) between keywords and variables is/are
Keywords are built-in, while variables are user-defined
Keywords are double or single-quoted, while variables are not
Keywords have to be defined in order for the program to recognize it, while variables don't have to
keywords are delicious while variables are not
In Python everything after # is ignored, this is called a
(a)
