title: Loop to add more input
body: <p>I have 3 more cars that I have but I need to know how to loop things like the car input so it will allow you to input it again if you do the wrong input same thing with the extras so they have to be either 1 or 0.</p>
  <pre><code>print(&quot;===================================================&quot;) 
  print(&quot;==============Car Finance Calculations=============&quot;) 
  print(&quot; Choose your veicle: &quot;)
  print(&quot; SUV type 1 &quot;)
  print(&quot; Hatch type 2 &quot;)
  print(&quot; Sedan type 3 &quot;)
  print(&quot;===================================================&quot;)
  caaaaaaaar = int(input(&quot; Please enter Which car you want to finance: &quot;))
  years = int(input(&quot; enter years of loan either 3 or 4 or 5 Years: &quot;))      
  if caaaaaaaar == 1:                                             
      carsvalue = int(input(&quot;Please enter you cars value: &quot;))    
      residual = carsvalue * 0.30                                               
      financing = carsvalue - residual                            
      print(&quot; financing value for the car is: &quot;, round(financing,2))      
      print(&quot; Intrest rate is 9% &quot;)                               
      n = years * 12                                              
      r = 9 / (100 * 12)                                         
      Financingcost = financing * ((r*((r+1)**n))/(((r+1)**n)-1)) 
      print(&quot; Your Montly financing rate is: &quot;, round(Financingcost,2))    
      print(&quot;================================================================================&quot;)
      print(&quot;Please Choose extras: &quot;)                                   
      print(&quot;======================================================&quot;)
      print(&quot; If you would like fuel type 1 if not type 0&quot;)
      print(&quot; If you would like insurance type 1 if not type 0&quot;)
      print(&quot; if you would like Maintenance type 1 if not type 0&quot;)
  
      print(&quot;======================================================&quot;)
  
      if caaaaaaaar == 1:
          x, y, z = [int(x) for x in input(&quot;Enter Your extras with spaces:&quot;).split()] 
  
      print(&quot;=======================================&quot;)
  
      if x == 1:                                           
          print(&quot;Yes you want fuel&quot;)                       
          fuelcost = 80 * 4.33                            
          print(&quot;fuel cost is&quot;, round(fuelcost,2))                  
   
      if x == 0:                                           
          print(&quot;you dont want fuel as an extra&quot;)          
          fuelcost = 0                                    
          print(&quot;Fuel cost is: &quot;, fuelcost)               
  
      print(&quot;=======================================&quot;)   
  
      if y == 1:                                          
          print(&quot;yes you want insurance&quot;)                  
          insurancecost = (1200 / 12)                      
          print(&quot;Insurance cost is: &quot;, round(insurancecost,2))      
  
      if y ==0:                                            
          print(&quot;you dont want insurance&quot;)                 
          insurancecost = 0                                
          print(&quot;insurance cost is: &quot;,insurancecost)       
  
      print(&quot;=======================================&quot;)     
  
      if z == 1:                                          
          print(&quot;yes you want maintenance&quot;)               
          maintenancecost = (100 * 1)                     
          print(&quot;Maintenance cost is: &quot;, round(maintenancecost,2))  
  
      if z == 0:                                           
          print(&quot;you dont want maintenance&quot;)              
          maintenancecost = 0                              
          print(&quot;maintenance cost is: &quot;,maintenancecost)   
      print(&quot;=======================================&quot;)
    
  
      total_cost_for_extras = fuelcost + maintenancecost + insurancecost       
      print(&quot;Total cost for the selected extras is: &quot;, round(total_cost_for_extras,2))  
      TOTALFOREVERYTHING = total_cost_for_extras + Financingcost              
      print(&quot;Total monthly financing rate is: &quot;, round(TOTALFOREVERYTHING,2))          
  </code></pre>