Search Header Logo

PCAP Module 4 Review

Authored by Dr Sonia Mitchell

Computers

9th - 12th Grade

Used 15+ times

PCAP Module 4 Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

Access all questions and much more by creating a free account

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

Already have an account?