Python Quiz 2

Python Quiz 2

Professional Development

34 Qs

quiz-placeholder

Similar activities

Over the moon movie

Over the moon movie

KG - Professional Development

29 Qs

Drafting by Sir AL

Drafting by Sir AL

Professional Development

30 Qs

April

April

Professional Development

31 Qs

Pengendali elektromagnetik

Pengendali elektromagnetik

Professional Development

30 Qs

PERTEMUAN FKTP FKRTL PEKANBARU

PERTEMUAN FKTP FKRTL PEKANBARU

Professional Development

30 Qs

Pendidikan Moral ting 2

Pendidikan Moral ting 2

5th Grade - Professional Development

30 Qs

PJK TINGKATAN 2 BOLA BALING

PJK TINGKATAN 2 BOLA BALING

1st Grade - Professional Development

30 Qs

Tìm hiểu Nghị quyết- Final

Tìm hiểu Nghị quyết- Final

Professional Development

36 Qs

Python Quiz 2

Python Quiz 2

Assessment

Quiz

Other

Professional Development

Hard

Created by

21RU5A0505 KRISHNAVENI

Used 1+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?