python keeps saying that 'imput is undefined. how do I fix this? - python-3.x

Please help me with this. I'd really appreciate it. I have tried alot of things but nothing is working, Please suggest any ideas you have.
This is what it keeps saying:
name = imput('hello')
NameError: name 'imput' is not defined

You misspelled input as imput. imput() is not a function that python recognizes - thus, it assumes it's the name of some variable, searches for wherever that variable was declared, and finds nothing. So it says "this is undefined" and raises an error.

imput isn't a built-in function. Perhaps you're looking for input.

Related

KD_raj185 rpgle code in as400 try this please

an assignment operator is expected with the eval operation
a semi colon is not specified at the end of a free format statement
the name or indicator is not defined
the compiler cannot determine how the program can end try this please
hope its clear for issue
#1 & 2 are pretty evident, the error tells the line number in the source with the problem, just fix it. #3 is pretty evident as well, the error will tell you the name of the variable that is not defined.
#4 is the only one that is a bit tricky if you haven't seen it before. The compiler did not find a return from the main procedure, and also no place that *INLR is set on. Either of those things will fix that one.
Odds are that you just included some typos in your code. Please don't paste the entire source and error listing, just read the errors, and go find someone in your company that can tell you where in the source listing to find the errors. Or if you are using RDi, you could just click on the error, and it will take you directly to the problem.

Corverting to Integer in Power Automate

I was searching for solution one by another and still have some problems, i am open to change even a whole schema, but i have time till weekend. If you have new solution show me, if i did something wrong please tell me.
This is where it happens
Also earlier i had problem with just initializing variable and puting there value from excel, but now i guess i am on right way. Earlier program told me that i am setting string to my int variable.
Yep, so i did that but still i receive:
InvalidTemplate. Unable to process template language expressions in
action 'var_name' inputs at line '0' and column '0': 'The template
language function 'int' was invoked with a parameter that is not
valid. The value cannot be converted to the target type.'.
I don't know what it meens and what to do, what i know is that i can still see and show what i got from my excel, also in excel file every cell i get is set to be Integer.
Can someone help me? I can show You more if its necessary.
I changed type of cells to intiger in my excel, also i made this function, and still none. Help, i do not have time and i worked on it for too long.

Python: why can a variable stand on its own?

I am a beginner in python told my friend today, that the following code would throw an error, but it did not:
a = 5
a
So I wondered, what does "a" actually do and why is the interpreter fine with this?
If this is a duplicate, please refer me to the right post and sorry in advance.
edit: I used a *.py file.
If you type this code into the shell and click enter, the value of a is returned. Functionally, as there is no operation being performed on a, the value of a will not change.
You define the variable in the line above. The variable contains a value, so the "NameError: name 'a' is not defined" error is not triggered.
Also, even if the variable is a different data type, for example, a string, the value of a is returned.
If you run the code in a different environment, the line won't be printed and the line won't impact the value of itself or of any other variables.
I think you tried it in der REPL Console, paste it to a *.py file and execute that. So when you just type the variable name and hit enter this is actually a print command behind the scenes
You can type in a int into the shell or whatever, and it will return it. The variable you put is just a int, so it returns 5.

Name Error-Name not defined-Python 3.6.2

I'd be very thankful if someone told me why this message keeps coming up. I wanted to create something positive for Christians and got stuck. All the other questions imply that there must be a typo (but I see none) or raw_input for python 2. Is there any OTHER reason this could be happening?
Click here to see Code
The error I'm getting is in line 3 :
Traceback (most recent call last): File
"/Users/AlexTona/Documents/bible code.py", line 3, in
if answer1=="yes": NameError: name 'answer1' is not defined
I've gone through tutorials and many forums but I've decided to try and post the code since its more specific to my needs. Thank you for your help!
answer1:input("Are you unhappy today?-Yes or No")
if answer1=="yes":
print("That's because God loves you!")
elif answer1=="no":
print ("Did you know God loves you?")
else:
print ("ERROR, please answer YES or NO")
If you have retyped the code then you may have introduced other errors. It really is much better to cut and paste. If you retype the code then you type what you think the code should be, rather than what it is, and so you are asking us to find the error in what you think you are doing, rather than in what you are actually doing.
The code you report runs without error.
From the error message you have reported, it looks as if the variable name in line 3 (answer1) is not the same as the variable name in line 1. Check the spelling. Or paste the code back out of SO into the Python interpreter.
And it would really be better to code:
answer1=input("Are you unhappy today?-Yes or No").upper()
Your code prompts the user to enter Yes or No and then complains if the user does either. It asks for Yes and but expects YES. Not friendly.
In the initial image of the code I did this:
answer1:input
instead of this:
answer1=input
Turns out it really was a sintax error.

Python3.4 Anaconda: Input() Function Broken?

I'm having trouble with the input() function in Python3.4 using the Anaconda integrated editor. If I just type
x = input()
into the editor, it returns a blank line that I can type text into. If I type:
foo
into this line, I would expect 'foo' be stored as a string with variable name x. But, instead I get:
NameError: name 'foo' is not defined
To make the function work as expected, I must instead type in:
'foo'
which is unfortunate because what I really want is just to pause my code and wait for an arbitrary user input, and I read somewhere that "wait = input()" is the most pythonic way to do this. Using that line in my actual script returns an "unexpected EOF" error - I assume as another symptom of the same problem. Can anyone suggest a workaround?
Note: I suspect this is an Anaconda-specific problem, given the following reference:
https://docs.python.org/3.4/library/functions.html#input
Thanks for your time.
Your code is being run by Python 2, not 3. I don't know enough about Anaconda to know if the problem is with their editor, or if you have your path messed up, but the problem is that the wrong version of Python is being used.

Resources