Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Python functions getting started
from cs50 import get_int
def main():
x = get_int("Give me a number please: ")
print(
f"{x} to the power of 5 equals "
f"{powerOfFive(x)}. Wow that is "
"probably a big number!")
def powerOfFive(x):
return x**5;
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment