From a935f1f303b6494d1d24ff55274e839e88d297da Mon Sep 17 00:00:00 2001 From: Nithin Date: Sat, 29 Jun 2024 14:50:59 +0530 Subject: [PATCH] Included type checking --- calculator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/calculator.py b/calculator.py index 2550c49..d4fa861 100644 --- a/calculator.py +++ b/calculator.py @@ -5,9 +5,9 @@ # Asks user for 2 operands and 1 operator # Returns output of this operation -a=input("Enter number 1 : ") -o=input("Enter operator : ") -b=input("Enter number 2 : ") +a=int(input("Enter number 1 : ")) +o=(input("Enter operator : ")) +b=int(input("Enter number 2 : ")) if o[0] in [ '+','-','*','/' ]: if o[0] == '+':