Log in
Sign up for FREE
arrow_back
Library
Variables in Python
By Jason Machin (Computer Science Cafe)
star
star
star
star
star
Share
share
Last updated over 5 years ago
10 questions
Add this activity
Note from the author:
Variable assignment review for beginners in Python
1
1
1
1
1
1
1
1
1
1
Question 1
1.
A Variable is like a ....
Computer
Box
Square
Screen
Question 2
2.
Which one of the following would be a suitable variable name
print
for
import
number
Question 3
3.
Declaring a variable refers to
Creating a variable
Calling a variable
Using a variable
Deleting a variable
Question 4
4.
Which variable name is correct
my first name = ("Jane")
1stName = ("Jane")
firstName = ("Jane")
my_first_name == ("Jane")
Question 5
5.
What type of data is in the variable: runner = ("4")
String
Integer
Float
Number
Question 6
6.
Which concatenation is suitable to follow: userName = input("Please enter your name")
print ("Hello userName")
print ("Hello" userName)
print ("Hello" + userName)
print (Hello userName)
Question 7
7.
What will the output from the print statement be?
10
5
55
Error
Question 8
8.
What will the output from the print statement be?
10
5
55
Error
Question 9
9.
This code will not work, why?: num1 = int(input(“Please enter a number”)
Incorrect Variable
Incorrect Brackets
Incorrect Input
Incorrect String
Question 10
10.
Which contatenation is correct to follow: num1 = int(input("Please enter a number"))
print ("Your number is " + str(num1))
print ("Your number is " + num1)
print ("Your number is + int(num1))
print ("Your number is " num1)