Interactive assignement

.docx

School

Ashford University *

*We aren’t endorsed by this school

Course

200

Subject

Information Systems

Date

Jan 9, 2024

Type

docx

Pages

1

Uploaded by JusticeArtEagle28

Report
>>> print(" This program will display a 19% profit based on the sales number entered by the user.") This program will display a 19% profit based on the sales number entered by the user. >>> userInputString=input("Enter amount of sale:") Enter amount of sale:34707 >>> userOriginalSale=float(userInputString) >>> profit=(19/100)*userOriginalSale >>> print("Profit Amount:$",profit) Profit Amount:$ 6594.33 Overall, this process is new for me, since I do not have much programming experience. I have dabbled in some Java and C++ for my Associates Degree but that was years ago. However, from what I have encountered so far, while it still seems a bit confusing, Python does seem a bit easier to understand than other programming languages. I began with a print line explaining what the program was supposed to do. I stated that the program would show a profit of 19% based on a sales number entered by the user. The input is displayed by the userInputString and shows the line of code where the user would “Enter amount of sale”. The next line of code takes the user’s original sale amount and converts it to a float (integer to a decimal place) and incorporates the unserInputString. The next line of code displays the profit at 19% calculated by 19/100, multiplied by the userOriginalSale. The output is the result of the print command which displays the profit amount in “$” based on the last line of code. This profit is displayed at 19% of the sales amount entered by the user.
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help