For statement
hap=0
for n in range(1234,4568):
if n%444 ==0:
hap += n
print(hap)
How do I change this to a while statement
for while-loop python
hap=0
n=1234
while n<4568:
if n%444 ==0:
hap += n
n+=1
print(hap)
You can do it like this.
© 2024 OneMinuteCode. All rights reserved.