+ 2
Correct the code:
Code: inp=input("inp=") a=input("a=") if(a=="Hi"): inp Explanation: I'm trying to use an input as a code so I can modify my code whenever I want. Help me in how to execute the variable inp I gave the inp as print("Hello") and a as Hi According to the code,The first input is stored as inp and a is just to start the next step. If a is equal to Hi, it should execute inp.But nothing is happening and a message that the program ends was diplayed. Please help me out with this! (Am using Atom editor)
2 Antworten
+ 1
It looks like Python to me.
Anyways... You can define functions that do whatever you want, then use if statements within main to call functions according to inputs. If I got it right.
0
its which language pls mention