This is a great explanation, but I think adding the sum function makes it more confusing than it needs to be. It took me a while to understand this video to be honest. Maybe a better example would be something like: i = True while i == True: answer = input("Do you want to continue?" if answer == "Yes" : i = False print("End of loop") Please excuse any mistakes or weird formatting, I am very new to programming.
sum=0 num = 0 while num >=0: num=int(input("Enter a positive integer: ")) if num >=0: sum +=num print(f"sum is {sum}") Sorry because i just started this, but doesnt this look more optimized than your code? Sorry for asking.
Great i understood nothing before, now i understand very little.. very helpful
This guy is a great teacher! I'm taking Programming Logic through college and it is confusing. After watching this Afternerd I get it!
This is a great explanation, but I think adding the sum function makes it more confusing than it needs to be. It took me a while to understand this video to be honest.
Maybe a better example would be something like:
i = True
while i == True:
answer = input("Do you want to continue?"
if answer == "Yes" :
i = False
print("End of loop")
Please excuse any mistakes or weird formatting, I am very new to programming.
wow! thanks so much. the logic behind the while loop has been my problem until today.
Great explanation. Thank you!
Very helpful explanation!
Wow! Very nice.
thank youu!
Excellent..
sum=0
num = 0
while num >=0:
num=int(input("Enter a positive integer: "))
if num >=0:
sum +=num
print(f"sum is {sum}")
Sorry because i just started this, but doesnt this look more optimized than your code? Sorry for asking.
I have doubts in second code in while loop