How to multiply user input by a decimal number in python?
<p>Hello I am having trouble with using strings and integers during multiplication. If there is something I do not think I have done anything fundamentally wrong but then again, it's not working so I probably have done! </p>

<p>This is my code as of now.</p>

<pre><code>    #This is where I ask the user for input for a value 
UI = print (float(input("Enter your value here: ")))
#Here I have numbers that I need to multiply the input by
FRT = (float(0.290949)
SRM = (float(0.281913)
#Here is the multiplication but this is where the issue occurrs
QV = (float("FRT"*"UI"))
SV = (float("SRM"*"UI"))
</code></pre>

<p>Both of these lines at the end have issues, I have tried using different set ups with using the numbers instead of defining them as FRT and SRM and using integer before float etc, but with these lines they both give the error "could not convert string to float "FRT""</p>

<pre><code>    #This is where I ask the user for input for a value 
UI = print (float(input("Enter your value here: ")))
</code></pre>

<p>Above won't do what you want, print doesn't return anything</p>

<pre><code>UI = float(input("..."))
print(UI)
</code></pre>

<p>If using python 2.7 us raw_input, not input</p>

<pre><code>#Here I have numbers that I need to multiply the input by
FRT = (float(0.290949)
SRM = (float(0.281913)
</code></pre>

<p>You just need:</p>

<pre><code>FRT = 0.290949
</code></pre>

<p>No need to convert a float into a float</p>

<pre><code>#Here is the multiplication but this is where the issue occurrs
QV = (float("FRT"*"UI"))
SV = (float("SRM"*"UI"))
</code></pre>

<p>You are multiplying strings above, do this:</p>

<pre><code>QV = FRT * UI
</code></pre>

python math input floating-point integer