Question: 1) Write a tax calculator. (in python) Define a variable called price, and assign a float value (cost of a burrito) to price. Define a

1)

Write a tax calculator. (in python)

  1. Define a variable called "price", and assign a float value (cost of a burrito) to "price".
  2. Define a variable called "taxRate", and assign a percentage value to "taxRate" (use the sales tax rate for California).
  3. Define a variable called "tax", and assign a 0 to it
  4. calculate the tax using equation: tax = price * taxRate.
  5. Print out the string "The tax is:" and the tax value on the same line.

2)

Get user input and convert to different base. (in python)

  1. Use the input statement to ask the user to input an integer (decimal number with no decimal point).
  2. Print out "the number you entered is: " and print out the number they entered.
  3. Print out "Your number in binary is: " and print out the answer on the same line (in binary).
  4. Print out "Your number in hexadecimal is: " and print out the answer on the same line (in hexadecimal).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!