- 2

Does anyone know the answer to this question in Phython? I am stuck

You 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: 1. 2. 3.

12th Jun 2021, 9:55 PM
Arzoo
7 Respuestas
+ 3
yes, sure: show your attempt, and we will help you to complete the task ;P (most common error is to put unexpected spaces at end of each lines ^^)
12th Jun 2021, 10:08 PM
visph
visph - avatar
+ 1
Must have unmarked by mistake
12th Jun 2021, 11:20 PM
Arzoo
+ 1
Arzoo This question has been asked here multiple times. Here's a possible Python solution, though: print(*range(1, 10), "", sep=".\n") # Hope this helps
14th Jun 2021, 9:27 AM
Calvin Thomas
Calvin Thomas - avatar
0
This is my attempt print("1. \n2. \n3. \n4. \n5. \n6. \n7. \n8. /n9.")
12th Jun 2021, 11:11 PM
Arzoo
0
remove the spaces (between dots and \n's) and change the last /n by \n ^^
12th Jun 2021, 11:13 PM
visph
visph - avatar
0
Thank you so much, it worked.
12th Jun 2021, 11:17 PM
Arzoo
0
that was the common mistake I talked in my first post: why did you mark it as best and then immediatly unmark?
12th Jun 2021, 11:18 PM
visph
visph - avatar