Jan-13-2019, 01:01 PM
I think because a can't be (for example) 'milk' and 'MILK' so to fix that problem you can write:
For more explanation:
https://www.tutorialspoint.com/python/string_lower.htm
The full working code is in the spoiler but try it yourself first :)
x="milk" y="sugar" z="tea" t="coffee"but ofcours the user can write it as Coffee or COFFEE so we have to rule out any upper case characters. You can modify a string by using .lower() or .upper() to change the whole string to upper or lower case. So to change the input to all lower case it would be a = input().lower().
For more explanation:
https://www.tutorialspoint.com/python/string_lower.htm
The full working code is in the spoiler but try it yourself first :)