Andrew K.

asked • 01/28/21

Conditionals_OneWay

Write One Way Python If statements based on the statements below. Submit one .py file of all IF statements. Please declare the variables for each problem.

– If string variable taxCode is ’T’, increase price by adding the taxRate percentage of price to it.

- if integer variable X is less than 10, multiply the value of X by 5.

– If integer variable opCode has the value 1, read in float values for X and Y and calculate and print their sum.

- if boolean variable ace is not true, print out the phrase 'Not an ace'.


1 Expert Answer

By:

Patrick B. answered • 01/28/21

Tutor
4.7 (31)

Math and computer tutor/teacher

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.