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

python - is there a way to add 2 functions. for example, 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!