TIU Quiz-9

TIU Quiz-9

University

10 Qs

quiz-placeholder

Similar activities

Bài tập trắc nghiệm C++(tiếp)

Bài tập trắc nghiệm C++(tiếp)

3rd Grade - University

10 Qs

Google Docs

Google Docs

5th Grade - University

13 Qs

 QUIZ  MS Core Java Quiz-3 2023

QUIZ MS Core Java Quiz-3 2023

University

11 Qs

Microsoft Word

Microsoft Word

University

12 Qs

Fundamentals of Algorithms - Unit 1 - Test 1

Fundamentals of Algorithms - Unit 1 - Test 1

University

15 Qs

GAMTEK - PERTEMUAN 2

GAMTEK - PERTEMUAN 2

University

10 Qs

python quiz

python quiz

6th Grade - Professional Development

10 Qs

Java History Characteristics Environment

Java History Characteristics Environment

University

12 Qs

TIU Quiz-9

TIU Quiz-9

Assessment

Quiz

Computers

University

Medium

Created by

Rahul Mahato

Used 7+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

10

5

lambda x: x * 2

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct implementation of list comprehension to create a list of squares of numbers from 1 to 5?

[x ** 2 for x in range(1, 6)]

{x ** 2 for x in range(1, 6)}

{x: x ** 2 for x in range(1, 6)}

[x ** 2 in range(1, 6)]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to sort a list of tuples based on the second element of each tuple in descending order?

sorted(tuples, key=lambda x: x[1], reverse=True)

sorted(tuples, key=lambda x: x[0], reverse=True)

sorted(tuples, key=lambda x: x[1], reverse=False)

sorted(tuples, key=lambda x: x[0], reverse=False)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code snippet?

2024 5 16

16 5 2024

5 16 2024

Compile Time Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you convert a datetime object into a formatted string representation of the date and time?

str(date_obj)

date_obj.strftime("%Y-%m-%d %H:%M:%S")

date_obj.format("%Y-%m-%d %H:%M:%S")

format(date_obj, "%Y-%m-%d %H:%M:%S")

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the map() function in Python do?

Applies a function to each element of an iterable

Creates a map object from an iterable

Merges two iterables into one

Sorts elements of an iterable

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

[25, 10, 8]

[25, 10, 8, 15]

[30, 10, 8]

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?