Toggle Navigation
Games
Blog
Class PIN
Join for Free
Sign in
Toggle Navigation
Games
PIN
Join for Free
Blog
Pricing
Contact us
Help center
Sign in
Study
Python print examples
0
%
0
0
0
Back
Restart
name = "Alice" print("Hello, " + name)
"Hello Alice"
Hello name
Hello, Alice
"Hello" + "Alice"
Oops!
Okay!
x = 5 y = 10 print(x + y)
5
10
15
2
Oops!
Okay!
print("5" + "5")
55
25
"5+5"
10
Oops!
Okay!
x = 3 print(x * x)
6
9
3
1
Oops!
Okay!
x = "123" y = 123 print(x == y)
"123"
TRUE
"True"
FALSE
Oops!
Okay!
a = 10 b = 20 a, b = b, a print(a, b)
20 10
10
10 20
30
Oops!
Okay!
x = 8 y = 3 print(x * y)
5
24
11
32
Oops!
Okay!
x = "5" y = int(x) print(y + 3)
8
2
"53"
53
Oops!
Okay!
x = "Hello" print(x * 3)
3
HelloHelloHello
"Hello3"
"3Hello"
Oops!
Okay!
a = "Python" b = "3.10" print(a + b)
3.1
"Python 3.10"
"Python" + "3.10"
Python3.10
Oops!
Okay!
num = input("Enter a number: ") print(num)
It will print an error.
It will not print anything.
It will print the entered number as a string.
It will print the entered number as an integer.
Oops!
Okay!
x = 10 y = 4 print(x / y)
2
14
2.5
4
Oops!
Okay!
x = 2.5 y = 4 print(x + y)
6.5
10
2
4.5
Oops!
Okay!
a = 7 b = 2 print(a - b)
7
5
9
2
Oops!
Okay!
Your experience on this site will be improved by allowing cookies.
Allow cookies