The following exercises cover scenarios on console operations in Python, that is to read input from user, or print some values to standard output for user.
Exercise 1 – Read input from user
Which built-in function is used to read input from user?
Type the built-function in the following, where we read an input from user, and assign the read input to variable x
.
x = input()
Submit Answer
↻ Reset
Show Answer
Fill the fields with missing code.
Exercise 2 – Print output to user
Which built-in function is used to print to standard output?
x = 'hello world' (x)
Submit Answer
↻ Reset
Show Answer
Fill the fields with missing code.
References