Search Header Logo

PCAP-31-03

Authored by hend business

Information Technology (IT)

12th Grade

PCAP-31-03
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

33 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 5 pts

What is true about Python packages? (Select two answers)

the __name__ variable content determines the way in which the module was run

a package can be stored as a tree of sub-directories/sub-folders

__pycache__ is the name of a built-in variable

hashbang is the name of a built-in Python function

2.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

A Python module named pymod.py contains a variable named pyvar. Which of the following snippets will let you access the variable?

import pyvar from pymod pyvar = 1

from pymod import pyvar = 1

from pymod import pyvar pyvar()

import pymod pymod.pyvar = 1

3.

MULTIPLE SELECT QUESTION

1 min • 5 pts

Media Image

Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers)

len(random.sample([1,2,3],2)) > 2

v1 == v2

random.choice([1,2,3]) >=1

v1 >= 1

4.

MULTIPLE SELECT QUESTION

1 min • 5 pts

Media Image

With regards to the directory structure below, select the proper forms of the directives in order to import module_a. (Select two answers)

import pypack.module_a

import module_a from pypack

import module_a

from pypack import module_a

5.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

Which one of the platform module functions should be used to determine the underlying platform name?

platform.uname()

platform.platform()

platform.python_version()

platform.processor()

6.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

Media Image

What is the expected output of the following code?

True

0

False

None

7.

MULTIPLE SELECT QUESTION

1 min • 5 pts

What is true about the following snippet? (Select two answers)

Option A

Option B

Option C

Option D

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?