Worksheetspython skillsG7
Total questions: 20
Worksheet time: 10mins
name = 'Dave'
print (name)
What will be the output?
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
Good moning 'Dave'
Good morning Dave
Good morning name
Good morning + Dave
print("Hello" + str(2) + "world!")
What does the following code do? myAge = int (myAge)
Converts the var (variable) myAge to a string
Converts the var (variable) myAge to a integer
Converts the var (variable) myAge from a integer to a string
Converts the var (variable) myAge to if statement
print(3*4+5)
What is the type of the variable ‘x’?
x = 5.0
float
int
str
bool
Which is the Python logo?
What syntax would you use to create a name variable?
name=input()
input=name
name=input{}
name=INPUT
_____ data type contain integer values with no decimal such as 1, 200, 999 etc.
int
float
char
String
_____ data type contain a set of characters (text) or word such as Hello, Ali, Car Type etc.
int
float
char
String
A variable is a named value that can be changed in the program.
False
True
Which value is a String?
64
"cat"
True
0.5
