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, 24.06.2019 15:50, GreatBaconGamer
Subscribe to j p g a m e t u b e on you tube ?
Answers: 2
image
Computers and Technology, 24.06.2019 21:40, imamador6396
Which of these is not a type of socket? aga (alternating grid array) pga (pin grid array) spga (staggered pin grid array) lga (land grid array)
Answers: 1
image
Computers and Technology, 25.06.2019 05:30, jackiemiranda2010
Why are weather forecasts more reliable now compared of hundred years ago
Answers: 1
image
Computers and Technology, 25.06.2019 09:30, genesis3105
If a business owner wanted to create a banner ad for his business on his webpage, he could use java programming to develop a (n) spreadsheet cad software applet music application
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, 01.03.2021 21:10
Konu
Mathematics, 01.03.2021 21:10