Lochan A.

asked • 09/02/21

Alternative for if and conditional statement in python

So my problem is that I need to make a receipt to calculate the total cost and I have been given 2 option each option has different price like for example.


first = 5$

second= 10$


third = 5$

fourth = 10$


total is either first or third , first or fourth , second or third and second or fourth.So the problem is that I cant use if or any other conditional statement and I need to find the total cost of either of these. first or third , first or fourth , second or third and second or fourth


1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.