Tsallaka zuwa abun ciki
Justice Tech School

Input and Output

print() writes text and input() reads a line as a string. Convert with int() or float(). Use sep and end to control print.

Example
name = "Ada"
print("Hello", name, sep=", ", end="!\n")
age = int("30")
print(age + 1)

Result

Hello, Ada!
31

Exercise

Read user text.

name = ("Name: ")

Quiz Test

What type does input() return?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.