Coding Task: 05.01 Favourite Subject

What’s your favourite subject? I hope it’s coding!

Your Task

In the editor below, fill in the blanks (________) so that the program asks the user for their favourite subject, and if it’s coding, print back Hey, fellow programmer! according to the flowchart below:

Python Reference Sheet

Remember to use the Python reference sheet to help you with your code! Click on one of the buttons below:

Requirements

  • The program should run without any errors.
  • The program should ask the user to enter a subject and then display the text Art is my favourite subject! onto the screen. If the user types coding for their subject, then the program should print Hey, fellow programmer! before it prints Art is my favourite subject!.
  • Hint: Remember, indentation is crucial when dealing with if statements in Python! Everything “inside” the if statement has to line up, and don’t forget the colon (:) at the end of the if statement!

Example

Below is an example of how the program should run:

Enter your favourite subject: english
Art is my favourite subject!
Enter your favourite subject: coding
Hey, fellow programmer!
Art is my favourite subject!
Scroll to Top