+ 3

Please I need help with a python problem!

I need to make a program for a leaderboard The program needs to output the numbers 1 to 9, each on a separate line, followed by a dot: Check the code below for the error print ('1. \n2. \n3. \n4. \n5. \n6. \n7. \n8. \n9.')

8th Nov 2021, 11:09 AM
Isaac Williams
Isaac Williams - avatar
3 Respuestas
+ 2
Remove spaces after dot and try then. Hope it helps..
8th Nov 2021, 11:11 AM
Jayakrishna 🇮🇳
+ 3
Thanks...
8th Nov 2021, 11:12 AM
Isaac Williams
Isaac Williams - avatar
+ 1
c = 0 for i in range(10): c += 1 print(f"{c}.") Check this, more control and flexibility
9th Nov 2021, 10:34 AM
Mosi B.
Mosi B. - avatar