1) d. Getting user input Examples




Pyro Lazslo is a cunning investigator. He wants to store whatever the python user types in their keyboard. How can he do that using the input() function?




Now that everybody knows about Pyro’s mischievous activities that steal and store the user’s inputs, he wants to reconcile: he needs to include a welcome message that prompts the user to type something which in turn is stored via Pyro’s code. How shall he do that with the input() function?




Pyro wants to tease his friends, users of his program. Whenever he receives the data as input from the user he wants to print again their answer. Write a code that prompts the user to type their name (‘Please type your name:’), reads and stores the answer and prints back: ‘So your name is’ . ‘I knew it!’.

1
2
3
Output:
Please type your name: Spyro
So your name is Spyro. I knew it!




A note to the visitors:

Congratulations on making it this far! How do you feel about your learning? How easy/hard was it to reach here?

Python 3 Engager is designed with active learning to keep engaging your mind in multiple ways! Like it?