Python Quiz 2

Python Quiz 2

Professional Development

34 Qs

quiz-placeholder

Similar activities

Bob's Quiz

Bob's Quiz

Professional Development

36 Qs

SOAL DATABASE PART 2

SOAL DATABASE PART 2

1st Grade - Professional Development

30 Qs

Ôn tập Tin học lớp 4 học kì 1

Ôn tập Tin học lớp 4 học kì 1

Professional Development

30 Qs

La recepción y ubicación de mercancías

La recepción y ubicación de mercancías

Professional Development

30 Qs

Python_Basics_1

Python_Basics_1

Professional Development

30 Qs

St.JOSEPH'S HCL TECH PLACEMENT PRACTICE TEST-1 @ 19/7/25 FN

St.JOSEPH'S HCL TECH PLACEMENT PRACTICE TEST-1 @ 19/7/25 FN

Professional Development

30 Qs

GSS Week 3

GSS Week 3

9th Grade - Professional Development

34 Qs

TallyPrime Quiz

TallyPrime Quiz

Professional Development

30 Qs

Python Quiz 2

Python Quiz 2

Assessment

Quiz

Other

Professional Development

Hard

Created by

21RU5A0505 KRISHNAVENI

Used 1+ times

FREE Resource

34 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following functions is not a built-in functional programming tool in Python?

map()

filter()

reduce()

sorted()

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is The map() function in Python

Filters elements based on a condition

Transforms each element using a function(apply on each element)

Reduces a sequence to a single value

Sorts a sequence

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which import is required to use reduce() in Python?

import collections

import itertools

from functools import reduce

from operator import reduce

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the correct syntax of a lambda function?

Note:Without Storing in a variable

lambda (x, y): x + y

lambda x, y: x + y

def lambda(x, y): return x + y

def (x, y): return x + y

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will the following code output?

f = lambda x: x * 2

print(f(5))

5

10

25

error

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following statements about lambda is TRUE?

lambda can contain multiple return statements.

lambda can take multiple arguments but only one expression.

lambda is faster than normal functions.

lambda must always be named.

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What does the code return?

add = lambda a, b=10: a + b

print(add(5))

5

10

15

Error

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?