Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hello, please help me to answers my python subjects, I'm new students. I highly appreciate your effort. thanks in advanced.. Kindly answers all of this

hello, please help me to answers my python subjects, I'm new students.

I highly appreciate your effort. thanks in advanced.. Kindly answers all of this please, I'm begging...

1.) Knowing that a function named fun() resides in a module named mod, choose the proper way to import it:

a.) from mod import fun b.) from fun import mod c.) import fun d.) import fun from mod

2.) Knowing that a function named fun() resides in a module named mod, and it has been imported using the following line:

import mod

choose the way it can be invoked in your code:

a.) mod.fun() b.) fun() c.) mod::fun() d.) mod->fun()

3.) A function returning a list of all entities available in a module is called:

a.) listmodule() b.) content() c.) dir() d.) entities()

4.) The pyc file contains:

a.) compiled Python code b.) Python source code c.) a Python compiler d.) a Python interpreter

5.) When a module is imported, its contents:

a.) may be executed (explicitly) b.) are ignored c.) are executed once (implicitly) d.) are executed as many times as they are imported

6.) A predefined Python variable, storing the current module name, is called:

a.) __mod__ b.) __modname__ c.) __module__ d.) __name__

7.) The following statement:

from a.b import c

causes the import of:

a.) entity c from module b from package a b.) entity c from module a from package b c.) entity b from module a from package c d.) entity a from module b from package c

8.) Entering the try: block implies that:

a.) none of the instructions from this block will be executed b.) some of the instructions from this block may not be executed c.) all of the instructions from this block will be executed d.) the block will be omitted

9.) The unnamed except: block:

a.) cannot be used if any named block has been used b.) can be placed anywhere c.) must be the last one d.) must be the first one

10.) The top-most Python exception is named:

a.) TopException b.) BaseException c.) PythonException d.) Exception

11.) The following statement:

assert var == 0

a.) has no effect b.) will stop the program when var == 0 c.) is erroneous d.) will stop the program when var != 0

12.) ASCII is:

a.) a predefined Python variable name b.) a standard Python module name c.) a character name d.) short for American Standard Code for Information Interchange

13.) UTF-8 is:

a.) a Python version name b.) a synonym for "byte" c.) a form of encoding Unicode code points d.) the 9th version of the UTF standard

14.) UNICODE is a standard:

a.) like ASCII, but much more expansive b.) used by coders from universities c.) for coding floating-point numbers d.) honored by the whole universe

15.) The following code

x = '\''

print(len(x))

prints:

a.) 3 b.) 1 c.) 2 d.) 0

16.) The following code:

print(ord('c') - ord('a'))

prints:

a.) 1 b.) 0 c.) 3 d.) 2

17.) The following code

print(chr(ord('z') - 2))

prints:

a.) z b.) a c.) x d.) y

18.) The following code

print(3 * 'abc' + 'xyz')

prints:

a.) abcxyzxyzxyz b.) xyzxyzxyzxyz c.) abcabcxyzxyz d.) abcabcabcxyz

19.) The following code

print('Mike' > "Mikey")

prints:

a.) 1 b.) True c.) 0 d.) False

20.) The following code:

print(float("1,3"))

a.) raises a ValueError exception b.) prints 1.3 c.) prints 1,3 d.) prints 13

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions