Skip to content

Instantly share code, notes, and snippets.

@mjcarnaje
Created March 2, 2022 23:50
Show Gist options
  • Save mjcarnaje/7db921dd0a1fe66f127024e8a4049504 to your computer and use it in GitHub Desktop.
Save mjcarnaje/7db921dd0a1fe66f127024e8a4049504 to your computer and use it in GitHub Desktop.
"""
ord - return the Unicode code point for a one-character string.
pow - is a built in function that takes two arguments
the first argument is the number to be raised to the power of the second argument
"""
w = ord('L')
x = ord('y')
y = ord('n')
z = ord('n')
def computer_equation(x) -> int:
first_term = 5 * (pow(x, 3) / 2)
second_term = 3 * pow(x, 2)
term_term = 11
return first_term + second_term + term_term
print(computer_equation(w))
print(computer_equation(x))
print(computer_equation(y))
print(computer_equation(z))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment