From 2b5f1ed817e280d319d007bd7945f96be5c319dc Mon Sep 17 00:00:00 2001 From: harshit720 <56186509+harshit720@users.noreply.github.com> Date: Sat, 5 Oct 2019 12:43:44 +0530 Subject: [PATCH] Update my_first_calculator.py --- my_first_calculator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/my_first_calculator.py b/my_first_calculator.py index bf7c560..f0b51ef 100644 --- a/my_first_calculator.py +++ b/my_first_calculator.py @@ -6,9 +6,9 @@ if 3/2 == 1: # Because Python 2 does not know maths print('Welcome to this calculator!') print('It can add, subtract, multiply and divide whole numbers from 0 to 50') -num1 = int(input('Please choose your first number: ')) +num1 = eval(input('Please choose your first number: ')) sign = input('What do you want to do? +, -, /, or *: ') -num2 = int(input('Please choose your second number: ')) +num2 = eval(input('Please choose your second number: ')) if num1 == 0 and sign == '+' and num2 == 0: print("0+0 = 0")