02-05-2010, 10:41 PM
(02-05-2010, 10:30 PM)Аноним Интерфейс Wrote: This is how I would have coded it.
Code:#setting input variables
x=raw_input('Is the water salted?<yes/no>\n>>> ')
y=raw_input('What is the temperature?\n>>> ')
#processing variables
if (x is 'no' and y >= 0):
print('>>> the water will freeze')
elif (x is 'yes' and y > 10):
print('>>> the water will freeze')
else:
print('>>> the water will not freeze')
Eh, either one of our codes work, I personally don't care for the ">>>"'s and the parentheses and comments aren't really necessary but whatever floats your boat I guess.
(02-05-2010, 09:04 PM)Kharnage Wrote: I live in New York and it's for highschool credits.Me too! you live in the city or what? I really don't want to say where I live on the Internet but it's in one of the 5 boroughs