Professional Documents
Culture Documents
Selection (Ex)
Selection (Ex)
2.The input number should has either one digit (e.g. 5), two
digits (e.g. 36), three digits (e.g. 149) or four digits (e.g. 8567).
Write a python program, which
accept input number
outputs this number has one digit or two digits or three dights or four
digits or other.
3.Each house owner must pay tax based on the value of the house. Houses over $
200000 pay 2% of their value in tax, houses over $ 100000 pay 1.5% of their value
in tax and houses over $ 5000 pay 1% of their value in tax. All others pay no tax.
Write an algorithm to solve the problem using.
4. Tickets are sold for a concert at $20 each, if 10 tickets are bought then
the discount is 10%, if 20 tickets are bought the discount is 20%. No
more than 25 tickets can be bought in a single transaction.
Write a program to calculate the cost of buying a given number of tickets.