title: I am trying to create a code that is able to calculate what grade a person needs to get on a test in order to get their ideal overall grade
body: <p>I was having problems with my equation, and the accuracy of the output after you input a certain value</p>
  <pre><code>Ideal= int(input(&quot;What grade do you want on your next assignment?&quot;))
  
  Current= int(input(&quot;What is your current grade in the class?&quot;))
  weight =  int(input(&quot;how much of your grade is the assignment worth?&quot;)) 
  
  weight=float(weight)/100
  
  print weight
  
  
  Final_grade = Ideal - (( 1 - weight ) * Current) / weight
  
  if Final_grade &lt;0:
      print &quot;You would have to get a negative grade to get that number, which is impossible&quot; 
  elif Final_grade&gt;0:
      print &quot;You will need to get a&quot; ,round(Final_grade,2)  ,&quot;%&quot;, &quot;on your next assignment to recieve a&quot; , Ideal ,&quot;%&quot; &quot;in this class&quot;
  else:
      print &quot;number is invalid&quot;
  </code></pre>