Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Python Quiz – Functions

Python Quiz Python Quiz


x = True

def printLine(text):

    print(text, 'Runoob')

printLine('Python')



def greetPerson(*name):

    print('Hello', name)

  

greetPerson('Runoob', 'Google')



result = lambda x: x * x

print(result(5))



def Foo(x):

    if (x==1):

        return 1

    else:

        return x+Foo(x-1)



print(Foo(4))



numbers = [1, 3, 6]

newNumbers = tuple(map(lambda x: x , numbers))

print(newNumbers)

Python Quiz - Functions

at the beginning

Python Quiz Python Quiz