0
How to solve it....?
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. ...
7 Respuestas
+ 2
Md.Shihab Shahriar Rashu in both your code you put space after each dot... in second one that almost invisible, as in final output... however, there are unexpected spaces in final output that are detected by test as not expected right output (test check is not done by a human looking at your output, but by a program checking the outputed string is exactly what's expected)...
anyway, your first code has an unexpected space at start of each line also, and an unexpected new line at start of your second code ;P
this one should pass the test:
print ('1.\n2.\n3.\n4.\n5.\n6.\n 7.\n8.\n9.')
+ 1
Where is your try...?
+ 1
There is no need of space. It asked to print number followed by dot in line by line. So remove all spaces in that string.
+ 1
I've got it's answer....🙂
here it is:
print("""
1.
2.
3.
4.
5.
6.
7.
8.
9.
""")
+ 1
Here's a simpler way:
for i in range(1, 10): print(f"{i}.")
# Hope this helps
0
I wrote like this but didn't
print (' 1. \n 2. \n 3. \n 4. \n 5. \n 6. \n 7. \n 8. \n 9. ')
0
Which language? For me it is working