Python para principiantes N042 Ciclo Mientras (while)

Cordiales Saludos

python_300_fondoblanco.png

Sirva esta publicación para que te animes a entrar al maravilloso mundo de la programación. De la mano de uno de los Lenguajes de programación más populares del momento: Python

card_031.pngcard_032.png


separador001.png

Aprendiendo Python

print("Generar: 1 2 3 4")
x=1
while x < 5:
    print(x , end = " ")
    x = x + 1
print()

.

print("Generar: 1 2 3 4")
x=1
while x <= 4:
    print(x , end = " ")
    x = x + 1
print() 

.

print("Generar: 4 3 2 1")
x=4
while x >0:
    print(x , end = " ")
    x = x - 1
print() 

.

print("Gererar: 1 4 2 3 3 2 4 1")
asc = 0
des = 5
while asc <4:
    asc = asc + 1
    des = des -1
    print(asc,des,"",end = "")

.

print("Gererar: 2 4 4 3 6 2 8 1")
des = 5
i=1
while i <5:
    des = des -1
    print(i*2,des,"",end = "")
    i = i +1 
print()

.

print("Gererar: 1 4 2 3 3 2 4 1")
des = 5
i=1
while i <5:
    des = des -1
    print(i,des,"",end = "")
    i = i + 1
print()

.

print("Promedio de 4 numeros")
suma = 0
i = 1
while i <5:
    numero = int(input("Introduzca un Numero"))
    suma = suma + numero
    i = i + 1
p = suma/4
print("El Promedio es:" ,p)


separador001.png

Entrega anterior

Python para principiantes N041 Contadores y Acumuladores (Funcionamiento)

Puedes practicar en esta web: PythonCumanés


separador001.png

Clases gratis de programación / Free programming classes

[ESP/ENG] Mi proyecto en Python/My project in Python.

Mi twitter
separador001.png


I started a Ko-fi Page! Ko-fi helps creators get support from fans of their work. Please support or follow my page! If you like what I do and feel in tune with my work in creating content for free programming courses and chess publications without any profit interest. Give me a coffee... I will be very grateful!
separador001.png
Todos a programar!
Rafael Aquino

Sort:  

Congratulations @rafaelaquino! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 15000 upvotes.
Your next target is to reach 20000 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Feedback from the July 1st Hive Power Up Day - ATH Volume record!