Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need all answers in Python for #4 My courses HIST 127, ET502, ARTH116, HIST 112, MA 121 Write the code below and precisely produce the

need all answers in Python
for #4
My courses HIST 127, ET502, ARTH116, HIST 112, MA 121
image text in transcribed
Write the code below and precisely produce the output below. Save the code as courses your Name.py. 1) Create a list called courses containing the names of your current courses. b) Print the list of courses c) Use the len method to print "I am taking X courses where X is the number of courses in the list. d) Print the names of the first and last courses from the list. Example Output ['ET123), "ET456', 'ET 789", "ENGL101: "MA321" Tam taking 5 courses. ET123 MA321 5. Create/Make grades_your Name py to do the following: a) Create an empty list named grades. b) Add any five grades one at a time to grades. c) Print the current list d) Compute the total of these grades using the indexing to reference each number in grades. c) Compute the average of these grades using the len method. 1) Print the average with a precision of two decimal places. g) Use two different methods to remove all failing grades (lower than 60) one at time from the list. h) Print the updated list. i) Use the list method to compute the average and print the updated result in one statement Example Output Current List: [92, 51, 83, 37, 72] Average: 67.00 Updated list: (92, 83, 72] Updated Average: 82.33 6. Implement the code that counts the number of words in a sentence input by the uset. Save it as words yourName.py Example Output Enter a sentence: This sentence contains five words Number of words: 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions