<div>Hi all, this is my first program in python.</div>
<div> </div>
<div>It's a currency converter mini-program, but I am not getting the desired output. What wrong am I doing here?</div>
<div> </div>
<div><strong>Program code:</strong></div>
<div> </div>
<div>#converts currencies to Indian rupees</div>
<div>
<p>def print_options():<br> print "Options:"<br> print " 'p' print options"<br> print " 'c' convert from US Dollars to Indian Rupees"<br> print " 'f' convert from Swedish Kronors to Indian Rupees"
<br> print " 'g' convert from British Pound Sterling to Indian Rupees"<br> print " 'q' quit the program"</p>
<p>def rupees_from_dollars(c_doll):<br> return 43*1 --<strong>The function is supposed to multiply the value of dollars x 43(value of an Indian rupee)<br></strong>def rupees_from_kronor(f_kron):<br> return 8*f_kron --
<strong>The function is supposed to multiply the value of kronor x 8(value of an Indian rupee)</strong><br>def rupees_from_pounds(g_pound):<br> return 68*g_pound --<strong>The function is supposed to multiply the value of pounds x 68(value of an Indian rupee)
</strong><br></p>
<p>choice = "p"<br>while choice != "q":<br> if choice == "c":<br> Rupees = input("US Dollars:")<br> print "Rupees:",--<strong>The problem is here: I only get Rupees but not the value multiplied as stated in the function.
</strong><br> elif choice == "f":<br> Rupees = input("Swedish Kronor:")<br> print "Rupees:" --<strong>The problem is here: I only get Rupees but not the value multiplied as stated in the function.
</strong><br> elif choice == "g":<br> Rupees = input("UK Sterling:")<br> print "Rupees:"--<strong>The problem is here: I only get Rupees but not the value multiplied as stated in the function.
</strong><br> elif choice != "q":<br> print_options()<br> choice = raw_input("option:")<br></p>
<p>-----------------------------------------</p>
<p>Much appreciate your help!</p>
<p>VikasM</p></div>
<div><strong></strong> </div>
<div><strong></strong> </div>