Computers and Technology

7.3.4: Find the Error In this exercise, you will try to identify which of two lines will cause an error. The two lines look like this:

my_string[0] = "H"
my_string = "H" + my_string[1:]
Each line is an attempt to change the string from "hello!" to "Hello!". One of them does this in an acceptable way, and the other one causes an error.

Before you run the program, see if you can predict which of the two lines is incorrect. Test your guess by commenting out what you think is the incorrect line and running the program!

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:40, hePandaKing3689
State the parts of a variable declaration?
Answers: 2
image
Computers and Technology, 22.06.2019 17:00, hollodom9654
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
image
Computers and Technology, 23.06.2019 02:50, bfell92
There’s only one game mode that stars with the letter β€˜e’ in cs: go. which of the options below is it?
Answers: 1
image
Computers and Technology, 24.06.2019 00:30, louie8656
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
Do you know the correct answer?
7.3.4: Find the Error In this exercise, you will try to identify which of two lines will cause an e...

Questions in other subjects:

Konu
Mathematics, 04.07.2021 20:30
Konu
Mathematics, 04.07.2021 20:30
Konu
Mathematics, 04.07.2021 20:30