You need to make a program for a leaderboard. The program needs to output the numbers 1 to 9, each on a separate line | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

You need to make a program for a leaderboard. The program needs to output the numbers 1 to 9, each on a separate line

Can somebody help me .I need your guys help .

10th Oct 2021, 1:44 AM
Cheang Zi Yi
Cheang Zi Yi - avatar
3 Respuestas
+ 3
Cheang Zi Yi I believe that this challenge is associated with the tutorial regarding newlines \n and doc strings which are indicated by 3 apostrophes ''' So there are 2 ways to resolve this task using the tutorial skillset. print("1.\n2.\n3.\n.....etc") or print('''1. 2. 3. ....etc''') Play with both concepts in playground and submit the one you like
10th Oct 2021, 2:40 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Have you tried self .This is simple task you need to learn about looping statement and print statement how it works see this one for i in range(1,10) print(i, end='\n')
10th Oct 2021, 2:24 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
- 1
print('\n'.join( str(i) + '.' for i in range(1,10)))
10th Oct 2021, 2:55 AM
ubai
ubai - avatar