WorksheetsLearn Python 2 Python Syntax
Total questions: 12
Worksheet time: 7mins
What function is used to output a message in python?
print("")
input=name
name=input
In Python 2 and 3 you print the exact same way
True
False
What symbol is used to join strings together?
%
+
*
If I wanted to make a variable set to my age (34), which would be correct?
my_age = 34
my age = 34
If you do not want a remainder printed what symbol do you use?
%
#
*
What sign do you use to add a variable
+=
%
What is the correct symbol to use for a comment?
@
#
In order to print out the remainder of a division problem use what method?
remainder
division
float
What symbol is used if you are printing out multiple lines of string?
%
+
""""
What function do you use to to make all letters turn uppercase?
len()
float()
.upper()
.lower()
What function do you use to to make all letters turn lowercase?
len()
float()
.upper()
.lower()
What function do you use to to find the length of the string?
len()
float()
.upper()
.lower()
