Question: 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
 How do I show a percent in Python? I have a

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!