8ngwbwr8cf 8ngwbwr8cf
  • 08-08-2021
  • Computers and Technology
contestada

Input two numbers and work out their sim, subtraction, multiplication, division, remainder, average and sum of the squares of the numbers.

Respuesta :

onika92 onika92
  • 08-08-2021

def ultimate_math (num1, num2):

try:

array_num = [num1, num2]

print (num1 + num2)

print (num1 - num2)

print (num1 * num2)

print (num1 / num2)

print (num1 % num2)

print ((num1 + num2) / (len(array_num)))

print ((num1**2) + (num2**2))

except ValueError:

return "Invalid Input"

user_num1 = float (input (" Please enter a num: "))

user_num2 = float (input (" Please enter a second num: "))

print (ultimate_math (user_num1, user_num2))

Answer Link

Otras preguntas

Think of a famous Hindu person. How does (or did) this person’s beliefs influence his or her actions? I chose Mahatma Gandhi but I don’t know why his beliefs in
Please help asap 30 pts
If a and b are integers and 71 < ab < 76, then all of the following could be the values of b except: (A) 18 (B) 8 (C) 12 (D) 7
Which word is the plural form of el borrador? (4 points)
Please help asap 35 pts
I need help with this problem please
please help i dont get it
15. What is the MOST LIKELY reason that historic sites like the Palace of Westminister were built along the Thames? A. The river was a place of recreation B. Th
why is high blood pressure needed
USING ROA FORMULA , ANSWER IS IN % FORM. IM STUMPED. THE ABC COMPANY HAS NET INCOMEO OF $56K, ASSETS AT THE BEGINNING OF THE YEAR ARE $263K, AND ASSETS AT