| | |
Help with calculating a percent amount
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Mar 2006
Posts: 2
Reputation:
Solved Threads: 0
Hi everyone, I am new to python and programming in general and I could use some help on converting an integer to a decimal (e.g. 80% to .8). Here is what I have so far but as I'm sure you can tell, it doesn't work:
The program calculates coverage amounts for various employee benefits like LTD, STD, Life Insurance. In order to calculate STD I need to convert the percent amount to a decimal. Any ideas on what I can do here?
Python Syntax (Toggle Plain Text)
elif menu_choice == 2: print 'You chose to calculate Short Term Disability\n' print 'Enter the annual salary: $' annual_salary = input('Annual Salary: $') print 'Enter the coverage percent: ' coverage_percent = input('Coverage Percent: %') print 'The amount is: $',annual_salary*(coverage_percent/100) print_menu()
![]() |
Similar Threads
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- Simple while loop in c++ (C++)
- New to programming (C++)
- Calculate the amount of time in the linux process using perl script (Perl)
- Amount of space for backup limited by Windows (Windows NT / 2000 / XP)
Other Threads in the Python Forum
- Previous Thread: Convert from JAVA/JSP to Python
- Next Thread: problem in finding and replacing a word in python
| Thread Tools | Search this Thread |
Tag cloud for Python
accessdenied apache application argv beginner book change code color converter dictionary dynamic edit editing enter examples excel file filename float format ftp function gui homework import inches input java keyboard lapse library line lines linux list lists loop microphone mouse movingimageswithpygame mysql newb number numbers numeric output parameters parsing path phonebook port prime program programming projects py2exe pygame pyopengl pyqt python random recursion recursive redirect remote reverse scrolledtext server session simple smtp software sprite ssh statictext string strings syntax table tennis terminal text thread threading time tkinter tlapse trick tuple tutorial ubuntu unicode unit urllib urllib2 variable windows wordgame wxpython






