Percentage Calculator
February 27, 2018
This script will ask you to enter your amount and the percentage to be deducted before finally giving you the new amount.
# -*- coding: utf-8 -*-
def percentage(input_sum, divide, calc):
return input_sum / divide * calc
def reduction(input_sum, answer):
return input_sum - answer
input_sum = float(raw_input("\nEnter sum total: "))
calc = float(raw_input("\nEnter Percentage: "))
answer = percentage(input_sum, 100, calc)
reduction_total = reduction(input_sum, answer)
print "\nYou are left with £{0:.2f}\n".format (reduction_total)
Recent Entries
- Jurassic World Rebirth July 02, 2025
- Vintage Adverts July 02, 2025
- Ready Player One June 29, 2025