Please how to use python and calculate a percentage

I am doing a work with a function, like:

def solve():
    x = 
    int(input("percentage of"))
    Answer = x %
    print(Answer)
solve()

I want the user to enter a number and it will print the percentage of that number, but the above code is not working.



Read more here: https://stackoverflow.com/questions/64900565/please-how-to-use-python-and-calculate-a-percentage

Content Attribution

This content was originally published by JamexTech at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: