Skip to content

Instantly share code, notes, and snippets.

@sojohnnysaid
Last active January 19, 2021 22:56
Show Gist options
  • Save sojohnnysaid/c7308fef412e685cecf9c376d9146923 to your computer and use it in GitHub Desktop.
Save sojohnnysaid/c7308fef412e685cecf9c376d9146923 to your computer and use it in GitHub Desktop.
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