From c3fbc5eba53fb7759ff10cab60902d6192e466a1 Mon Sep 17 00:00:00 2001 From: Ayush Shridhar Date: Tue, 30 May 2017 00:06:25 +0530 Subject: [PATCH] NameError fix calculator.py using the normal input() function was causing a NameError. changing it to raw_input() fixed this. --- calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator.py b/calculator.py index 8c825453639..8bf3a86640e 100644 --- a/calculator.py +++ b/calculator.py @@ -44,7 +44,7 @@ def calc(k): print ("\nScientific Calculator\nEg: pi * sin(90) - sqrt(81)") - k = input("\nWhat is ") + k = raw_input("\nWhat is ") # Using input() function is causing NameError. Changing it to raw_input() fixes this. k = k.replace(' ', '') k = k.replace('^', '**')