Funções de matemática em Python
import math
x = dir(math)
print(x)
Rick Astley
import math
x = dir(math)
print(x)
import math
print(math.sqrt(4))
#math function in python:
def math(x,y):
z = x * y
return z
A = math(7,8)
print(A)
#math in python: Multiple action
x = int(input("Type value for x: "))
y = int(input("Type value for y: "))
z = int(input("Type value for z: "))
print(x * y + z)
#you need multiple solution at once.
#Go ahead and copy the code to your
# .py script to see the results.
#math in python: Multiple action
x = int(input("Type value for x: "))
y = int(input("Type value for y: "))
z = int(input("Type value for z: "))
print(x / y + z)
#you need multiple solution at once.
#Go ahead and copy the code to your
# .py script to see the results.
x = int(10)
y = int(5)
print(x * y)
#you need to add integer extra otherwise
# python will count this as a str and won't work.
#copy the code to your py script to see the accurate result.