This is in python 3.3, Software sales. I am new to programming - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

This is in python 3.3, Software sales. I am new to programming

ClintmClintm North CarolinaPosts: 1Member
edited February 2 in Python

A software company sells a package that retails for 99$. Quantity discounts are given according to the following table. 10-19=20% 20-49=30% 50-99= 40% 100 or more =50% . write a program that ask the user to enter the number of packages purchased. the program should then display the amount of the discount (if any) and the total amount of the purchase after the discount.

Answers

  • swagrexx_17swagrexx_17 Boston, MAPosts: 4Member

    This is actually pretty simple, I'm a beginner too so there isn't much for me to lose.

    I would start by defining a function or getting an input, and store it in a temp. variable. Use a couple conditionals to check the value of this variable. For example, if I input 15 as my # of packages, then the program would check and see that it is between 10 and 19. As a result, the program should output 20%. To display the final price use this.

    Final=(#ofpkgs99)-(outputfromprevious(#ofpkgs*99)) It just subtracts the discount from the total price

Sign In or Register to comment.