Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

INSY3300 Chapter 8-9 Practice Quiz with Answers Spring 2025 UTA

Beoordeling
-
Verkocht
-
Pagina's
14
Cijfer
A+
Geüpload op
27-05-2025
Geschreven in
2024/2025

INSY3300 Chapter 8-9 Practice Quiz with Answers Spring 2025 UTA/INSY3300 Chapter 8-9 Practice Quiz with Answers Spring 2025 UTA

Instelling
University Of The People
Vak
INSY3300 (INSY3300)

Voorbeeld van de inhoud

Chapter 8 More About Strings


TRUE/FALSE

1. You cannot use a for loop to iterate over the characters in a string.

ANS: F

2. Indexing works with both strings and lists.

ANS: T

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

ANS: T

4. 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.

ANS: F

5. The index -1 identifies the last character of a string.

ANS: T

6. The following expression is valid:
string[i] = 'i'

ANS: F

7. The following code will display 'yes + no':
mystr = 'yes'
yourstr = 'no'
mystr += yourstr
print(mystr)

ANS: F

8. If the + operator is used on strings, it produces a string that is a combination of the two strings used as
its operands.

ANS: T

9. When accessing each character in a string, such as for copying purposes, you would typically use a
while loop.



51

, Chapter 8 More About Strings


ANS: F

10. If a whole paragraph is included in a single string, the split() method can be used to obtain a list of
the sentences in the paragraph.

ANS: T

11. The strip() method returns a copy of the string with all the leading whitespace characters removed
but does not remove trailing whitespace characters.

ANS: F


MULTIPLE CHOICE

1. What are the valid indexes for the string 'New York'?
a. 0 through 7
b. 0 through 8
c. -1 through -8
d. -1 through 6
ANS: A

2. What will be displayed after the following code executes?
mystr = 'yes'
yourstr = 'no'
mystr += yourstr * 2
print(mystr)
a. yes + no * 2
b. yes + no yes + no
c. yesnono
d. yesnoyesno
ANS: C

3. What will be assigned to the variable s_string after the following code executes?
special = '1357 Country Ln.'
s_string = special[ :4]
a. '7'
b. '1357'
c. 5
d. '7 Country Ln.'
ANS: B

4. What will be assigned to the variable s_string after the following code executes?
special = '1357 Country Ln.'



52

Geschreven voor

Instelling
University Of The People
Vak
INSY3300 (INSY3300)

Documentinformatie

Geüpload op
27 mei 2025
Aantal pagina's
14
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$24.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
VEVA2K Self
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2855
Lid sinds
5 jaar
Aantal volgers
2413
Documenten
4351
Laatst verkocht
1 uur geleden
Affordable, Up-to-date-Quality Nursing Papers

Here, you'll find a wide range of Nursing Papers at an affordable rate. Every student deserves a friendly environment for study. Always message me for any concern and help. My email is

4.1

688 beoordelingen

5
378
4
128
3
101
2
24
1
57

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen