195k views
1 vote
Write a program to input the year of release, title and narrating of a movie and display the message according to the given conditions.

RATING. MESSAGE TO BE DISPLAYED
From 0.0-2.0. Flop
Above 2.0 to 3.5. Semi hit
Above 3.5 upto 4.5. Hit
Above 4.5 to 5.0. Super hit

User Mark Brown
by
8.5k points

1 Answer

7 votes

Answer:

Done

Step-by-step explanation:

def main():

year = input("Enter the year of release: ")

title = input("Enter the title of the movie: ")

rating = float(input("Enter the rating of the movie: "))

message = ""

if 0.0 <= rating <= 2.0:

message = "Flop"

elif 2.0 < rating <= 3.5:

message = "Semi hit"

elif 3.5 < rating <= 4.5:

message = "Hit"

elif 4.5 < rating <= 5.0:

message = "Super hit"

else:

message = "Invalid rating"

print("\\Movie Details:")

print("Title:", title)

print("Year of Release:", year)

print("Rating:", rating)

print("Message:", message)

if __name__ == "__main__":

main()

User Bitdancer
by
8.0k points

Related questions

asked May 16, 2024 71.2k views
Jellio asked May 16, 2024
by Jellio
7.8k points
1 answer
5 votes
71.2k views
asked Jun 18, 2024 39.9k views
Eiran asked Jun 18, 2024
by Eiran
8.1k points
1 answer
2 votes
39.9k views