Putting a variable value into a input's string
<p>Is there anyway to have a variable be in the string of an input?</p>

<pre><code>score = float(input("Test", grade, "-- Enter score: "))
</code></pre>

<p>I keep getting:</p>

<p>TypeError: input expected at most 1 arguments, got 3</p>

<p>Your error is because the input function received more than 1 argument. It received:</p>

<ol>
<li>"Test"</li>
<li>grade</li>
<li>"-- Enter score: "</li>
</ol>

<p>You need to combine those three elements into one, the best way would be using a formatter (%), allowing Python to interpret it as one string:</p>

<pre><code>score = float(input("Test %d -- Enter score: " % grade))
</code></pre>

python variables input