30 июля 2022
Yorkiamistake in day2
It is not necessary to have been married 250 times, if it is true it is enough 🤣
jmcriptoson day 3, how did you solve this?
It's printing numbers 1 ~ 5 at the begining of each line followed by each one to the power of 0 ~ 3:
1, 1^0, 1^1, 1^2, 1^3
2, 2^0, 2^1, 2^2, 2^3
...
Yorkiaa = 1
print(a,'1',a,a**2,a**3)
a+=1
print(a,'1',a,a**2,a**3)
a+=1
print(a,'1',a,a**2,a**3)
a+=1
print(a,'1',a,a**2,a**3)
a+=1
print(a,'1',a,a**2,a**3)
If you haven't worked with loops yet, then this is correct. however you can improve it:
a = 1
print(a, a^0, a^1, a^2, a^3)
a += 1
print(a, a^0 , a^1, a^2, a^3)
a += 1
...
This looks a little more algorithmic and it is basically what a loop does. So when you learn about loops you'll be able to implement this with loops.
Alireza GhazanfariIf you haven't worked with loops yet, then this is correct. however you can improve it:
a = 1
print(a, a^0, a^1, a^2, a^3)
a += 1
print(a, a^0 , a^1, a^2, a^3)
a += 1
...
This looks a little more algorithmic and it is basically what a loop does. So when you learn about loops you'll be able to imple
Фотография
нажмите — покажем
нажмите — покажем
Фотография
нажмите — покажем
нажмите — покажем
jmcriptosmi última versión
Por qué en ninguna de las iteraciones de la tabla dónde a**0, te da 0? No entiendo...
Carlos EduardoPor qué en ninguna de las iteraciones de la tabla dónde a**0, te da 0? No entiendo...
En Python se utiliza * para multiplicar y ** para elevar o calcular la potencia
Carlos EduardoPorqué te cambió el resultado entre la primera tabla y la segunda?
No entiendo a qué te refieres, si hablas de lo que está en la parte superior de la línea azul vs la parte inferior, es que arriba escribes el código y abajo se ejecuta y muestra el resultado
jmcriptosEn Python se utiliza * para multiplicar y ** para elevar o calcular la potencia
y cualquier número elevado a cero es 1
jmcriptosy cualquier número elevado a cero es 1
Ahhh es que el elevado, no multiplicado, mala mía. Mis disculpas. 🤦🏾♂
Alireza GhazanfariIf you haven't worked with loops yet, then this is correct. however you can improve it:
a = 1
print(a, a^0, a^1, a^2, a^3)
a += 1
print(a, a^0 , a^1, a^2, a^3)
a += 1
...
This looks a little more algorithmic and it is basically what a loop does. So when you learn about loops you'll be able to imple
thanks