0
Python - End of module project - Strings - Question on solution
Hey, I'm entering the code in the project and the output matches but it says the solution isn't correct .. You have to create a leader board like 1. 2. 3. 4. 5. 6. 7. 8. 9. And the code I created was https://code.sololearn.com/cG52GNOo5dnJ/?ref=app Am I going wrong somewhere?
8 Antworten
+ 5
Remove the space between `.` and `\`
print("1.\n2.\n3.\n4.\n5.\n6.\n7.\n8.\n9.")
+ 3
Matt
Remove ALL the spaces in your string
+ 3
Still there is a space between \n8. and \n9.
print("1......\n8.\n9.")
+ 3
Thanks for this, I couldn't see the gap on the app 😶
Thanks, working now :)
+ 2
You have to use loops to solve this,
for i in range(1,10):
print(i,end='.\n')
Tbh, I don't know why your sol fails over this question 🤷♂️
+ 1
Thanks for the quick reply !
I haven't learnt about loops yet, just on Python for beginners and just finished strings so I'd have thought /n would create the line break it is looking for
0
Sadly not, just tried:
print("1.\n2.\n3.\n4.\n5.\n6.\n7.\n8. \n9.")
Still coming up with a fail
0
Mas chulo:
def numbers(number):
for x in range(1, number):
print(str(x) + '.')
numbers(10)