Jan-26-2018, 09:06 PM
Just started Intro to Programming Logic and am having a little trouble understanding modules. Here is the instructional video https://www.youtube.com/watch?time_conti...CZqQ6xEzoY, and I have read up on functions, calling, and returning. Just still a little confused on how to turn this
# Declare Real purchase
#
# Display "Please enter the amount of your purchase."
# Input purchase
# Declare Real state_sales_tax
# Declare Real county_sales_tax
# Declare Real total_after_state_sales_tax
# Declare Real total_after_county_sales_tax
# Declare Real full_amount
#
# Set state_sales_tax = 0.04
# Set county_sales_tax = 0.02
# Set total_after_state_sales_tax = state_sales_tax * purchase
# Set total_after_county_sales_tax = county_sales_tax * purchase
# Set full_amount = total_after_state_sales_tax + total_after_county_sales_tax + purchase
# Display "State tax adds", total_after_state_sales_tax, "to your original purchase of", purchase,
# Display "and county tax adds", total_after_county_sales_tax, "which comes to a grand total of", full_amount
purchase = int(input("Please enter the amount of your purchase."))
state_sales_tax = 0.04
county_sales_tax = 0.02
total_after_state_sales_tax = state_sales_tax * purchase
total_after_county_sales_tax = county_sales_tax * purchase
full_amount = total_after_state_sales_tax + total_after_county_sales_tax + purchase
print("State tax adds", total_after_state_sales_tax, "to your original purchase of", purchase,
"and county tax adds", total_after_county_sales_tax, "which comes to a grand total of", full_amount)into a modular form. Please help!
