Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Solve using Python Programming. 1. DepreciationFor tax purposes an item may be depreciated over a period of several years, n . With the straight-line

Please Solve using Python Programming.

1. DepreciationFor tax purposes an item may be depreciated over a period of several years, n. With the straight-line method of depreciation, each year the item depreciates by (1/n)(1/n)th of its original value. With the double-declining-balance method of depreciation, each year the item depreciates by (2/n)(2/n)ths of its value at the beginning of that year. (In the final year it is depreciated by its value at the beginning of the year.) Write a program that performs the following tasks:

Request a description of the item, the year of purchase, the cost of the item, the number of years to be depreciated (estimated life), and the method of depreciation.

Display a year-by-year description of the depreciation. See Fig. 4.38.

Enter name of item purchased: computer Enter year purchased: 2012 Enter cost of item: 2000 Enter estimated life of item (in years): 5 Enter method of depreciation (SL or DDB): DDB Description: computer Year of purchase: 2012 Cost: $2,000.00 Estimated life: 5 years Method of depreciation: double-declining balance Value at Amount Deprec Total Depreciation Beg of Yr. During Year to End of Year 2012 2,000.00 800.00 800.00 2013 1,200.00 480.00 1,280.00 2014 720.00 288.00 1,568.00 2015 432.00 172.80 1,740.80 2016 259.20 259.20 2,000.00

FIGURE 4.38 Possible outcome

2. Alphabetical OrderThe following words have three consecutive letters that are also consecutive letters in the alphabet: THIRSTY, NOPE, AFGHANISTAN, STUDENT. Write a program that accepts a word as input and determines whether or not it has three consecutive letters that are consecutive letters in the alphabet. The program should use a Boolean-valued function named isTripleConsecutive that accepts an entire word as input. Hint: Use the ord function. See Fig. 4.39.

Enter a word: HIJACK HIJACK contains three successive letters in consecutive alphabetical order.

FIGURE 4.39 Possible outcome

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

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

a. Do team members trust each other?

Answered: 1 week ago

Question

Define the term Working Capital Gap.

Answered: 1 week ago

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago