Question: python - is there a way to add 2 functions. for example, if the two functions both output an integer how do I add the
python - is there a way to add 2 functions. for example, if the two functions both output an integer how do I
add the 2 together and output the sum
import random
def a():
a = random.randint(1,10)
b = random.randint(1,10)
sum1 = a+b
def y():
i = random.randint(1,10)
p = random.randint(1,10)
sum2 = i+p
y()+a()
(in the image i mesnt to type 'y() + a()'
import random def a(): a = random. randint(1,10). b = random.randint(1,10) sum1 = a+b LALALALALALALALALALALALA EEEOoo vou A WNA def y(): i = random. randint(1,10), p = random.randint(1,10). sum2 = i+p y() +x() 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
