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:

  1. Two separate input lines.

  2. Use only one print line. Include both of the user's answers in the print line.

  3. 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 a trivia question of your choice then prints the correct answer with their response too.

 

Requirements for a complete program:

  1. Only two lines.

  2. 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:

  1. Two separate input lines.

  2. Use only one print line. Include both of the user's answers in the print line.

  3. Include capital letters, full stops and no irregular spacing in the printed line.

Example solution:

© CSNewbs 2019