Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis8 Respostas
+ 1
This is my attempt
https://code.sololearn.com/cKAcR8AXqZaU/?ref=app
+ 1
You could use a for- instead of a while-loop
+ 1
You can check It with a condition:
if i%2 == 0:
print("It is multiplicable to two")
else:
print("Isn't multiplicable to two")
Or for more especific:
for i in range(0,num):
if i%2 == 0:
print("It is multiplicable to two")
else:
print("Isn't multiplicable to two")
+ 1
Jairo Soto I think not, because the i is increasing and while It, We are moduling him by 2
So, Just think:
1/2 = 1 (It is not multiplicaple)
2/2 = 0 (It is multiplicaple)
...
It is just my logic š
+ 1
Jairo Soto Yes, but in this code, you canal only see a number (It is helpful sometimes) but you cannot define num's value by yourself
This is my attempt:
https://code.sololearn.com/cXwfg50FOA07/?ref=app
0
Puesto que tiende mĆ”s a un problema matemĆ”tico, supongo que mediante algoritmos de factorizaciĆ³n.
0
Usa el bucle for y el module "%"
0
Cat do Chrome I think that "if num % i == 0" is better for this case. what do you think?