0 of 6 questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 6 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
You have the potential to do better! 🙂
If you found a concept confusing on this page then please leave a comment below asking for clarity.
Try re-reading the tutorial on this page before you retake this quiz!
Good work on clearing this quiz!
Outstanding work! You have mastered this lesson. Onward to the next one!
The “input” function is used to get a keyboard input from the user.
The input function always gets a string from the user.
What will be the output of the following program, if the user enters “pilot” and “40” respectively?
Â
occupation = input(“What is your occupation?”)
age = input(“What is your age?”)
print(“You work as a”, occupation, “at the age of”, age)
See if you can fill in the blanks in the following program. Enter the python built-in that should allow you to accept values from the user.
(Tip: Do not use any spaces)
occupation = (“Enter an occupation”)
hobby = (“Enter a hobby”)
name = input(“Enter a name”)
(name, “worked as a”, occupation, “as a profession. But on the weekends he enjoyed”, hobby, “.”)
What will happen when you’re fetching an input from the user but he doesn’t enter anything (does not press enter-key either)?
At the time of fetching an input from the user, what will happen if the user doesn’t type anything but directly hits enter?