Python functions getting started
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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