Count the asterisks

Report a typo

How many asterisks (*) will you see after the program is executed?

i = 0
while i < 5:
    print('*')
    if i % 2 == 0:
        print('**')
    if i > 2:
        print('***')
    i = i + 1
Enter a number
___

Create a free account to access the full topic