31.6k views
0 votes
Create one Python module: arithmetic which has two functions: add(x, y) and get_length(x). The description of two functions are below: def add(x, y): # add two numbers def get_length(x): # return the length of a given stringCreate one Python module: arithmetic which has two functions: add(x, y) and get_length(x). The description of two functions are below: def add(x, y): # add two numbers def get_length(x): # return the length of a given string

User Ernelli
by
6.0k points

1 Answer

1 vote

Answer:

def add(x,y):

print(x+y)

def get_length(x):

return len(x)

add(17,19)

print(get_length("harry potter"))

#or you can also take some user input

x=int(input("please enter an integer: "))

y=int(input("please enter an integer: "))

add(x,y)

x1=input("please enter any string: ")

print(get_length(x1))

Step-by-step explanation:

in python3 programming language

User Gyrolf
by
6.2k points