02 Enter Item 3 Toothpaste Enter Item 3 monthly amount 002 Enter Item 4 Rent

# 02 enter item 3 toothpaste enter item 3 monthly

This preview shows page 1 - 2 out of 2 pages.

Enter Item 2 monthly amount: 5.02 Enter Item 3: Toothpaste Enter Item 3 monthly amount: 0.02 Enter Item 4: Rent Enter Item 4 monthly amount: 350 Enter Item 5: Yoga lessons Enter Item 5 monthly amount: 9.95 Monthly Budget ================================================= Item Month Year ================================================= Food \$ 50.55 \$ 606.60 Coding \$ 5.02 \$ 60.24 Toothpaste \$ 0.02 \$ 0.24 Rent \$ 350.00 \$ 4200.00 Yoga lessons \$ 9.95 \$ 119.40 ================================================= Totals \$ 415.54 \$ 4986.48 Min value = 0.02 Max value = 350.00 Average value = 83.11 """
# Add your code here # inputs from user item1 = input('Enter Item 1:') price1 = float(input('Enter item 1 monthly amount:')) item2 = input('Enter Item 2:') price2 = float(input('Enter item 2 monthly amount:')) item3 = input('Enter Item 3:') price3 = float(input('Enter item 3 monthly amount:')) item4 = input('Enter Item 4:') price4 = float(input('Enter item 4 monthly amount:')) item5 = input('Enter Item 5:') price5 = float(input('Enter item 5 monthly amount:')) # variable to code spaces between items s = ' ' # math for end of display mTotal = sum((price1, price2, price3, price4, price5)) # displaying input print('Monthly Budget') print('=' * 50) print('{:<19} {:^14} {:>15}'.format('Item', 'Month', 'Year')) print('=' * 50) print(f'{item1:<17} \$ {price1:>8.2f} {s * 10} \${price1 * 12:>8.2f}') print(f'{item2:<17} \$ {price2:>8.2f} {s * 10} \${price2 * 12:>8.2f}') print(f'{item3:<17} \$ {price3:>8.2f} {s * 10} \${price3 * 12:>8.2f}') print(f'{item4:<17} \$ {price4:>8.2f} {s * 10} \${price4 * 12:>8.2f}') print(f'{item5:<17} \$ {price5:>8.2f} {s * 10} \${price5 * 12:>8.2f}') print('=' * 50) print(f'Totals {s * 11} \$ {mTotal:>8.2f} {s * 10} \${mTotal * 3:>8.2f}') print('') print(f'Min value {s * 4}= {min(price1, price2, price3, price4, price5):.2f}') print(f'Max value {s * 4}= {max(price1, price2, price3, price4, price5):.2f}') print('Average value =', mTotal / 4)

#### You've reached the end of your free preview.

Want to read both pages?

• Spring '18
• price1, Elinore Wickard

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes