Question: 3. Write the codes and precisely produce the output format below. Save the code as lab4_3.py (3-pt). 01) Create a list called courses containing the

 3. Write the codes and precisely produce the output format below.

3. Write the codes and precisely produce the output format below. Save the code as lab4_3.py (3-pt). 01) Create a list called courses containing the names of your current courses. 02) Print the list of courses. 03) Use the len method to print "I am taking X courses" where X is the number of courses in the list. 04) Using indexes to print the first and last item from the list. 05) Using slicing to print the first four classes. 06) Using slicing to print the last four classes. 07) Using slicing to print the classes except for the first and last classes. Example Output 4. Analyze a Sentence. Save the code as 1ab4_4py(1pt). 01) Use Input() to prompt and request a sentence. 02) After the user types the sentence, and presses the Enter (or Return) key, display the number of words. Input text can be any content. Just make sure to precisely match the output format below. Example Output 1 Enter a sentence: This sentence contains five words. Number of words: 5 Example Output 2 Enter a sentence: Hello World Number of words: 2 5. AE, identify the errors and rewrite the statements in the correct syntax. Save your code as lab4_5.py (5-pt)

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!