This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

14 lines
443 B
Python

wbs = input("Enter the WBS types:")
if (not wbs):
print("No input or empty string.")
elif wbs.isupper() == False:
print("Input is not in uppercase.")
else:
n = wbs.count("N")
l = wbs.count("L")
m = wbs.count("M")
total = n+l+m
print("Proportion of N: ", round((n/total)*100), "percent")
print("Proportion of L: ", round((l/total)*100), "percent")
print("Proportion of M: ", round((m/total)*100), "percent")