Ask the user to keep entering one number after another until the user inputs 0.
For each number the user gives, print its cube, square and, print whether it's odd or even.
The program I made is:
num = int(input("Enter number: "))
correct_num = 0
square = num ** 2
print("The square is:", square)
cube = num ** 3
print("The cube is: ", cube)
if (num % 2) == 0:
print(num, "is an odd number")
else:
print(num, "is an odd number")
while num == correct_num:
break
This code will only ask the user to input a number once, while I need the number to be asked until the number given is 0. I can't understand how to make a loop to continuously ask the user to input number until it's 0.