The following table lists the sound level in decibels for several common noises.Noise Decibel level (dB),
Jackhammer 130
Gas lawnmower 106
Alarm clock 70
Quiet room 40
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.
a=int(input())
a=int(input())
if a == 40:
print("Quiet room")
if a == 70:
print("Alarm clock")
if a == 106:
print("Gas lawnmower")
if a == 130:
print("Jackhammer")
Comments
Post a Comment