+ 1

I need help .

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. ... My attempt #your code goes here print(""" 1. 2. 3. 5. 6. 7. 8. 9. """ )

16th Oct 2021, 6:33 PM
Dr_knowmore
Dr_knowmore - avatar
7 Respostas
+ 1
you need to match the output just remove the extra spaces print(""" 1. 2. 3. 5. 6. 7. 8. 9.""") or use print("\n".join( str(i) + '.' for i in range(1,10)))
16th Oct 2021, 6:51 PM
ubai
ubai - avatar
+ 3
n = int(input() or 10) data = "sample" for i in range(1, n): print(f"{i}.", data)
16th Oct 2021, 6:42 PM
Carlos
Carlos - avatar
+ 3
for num in range(1,10): print("{}.".format(num))
16th Oct 2021, 8:49 PM
Jasy Fabiano
Jasy Fabiano - avatar
+ 1
show your attempt
16th Oct 2021, 6:41 PM
ubai
ubai - avatar
0
Print("1.\n2.\n3.\n4.\n5.\n6.\7.\n8.\n9.\n)
18th Oct 2021, 3:52 PM
Panache
0
for( int i=1; i<=10;i++) { printf("%d \n",i); }
18th Oct 2021, 4:58 PM
G. Krish.G
G. Krish.G - avatar
- 1
List=[1,2,3,4,5,6,7,8,9] For i in list:{ print(i,".\n ") }
17th Oct 2021, 9:04 PM
‎مبارك حسن‎