MIS 315 Final Exam Review Combined

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

What will be the value of the variable string after the following code executes?string = 'abcd'string = string.upper()

'ABCD'

A class is code that specifies the data attributes and methods for a particular object.

True

An object is not a stand-alone program, it is used by programs that need its services.

True

Each object that is created from a class is called an instance of the class.

True

Encapsulation refers to combining data and code into a single object.

True

In slicing, if the end index specifies a position beyond the end of the string, Python will use the length of the string instead.

True

Indexing works with both strings and lists.

True

Python provides a wide variety of tools and programing techniques that you can use to examine and manipulate strings

True

String slices are called substrings.

True

The expression string [start : end], will include characters with the starting indexing position up to the ending indexing position (not including the the ending indexing position).

True

The procedures an object performs are called methods.

True

The self parameter is required in every method of a class.

True

The string testing method isdigit(), returns true if the string contains only numeric digits and is at least one character in length. Returns false otherwise.

True

You can test to see if one string is contained in another string with the in (or not in) operator.

True

Immutable

Cannot be edited; can only be replaced

Endswith

Checking if a string ends with a specific substring

Startswith

Checking if a string starts with a specific substring

String Testing

Checking specific properties of a string, such as alphanumeric, alphabetic, digit, or whitespace

Encapsulation

Combining methods and data attributes into a single object

Concatenation

Combining two or more strings together

Class

A blueprint for creating objects

Object

A combination of methods and data attributes

While Loop

A loop that continues until a certain condition is no longer true

For Loop

A loop that iterates through each element in a sequence

Initializer Method

A method that initializes the data attributes of an object

Index

A position within a string or sequence

Instance

A specific occurrence of an object

Dataframe

A two-dimensional table-like data structure

String

A type of sequence (not a list or tuple)

String Slicing

Extracting a portion of a string by specifying start and end indices

A class definition is a complete program.

False

By default, the split method uses the character '/'.

False

Class names must start with a capital letter.

False

Data hiding refers to combining data and code into a single object

False

For string concatenation, Python uses the augmented assignment operator +=.

False

Indexing of a string starts at 1 so the index of the first character is 1, the index of the second character is 2, and so forth.

False

Object-oriented programs concentrate on creating procedures.

False

Strings are mutable.

False

Strings don't use indexing to access individual characters.

False

When iterating through a string with a while loop, Python uses a blank character as a sentinel to terminate the loop.

False

String Searching

Finding a specific substring within a string

Find

Finding the index position of a specific substring within a string

Data Hiding

Hiding data attributes from code outside the object

String Replacement

Replacing specific characters or substrings within a string

Coin Toss

Simulating the flipping of a coin to determine Heads or Tails

Word Tokenization

Splitting a sentence into words

String Splitting

Splitting a string into a list of substrings based on a specified delimiter

Sentence Tokenization

Splitting a text into sentences

Sideup

The current facing side of a coin (Heads or Tails)

Which method would you use to determine whether a certain substring is present in a string?

find(substring)


संबंधित स्टडी सेट्स

🟧 Chapter 64 - Arthritis and Connective Tissue Diseases

View Set

MIST 4630 MVC QUIZ, MIST Alexa & Lambda, MIST full stack, mist web standards

View Set

COURSE 3 - Google PMP Certification (Week 3)

View Set

English 1.09: Unit Test: Narrative Techniques and Structure

View Set