t=input("Enter your question : ") print("This is your answer : ",eval(t)) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

t=input("Enter your question : ") print("This is your answer : ",eval(t))

What is the error in this question?

23rd Jun 2022, 3:35 AM
Anushka Jangra
Anushka Jangra - avatar
3 Answers
+ 5
Anushka Jangra , the code as it is given is working correctly if the input is correct. by entering: 2 * 14 (then press enter key) the input given will be evaluated and executed. so the result of the input expression is 28
23rd Jun 2022, 10:47 AM
Lothar
Lothar - avatar
0
Pls Save code and share link here... Mention your sample input along with expected output.. Seems your code is Truncated..!!!
23rd Jun 2022, 9:42 AM
Jayakrishna 🇮🇳
0
Thanks for answering.
24th Jun 2022, 2:55 AM
Anushka Jangra
Anushka Jangra - avatar