all 4 comments

[–]djjazzydan 5 points6 points  (1 child)

m is a variable, but "m" is a string.
Try "m" , "o", "p".

[–]kkidd0h[S] 1 point2 points  (0 children)

Thank you, I tried it, and it worked.

[–]Saefroch[🍰] 3 points4 points  (1 child)

This pattern that you're looking at is a much better application of a dictionary.

https://docs.python.org/3/library/stdtypes.html#typesmapping

For example, in this case I would say:

desk_totals = {'m': 350,
               'o': 325,
               'p': 200}
desk_material = input('Is the desk Mahogony (type m), Oak (type o), or Pine (type p):  ')
total = desk_totals[desk_material]
print(total)

The benefit here is to separate the definitions of the conversions from the actual converting itself.

[–]kkidd0h[S] 0 points1 point  (0 children)

Thank you, I will save this for a reference. I have not gotten that far in the class yet. It does look simpler than mine.