WorksheetsPython 4 🐍 incomplete
Total questions: 25
Worksheet time: 55mins
Which of the following is NOT a data type in Python?
String
Char
Integer
Float
How would you print the word "Hello" in Python?
What would be the result of 8 / 2 in Python?
8
4
16
2
What does the comma , do in a print function?
How would you print the following on two lines? Copy code Hello World
How do you save a Python program?
How do you combine an integer and a string in a print statement?
What will this print? print("Hello", "World")
What operation is represented by * in Python?
Addition
Subtraction
Multiplication
Division
What is the purpose of the newline character \n?
Which of the following is NOT a valid variable name in Python?
3name
name_3
_name3
nameThree
How do you assign the value 10 to a variable called "number"?
If x = 5 and y = 3, what is x + y?
15
8
2
53
How do you print the variable name combined with the string " is great!"?
What does the str() function do?
Converts a string to an integer
Checks the length of a string
Converts an integer to a string
Takes user input
What function do you use to get input from a user in Python?
How do you convert a string to an integer in Python?
If data = "Hello", what is the result of len(data)?
4
5
6
7
How do you change the value stored within a variable?
How do you combine the value of variable a with the string " has apples" in a print statement?
Which function allows users to personalize outputted statements through input?
If a = 5 and b = 3, how do you print their sum as "The total is 8"?
Which function helps in checking the length of data within a variable?
int()
str()
input()
len()
What's the result of combining variables x = "5" and y = "3" using + operator?
How do you make calculations using variables a = 4 and b = 5 to get their product?
