Getting There


#1

I was just wondering why you don't use "" around the number in this like in the example? is it because the example uses strings and the actual problem the numbers are considered integers?

def fruit_color(fruit):
if fruit == "apple":
return "red"
elif fruit == "banana":
return "yellow"
elif fruit == "pear":
return "green"


#2

at this point, you should know the difference between integers and strings. "234" will be a string.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.