small program stops - why?
<p>Whats wrong with my code? 
After the second "input" the program stops...</p>

<pre><code>convr = 0

x = input("Inform value: ")
y = input("Inform if is Dolar (D) or Euro (E): ")

convt = x * convr

if y == "D":
    convr = 1/0.895
    print (convt)
elif y == "E":
    convr = 0.895
    print (convt)
else:
    print ("NOT ALLOWED!")
</code></pre>

<p>The program doesn's stop. Just your value is empty.
You can see what I mean by changing your print() statements to:</p>

<pre><code>print ('RESULT: ' + convt)
</code></pre>

<p>Now, instead of a blank line, you will get "Result: " printed to the screen.</p>

<p>The reason you don't get a value is because of this line:</p>

<pre><code>convt = x * convr
</code></pre>

<p>When you run this convr is equal to zero. Any number times by zero equals zero. :)</p>

python python-3.x input