Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do I show a percent in Python? I have a homework problem but I need the output to be in dollars and cents. #

How do I show a percent in Python? I have a homework problem but I need the output to be in dollars and cents. # Variable declaration(s) and initialization
w1=23
w2=12
3=17
# Constant declaration(s) and initialization
ship_cost =15.00
ship_discount =5
ship_discount2=2.5
# Input
package_a = int(input('Enter weight of package 1: '))
package_b = int(input('Enter weight of package 2: '))
package_c = int(input('Enter weight of package 3: '))
# Calculations
package_weight =w1+w2+w3
if package_weight =100 :
total_cost = ship_cost **0.05
elif package_weight >100 :
total_cost = ship_cost **0.025
total_ship = package_weight ship_cost - total_cost
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

What are the purposes of promotion ?

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago