User Tools

Site Tools


programming:python:python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
programming:python:python [2022/11/30 12:21] ateixeiraprogramming:python:python [2022/11/30 12:41] (current) ateixeira
Line 56: Line 56:
 <code python> <code python>
  
-nombre = input('Salut!\nEntre un nombre :')+nombre = input('Salut!\nEntre un nombre: ')
  
 for i in range(int(nombre)): for i in range(int(nombre)):
-    print(i+1) +    print(i+1, end=' ')
 </code> </code>
   * Then press Esc key   * Then press Esc key
Line 83: Line 82:
 nombre2 = input('Et un deuxième nombre: ') nombre2 = input('Et un deuxième nombre: ')
  
-for i in range(int(nombre1), int(nombre2) - int(1), -1):+for i in range(int(nombre1), int(nombre2) - int(1), -1)):
     print(i, end='\n')     print(i, end='\n')
  
programming/python/python.1669810904.txt.gz · Last modified: 2022/11/30 12:21 by ateixeira