Python - Section 1 Practice Tasks

Task One

Create a program that prints the days of the week, with each day on a new line.

Requirements for a complete program:

  • Include a comment to explain what the program does.

  • Use only one print line.

  • No empty space at the start of any line.

Example solution:

Task Two

Write a program that uses two variables, one for a colour and one for an animal. Print a funny sentence using both variables.

 

Requirements for a complete program:

  • A comment at the start to state what a variable is.

  • Use both your variables within one print line.

  • Write only 4 lines of code (including the comment 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 Three

Write a program that uses three variables, an adjective (descriptive word), a number and an animal.

Print a funny response using all variables.

 

Requirements for a complete program:

  • Use all three variables within one print line.

  • Write only 4 lines of code.

  • 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:

© CSNewbs 2019