Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (anonymous):

The boolean function qualifyForDiscount uses the customer number to determine if the customer qualifies for a discount. All customers identified by a customer number starting with a zero ('0') qualify for discount. How can I combine a char variable and a boolean variable? very very confused!

OpenStudy (rsmith6559):

Customer number is a string, so you just need to see if customerNumber == '0'. If it does, the function returns True, if not False.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!