My computer teacher gave us an assignment to make (copy from a sheet of paper) a calculator program
#Calculatori=0while i<=10: a=0 b=0 choice=0 choice = int(input('Enter your choice: 1. Sum 2. Subtract 3. Multiply 4. Divide :')) if choice==1: print('Sum of two numbers') a = float(input('Enter 1st number: ')) b = float(input('Enter 2nd number: ')) sum1 = a + b print(sum1)if choice==2: print('Subtract two numbers') a = float(input('Enter 1st number: ')) b = float(input('Enter 2nd number: ')) sub1 = a + b print(sub1)if choice==3: print('Multiply two numbers') a = float(input('Enter 1st number: ')) b = float(input('Enter 2nd number: ')) mul1 = a + b print(mul1)if choice==4: print('Divide two numbers') a = float(input('Enter 1st number: ')) b = float(input('Enter 2nd number: ')) div1 = a + b print(div1)
The program ran just fine for a few days but recently when I try to open it the window just appears for a second and then disappears. I've tried disabling antivirus but still nothing any help is appreciated.