Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

36) When a class is customized using inheritance, the two classes should have a similar interface. 0.31 Points True False 37) When you use inheritance

36)

When a class is customized using inheritance, the two classes should have a similar interface.

0.31 Points

  • True

  • False

37)

When you use inheritance to customize a class, the existing and new class have identical behavior.

0.32 Points

  • True

  • False

38)

A class that inherits properties from another class is called a superclass.

0.31 Points

  • True

  • False

39)

To begin creating a subclass, copy the parent class's file and delete the methods that will not change.

0.31 Points

  • True

  • False

40)

To ensure that inheritance occurs, you need to place the name of the subclass in parentheses of the class header.

0.31 Points

  • True

  • False

41)

What is the name of the function that contains the starting point of program execution?

0.32 Points

  • start

  • begin

  • enter

  • main

42)

What can you use a docstring for?

0.31 Points

  • to create a large string variable

  • to hold data of type string

  • to hold the name of a document file

  • to create a multiline comment

43)

To create an end-of-line comment, which symbol do you use to begin the comment?

0.31 Points

  • @

  • /

  • *

  • #

44)

Which of the following is true about Python keywords?

0.31 Points

  • they can be a maximum of 6 characters long

  • they can begin with a number, letter, or hyphen

  • they are written in uppercase

  • they are case sensitive

45)

Which statement is true about Python syntax?

0.32 Points

  • a code block must begin with a left brace

  • each code statement must end with a semicolon

  • white space is ignored

  • blocks of code are indicated by indentation

46)

What keywords does Python use for Boolean values?

0.31 Points

  • True, False

  • Set, Unset

  • On, Off

  • Yes, No

47)

What symbol is used to insert a tab in a string?

0.31 Points

  • @tab

  • /t

  • \t

  • [TAB]

48)

Which comparison operation returns True if variable x is not equal to variable y?

0.31 Points

  • x <> y

  • x neq y

  • x != y

  • x .ne. y

49)

Assume x is equal to 5 and y is equal to 0. Which comparison operation returns True?

0.32 Points

  • (x > y) and x

  • x > 0 and None

  • y < 5 and y

  • a. x == y or y

50)

With what character does the print function terminate its output by default?

0.31 Points

  • space

  • newline

  • period

  • null

51)

What is a group of zero or more items that can be operated on as a unit?

0.31 Points

  • array

  • grouping

  • organization

  • collection

52)

Which of the following is true about Python collections?

0.31 Points

  • most can be heterogeneous

  • all are homogeneous

  • all are immutable object types

  • they are typically static

53)

Which object type is immutable?

0.32 Points

  • set

  • tuple

  • list

  • dict

54)

Which type of collection is ordered by position?

0.31 Points

  • hierarchical

  • graph

  • linear

  • sorted

55)

Which real-world item best represents a linear collection?

0.31 Points

  • organizational chart

  • stack of bricks

  • table of contents

  • file system

56)

Which real-world item best represents a hierarchical collection?

0.31 Points

  • a family tree

  • a box of legos

  • wiring diagrams

  • a queue of customers

57)

Why is the efficiency of algorithms desirable?

0.32 Points

  • an inefficient algorithm may use too much time or space

  • efficient algorithms always cost less money

  • inefficient algorithms always use too much memory

  • efficient algorithms always use less memory

58)

Which of the following is a common way to measure the time cost of an algorithm?

0.31 Points

  • count lines of code

  • use the computer's clock

  • use a stopwatch

  • calculate memory usage

59)

What should the missing code be in the following algorithm if the goal is to determine how many seconds the algorithm runs?

#

start = time.time()

myCount = 1

for x in range(100):

myCount *= x

elapsed = time.time() -

0.31 Points

  • myCount

  • start

  • elapsed

  • x

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions