+ 1

Python for beginners course, leaderboard project

x = "1. \n2. \n3. \n4. \n5. \n6. \n7. \n8. \n9." print(x) #It failed the test case and say no input. PLZ help.

17th Feb 2021, 9:21 AM
Mohamed Mehdi Gara
10 Réponses
+ 16
You need to remove the space between '.' and '\' x = "1.\n2.\n3....."
17th Feb 2021, 9:30 AM
Simba
Simba - avatar
+ 4
x = "1.\n2.\n3.\n4.\n5.\n6.\n7.\n8.\n9." print(x) or print(""" 1. 2. 3. 4. 5. 6. 7. 8. 9. """)
29th Jun 2021, 6:58 AM
Muhamad Farid Anuar
Muhamad Farid Anuar - avatar
+ 3
print(""" 1. 2. 3. 4. 5. 6. 7. 8. 9. """)
25th May 2021, 7:36 AM
Hudheyfa Cyerd
Hudheyfa Cyerd - avatar
+ 3
for i in range(1,10): print(str(i) + ".") it is the easiest option for a loop :)
4th May 2022, 12:32 PM
Henry-philippe Dumont
Henry-philippe Dumont - avatar
+ 1
Thanks Simba Was having trouble with it too
29th Nov 2021, 1:42 AM
Debicon_rocks
Debicon_rocks - avatar
0
print("""1.\n2.\n3.\n4.\n5.\n6.\n7.\n8.\n9. """)
1st Mar 2022, 7:14 PM
Leonie Vanessa Fürich
0
I know this is old, but it keeps marking it as wrong when I input this: print("""1. 2. 3. 4. 5. 6. 7. 8. 9.""") What’s wrong with this answer?
14th Sep 2022, 3:50 PM
Tati
0
Instead of that you can use this print ("""1. 2. 3. 4. 5. 6. 7. 8. 9.""")
20th Jan 2023, 6:03 PM
Dadi Venkata Anil Kumar
Dadi Venkata Anil Kumar - avatar
- 1
Print("1. 2. 3. 4. 5. 6. 7. 8. 9")
7th Jun 2021, 3:03 AM
Mohit Mohan Lokhande
- 1
a=1 while a < 10: print(str(a)+".") a=a+1 it worked
31st Aug 2021, 1:06 AM
groudse
groudse - avatar