Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 The following table lists the sound level in decibels for several common noises. Noise Decibel level (dB) Jackhammer 131 Gas lawnmower 107 Alarm

Question 1

  1. The following table lists the sound level in decibels for several common noises.
Noise Decibel level (dB)
Jackhammer 131
Gas lawnmower 107
Alarm clock 69
Quiet room 41

Write a program that reads a sound level in decibels from the user. If the user enters a decibel level that matches one of the noises in the table then your program should display a message containing only that noise. If the user enters a number of decibels between the noises listed then your program should display a message indicating which noises the level is between. Ensure that your program also generates reasonable output for a value smaller than the quietest noise in the table, and for a value larger than the loudest noise in the table. Hints: a. Remember to convert any numbers you read in with the "input()" function to an integer before using it in your "if" statements. Eg. myInt = int(input("Enter any Integer")) b. You can test if the number stored in a variable is between two numbers by using the "and" command, as discussed before. Eg. (myInt > 2 and myInt < 6) will return true if myInt is both greater than 2 and less than 6. c. You will need many elif statetements in the if statement for this problem.

Question 2

  1. The table below shows the current (2019/2020) College Football Rankings and the number of wins by each team. a. Create a pandas DataFrame that stores the information in this table and displays this. 5 points will be deducted if this is not attempted. 2 points will be deducted if it is wrong or there is a typo b. Display (or print out) the mean, standard deviation and maximum of the number of wins given in this dataframe. 5 points will be deducted if this is not attempted. 2 points will be deducted if it is wrong or there is a typo
School Number of wins
LSU 15
Clemson 14
Ohio State 13
Georgia 12
Oregon 12

please explain step by step (Python code).

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions