Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Practice

Instruction

OK, let's start with something simple!

Exercise

Given the code that asks the user for a number, print this sentence number times:

I am back to check on my skills!

If the number is greater than 10, print this sentence instead:

Python conditions and loops are a piece of cake.

Assume that you can only pass positive integers.

Stuck? Here's a hint!

Use the if statement to check if the number is greater than 10:

if number > 10:
  ...

Use the for loop to print the sentence a given number of times:

for i in range(number):
  ...

Remember to indent the code in if and for.