Python - Section 2 Practice Tasks
Task One
Ask a user to input their favourite colour and their favourite food and then print a funny response.
Requirements for a complete program:
-
Two separate input lines.
-
Use only one print line. Include both of the user's answers in the print line.
-
Include capital letters, full stops and no irregular spacing in the printed line.
Remember: Break up variables in a print line by using commas or plus signs between each part of the "sentence".
Example solution:

Task Two
Create a program that asks the user to input an answer to a trivia question of your choice then prints the correct answer with their response too.
Requirements for a complete program:
-
Only two lines.
-
Include capital letters, full stops and no irregular spacing in the printed line.
Example solution:

Task Three
Create a program that asks the user how they get to school (as a string) and how many minutes it takes them (as an integer).
Then print an appropriate response that uses both answers.
Requirements for a complete program:
-
Two separate input lines.
-
Use only one print line. Include both of the user's answers in the print line.
-
Include capital letters, full stops and no irregular spacing in the printed line.
Example solution:

Embedded Python Editor
Powered by trinket.io