Skip to content

Commit a8a3f67

Browse files
committed
Added a percentage alogrithm
1 parent 68473af commit a8a3f67

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

maths/percentage_calculator.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def calculate_percentage(value, percent):
2+
return (value * percent) / 100
3+
4+
5+
value = float(input("Enter value: "))
6+
percent = float(input("Enter percentage: "))
7+
8+
result = calculate_percentage(value, percent)
9+
10+
print("Result:", result)

0 commit comments

Comments
 (0)