Question: This is for python. I get errors between 5-7. Appreciate it. 1) Print Hello and World on 2 separate lines (5 pts) 2) Name =

 This is for python. I get errors between 5-7. Appreciate it.

This is for python. I get errors between 5-7. Appreciate it.

1) Print Hello and World on 2 separate lines (5 pts) 2) Name = "Michael Jackson" (15 pts) Print first element of string at index 0 Take the slice on variable name with only index 0 to index 3 (hint: only make use of start index and end index numbers. This is called slicing) Get and print every second element. i.e. elements on index 0,2,4... (hint: make use of start, end index numbers along with the stride. This is called slicing with a stride(every 2nd element)) Get and print every second element in the range from index 0 to index 4. 3) Concatenate 2 strings: string 1 = " Michael Jackson" and string 2 "is the best" (5 pts) 4) Print a string "Michael Jackson" three times (5 Pts) 5) Replace old substring with a new target substring is the segment has been found in the string . That is, replace word Michael with Janet in the string "Michael Jackson is the best" (10 pts) 6) Find substring "Jack" in the main string "Michael Jackson" and return its index position. (hint: use the string method find) (5 pts) 7) Use For loop to print out elements of list A: A = [1,2,3,4,5,6,7,8,9] (5 pts)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!