Write a program to Display Number From 1 to 10 and Their Sum Using While Loop Using Python Example: Program Code num = 1 sum = 0 while num <= 10: print(num) sum += num num += 1 print("The Sum is :", sum) Output
Post a Comment