SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Tony Gaddis
Chapter:
Simple Functions
Exercise:
Programming Exercises
Question:5 | ISBN:9780132576376 | Edition: 2

Question

A county collects property taxes on the assessment value of property, which is 60 per-cent of the property’s actual value. For example, if an acre of land is valued at $10,000,its assessment value is $6,000. The property tax is then 64¢ for each $100 of the assess-ment value. The tax for the acre assessed at $6,000 will be $38.40. Write a program that asks for the actual value of a piece of property and displays the assessment value and property tax.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

Code:

# Create a function named assessment().
# This function is used to get the property tax.
def assessment(assessment_value):
    # Calculate the property tax.
    # Property_tax=$0.64 for every $100 of assessment_value.
    property_tax = assessment_value * 0.0064
    print ('The property tax is $%.2f' % property_tax)

# Create a function named property().
# This function is used to get the property value.
def property(property_value):
    # Calculate the property's assessment value
    # using the actual value.
    # assessment_value=actual_value*60%
    assessment_value = property_value * 0.6
    print('The assessment value is $%.2f' % assessment_value)
    assessment(assessment_value)

# Create a main() function.
def main():
    # Ask for the property's actual value.
    property_value = float(input("Enter the property's actual value: "))
    property(property_value)
    
# Call the main function.
main()

 

Output:

Enter the property's actual value: 500000
The assessment value is $300000.00
The property tax is $1920.00
>>>

0 0

Discussions

Post the discussion to improve the above solution.