why does this code not work in real environment? saying 'normal' is undefined (new coder)
<p>my question: I can get this to work in codeskulptor but not any of my IDE. Please help!</p>

<pre><code>Uinput = input("first morph")
Uinput2 = input("second morph")

#this section of code accepts normal or recessive to
#calculate if you will get hets. If hets, clarify morph in separate function
#input to compare are words

def normal_recessive():
if Uinput == ("normal") and Uinput2 == ("normal"):
    print("your results will be all wildtypes")
elif Uinput == ("normal") and Uinput2 == ("recessive"):
    print("Your results will be heterozygous aka hets")
elif Uinput == ("recessive") and Uinput2 == ("normal"):
    print("Your results will be heterozygous aka hets")
elif Uinput == ("recessive") and Uinput2 == ("recessive"):
    print("Your results will be all recessive")
else:
    print("input error, please input recessive or normal for morph type")
    print("please check your spelling and try again")

normal_recessive()   
</code></pre>

<p>It sounds like CodeSkulptor is running Python 3 and your IDEs are running Python 2. The <code>input</code> function behaves differently between the two Pythons.</p>

<p>If you configure your IDEs to use Python 3, your code should work.</p>

<p>Alternatively, the Python 2 <code>raw_input</code> function does what the Python 3 <code>input</code> function does, so if you need to use Python 2 instead of Python 3, then replace <code>input</code> in your code with <code>raw_input</code>.</p>

python python-2.x