Cordiales Saludos
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
Aprendiendo Python
Ejercicios resueltos del 141 al 145
Ejercicios de FOR (para)/ Contadores
# Ejercicio resuelto N141
print()
print("-"*44)
print("Programa N141: Generar: 1 2 3 4 5 6 7 8 9 10")
print("-"*44)
n = 0
for i in range(1,11):
n = n + 1
print(n, end = " ")
print()
# Ejercicio resuelto N142
print()
print("-"*44)
print("Programa N142: Generar: 10 9 8 7 6 5 4 3 2 1")
print("-"*44)
n = 11
for i in range(1,11):
n = n - 1
print(n, end = " ")
print()
# Ejercicio resuelto N143
print()
print("-"*44)
print("Programa N143: Generar: 1 4 2 3 3 2 4 1")
print("-"*44)
asc = 0
des = 5
for i in range(1,5):
asc = asc + 1
des = des -1
print(asc,des,"",end = "")
print()
print("Segunda forma")
des = 5
for i in range(1,5):
des = des -1
print(i,des,"",end = "")
print()
print("Tercera forma")
print()
asc = 0
for i in range(4,0,-1):
asc = asc + 1
print(asc,i,"",end = "")
# Ejercicio resuelto N144
print()
print("-"*44)
print("Programa N144: Generar: 1 2 3 x 5 6 7")
print("y contar los numeros colocados y cuantas letras")
print("-"*44)
contarLetras = 0
contarnNumeros = 0
x = ' '
for i in range(1,8):
if i == 4:
print('x',end = " ")
contarLetras = contarLetras + 1
else:
print(i,'',end = "")
contarnNumeros = contarnNumeros + 1
print()
print("Se colocaron: ", contarnNumeros, "Numeros")
print("Se coloco: ", contarLetras, "Letra")
print()
# Ejercicio Resuelto N145 de Pythoncumanes
# Tema: Contadores
print()
print("-"*44)
print("Programa N145: Generar: 1 2 3 4 5 4 3 2 1 ")
print("-"*44)
yo_cambio = 0
for i in range(1,10):
if i <= 5:
yo_cambio = yo_cambio + 1
print(yo_cambio,'',end = "")
else:
yo_cambio = yo_cambio - 1
print(yo_cambio,'',end = "")
OBSERVACION
Estos Ejercicios no me los sé de memoria, no hace falta (Sirven para desarrollar la lógica). Los realicé analizando cado uno, disfruté haciendo el 144 y el 145. Es recomendable el uso del lápiz y papel para hacer las series y ver el comportamiento
print("-"*44)
print("BONUS: Generar: 5 4 3 2 1 2 3 4 5 ")
print("-"*44)
yocambio = 6
for i in range(1,10):
if i <= 5:
yocambio = yocambio - 1
print(yocambio,'',end = "")
else:
yocambio = yocambio + 1
print(yocambio,'',end = "")
Puedes practicar en la web https://repl.it/ (debes registrarte) allí podras guardar todos tus ejercicios. Tanto los del curso como los que tu inventes!. Si tienes alguna duda, contáctame.
Entrega anterior
Python para principiantes N039 Contadores y Acumuladores
Puedes practicar en esta web: PythonCumanés
Clases gratis de programación / Free programming classes
[ESP/ENG] Mi proyecto en Python/My project in Python.
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!
Todos a programar!
Rafael Aquino
Si estudio 3-4 horas al día, ¿cuánto tiempo me tomará hacer una dApp de ajedrez?
A ese ritmo de estudio podrás hacer cualquier proyecto de App en poco tiempo. Aun no he indagado en el desarrollo movil, pero existen muchos Frameworks: Flutter, Ionic, React Native,etc. Investiga un poco acerca de ellos! Gracias por pasar por aquí y comentar.
!PIZZA * !LOL тіљки не зараз !HUG
@pereu4ivatel, @antipops(4/5) sent LUV. | connect | community | HiveWiki | NFT | <>< daily
! help
(no space) to get help on Hive. Infololztoken.com
I thought it was a nice jester.
Credit: reddit
@pereu4ivatel, I sent you an $LOLZ on behalf of antipops
(4/6)
Farm LOLZ tokens when you Delegate Hive or Hive Tokens.
Click to delegate: 10 - 20 - 50 - 100 HP
@gravitcaper, @pereu4ivatel(3/4) sent LUV. | connect | community | HiveWiki | NFT | <>< daily
! help
(no space) to get help on Hive. Infololztoken.com
You have to try their New Delhi
Credit: reddit
@gravitcaper, I sent you an $LOLZ on behalf of pereu4ivatel
(3/6)
Delegate Hive Tokens to Farm $LOLZ and earn 110% Rewards. Learn more.
I sent 1.0 HUG on behalf of @gravitcaper.
(2/3)
lolztoken.com
She is stunning.
Credit: reddit
@pereu4ivatel, I sent you an $LOLZ on behalf of @gravitcaper
(4/4)
ENTER @WIN.HIVE'S DAILY DRAW AND WIN HIVE!
$PIZZA slices delivered:
@gravitcaper(1/5) tipped @antipops
pereu4ivatel tipped gravitcaper
antipops tipped pereu4ivatel
gravitcaper tipped pereu4ivatel