Wow, that was a quick response! Thanks all!<br><br>I have looked at a couple tutorials and whipped this up. However, attempting to run it in IDLE results in a syntax error leaving my elif highlighted in red. What's wrong? I've looked at the code and can't find any syntax errors- though I've just started.<br>
<br>print("[Temperature Converter, First Edition]")<br>print("Created on January 17th, 2009 by Ian Egland")<br>temp1 = int(input("Please enter a temperature: "))<br>scale = input("Convert to (F)ahrenheit or (C)elcius?")<br>
if scale == "F":<br> temp2 = (9/5)*temp1+32<br> print(temp1, "C =", temp2, "F"<br>elif scale == "C": # Error appears here.<br> temp2 = (5/9)*(temp1-32)<br> print(temp1, "F =", temp2, "C"<br>
else:<br> print("Sorry, you must enter either an F or a C. Case-sensitive. Please try again."<br><br><br>In regards to learning python, I've found that after I get somewhat-familiar with a language, I want a programming problem to solve with what I've learned. While learning Java, <a href="http://www.javabat.com">http://www.javabat.com</a> has been my best friend. (That is, as close to a best friend as programming website can be.)<br>
Is there something like this for Java? Is one in the works?<br><br>-Ian<br>