PCAP Module 4 Review

PCAP Module 4 Review

9th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

104-P-01: Delegates and lambdas

104-P-01: Delegates and lambdas

University

10 Qs

For Loops HW

For Loops HW

9th - 12th Grade

12 Qs

5-函数

5-函数

University

10 Qs

PYTHON PROGRAMMING

PYTHON PROGRAMMING

University

10 Qs

Week 7 Quiz

Week 7 Quiz

University

15 Qs

Python Quiz

Python Quiz

Professional Development

10 Qs

Basic Python for DA

Basic Python for DA

Professional Development

10 Qs

Python Quiz

Python Quiz

12th Grade

15 Qs

PCAP Module 4 Review

PCAP Module 4 Review

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Dr Sonia Mitchell

Used 15+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the expected output of the following code?

2019/11/27 11:27:22

19/November/27 11:27:22

2019/Nov/27 11:27:22

none of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Look at the code: Which snippet would you insert in order for the program to output the following result (tuple):

(1, 4, 27)

foo = list(map (lambda x: x*x, my_list))

foo = tuple(map (lambda x: x*x, my_list))

foo = tuple(map(lambda x: x**x, my_list))

none of the answers

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Look at the code: which snippet would you insert in order for the program to output the following result (list):

[2, 3, 4, 5, 6]

foo = list (filter (lambda x: x-0 and x-1, my_tuple))

foo = list (filter (lambda x: x==0 and x==1, my_tuple))

foo = tuple (filter (lambda x: x-0 and x-1, my_tuple))

none of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What key word would you use to define an anonymous function?

afun

def

yield

lambda

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the expected output of the following code?

[ ]

[ 'large' , 'small', 'medium', ]

[ '.', 'large' , 'small', 'medium', ]

none of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which program will produce the following output?

import calendar

print (calendar.weejheader (3))

import calendar

print (calendar.weekheader ())

import calendar

print (calendar.weekheader (2))

none of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the expected result of executing the following code?

It will print an empty line

It will print ace

It will print bdf

It will print abcdef

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?