Question

we are that was a person to rate a movie that they ve seen (1 is bad and 10 is great). If the rate is greater than or equal t
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The algorithm for this :

  1. Declare a dictionary list that stores the names of movies and categories them as worth watching, worth renting and watch on TV
  2. Prompt the user to give the name of the movie
  3. Take input from user and store it in a variable (movie)
  4. Prompt the user to rate the movie he has seen
  5. Take input from user and store it in a variable (rating).
  6. If rating >= 8
          print Its worth seeing
          append the movie name in the list
    Else if rating >= 5
          print Its worth renting the video
                   append the movie name in the list
  7. Else
                   print Just wait and watch it on TV
                   append the movie name in the list

Python program for this is:

movies = { "Worth_seeing":[],"worth_renting":[],"watch_onTV":[]}
movie_name = input("Enter the movie name")
rating = int(input("Rate the movie you have seen"))
if rating >= 8:
    print("Its worth seeing")
    movies["Worth_seeing"].append(movie_name)
elif rating >= 5:
    print("Its worth renting the video")
    movies["worth_renting"].append(movie_name)
else:
    print("Just wait and watch it on TV")
    movies["watch_onTV"].append(movie_name)
Add a comment
Know the answer?
Add Answer to:
we are that was a person to rate a movie that they ve seen (1 is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 1 1 pts The Say Hey! Co. just issued a dividend of $2.45 per share...

    Question 1 1 pts The Say Hey! Co. just issued a dividend of $2.45 per share on its common stock. The company is expected to maintain a constant 6 percent growth rate in its dividends indefinitely. The company's tax rate is 40%. If the stock sells for $45 a share, what is the company's cost of equity? Choose the range that includes the correct solution. O Less than 10% Greater than or equal to 10%, but less than 11% Greater...

  • Multiple parts. Would like to check these quick MC that I'm struggling a bit with. Holdup...

    Multiple parts. Would like to check these quick MC that I'm struggling a bit with. Holdup Bank has an issue of preferred stock with a $6 stated dividend that just sold for $92 per share. Holdup has a 34% tax rate. What is the bank's cost of preferred stock? Choose the range that includes the correct solution. Less than 3% Greater than or equal to 3%, but less than 4% Greater than or equal to 4%, but less than 5%...

  • Question 5 1 pts Investors expect deflation to occur (i.e., you expect a negative rate of...

    Question 5 1 pts Investors expect deflation to occur (i.e., you expect a negative rate of inflation also called deflation). Holding all other inputs constant, which of the following statements is/are true given that expectation? The slope of the security market line (SML) will increase. The slope of the security market line (SML) will decrease. O The expected returns on all securities will increase. The expected returns on all securities will decrease. O More than one of the above will...

  • It is commonly believed that the more often we encounter someone, the more we end up liking the person. If the person “mirrors” our actions when we talk to them (e.g., smiling when we smile, touching...

    It is commonly believed that the more often we encounter someone, the more we end up liking the person. If the person “mirrors” our actions when we talk to them (e.g., smiling when we smile, touching our hair when we touch our hair), we like them even more than previous tests show. To test this hypothesis, a researcher has randomly assigned equal numbers of male (n=10) and female (n=10) students to meet with a confederate who they have never met...

  • Question 4 1 pts Jiminy's Cricket Farm issued a 30-year, 10 percent coupon bonds 7 years...

    Question 4 1 pts Jiminy's Cricket Farm issued a 30-year, 10 percent coupon bonds 7 years ago. The face value is $1,000. The bond currently sells for $1,080 and makes semiannual coupon payments. The company's tax rate is 35%. What is the pretax cost of debt? Choose the range that includes the correct solution. Less than 7% Greater than or equal to 7%, but less than 8% Greater than or equal to 8%, but less than 9% Greater than or...

  • WORK tool Problem Walk-Through Investors require an 8% rate of return on Mather Company's stock (i.e.,...

    WORK tool Problem Walk-Through Investors require an 8% rate of return on Mather Company's stock (i.e., rs = 8%). a. What is its value if the previous dividend was Do - $1.50 and investors expect dividends to grow at a constant annual rate of (1) -6%, (2) 0%, (3) 3%, or (4) 7%? Do not round intermediate calculations. Round your answers to the nearest cent. (1) $ (2) $ (3) $ 10. b. Using data from part a, what would...

  • With exercise 5, the first person did it wrongly. We are to define k to be...

    With exercise 5, the first person did it wrongly. We are to define k to be the largest integer such that root 2+k/n is less than or equal to a. Please an expert should solve this + In Exercise 11 from Tutorial 6, we showed that if is an irrational number and y is a nonzero rational number, then ry is an irrational number. For example, 23 and are both irrational In Tutorial 5, we proved that between any two...

  • Problem #1: (a) Suppose that we identify 161 women 50 to 54 years of age who...

    Problem #1: (a) Suppose that we identify 161 women 50 to 54 years of age who have both a mother and a sister with a history of breast cancer. 16 of these women themselves have developed breast cancer at some time in their lives. If we assume that the proportion of breast cancer cases in women whose mothers have had breast cancer is 8%, does having a sister with the disease increase the risk? Find the p-value. (b) At the...

  • 3. Is an increase in the unemployment rate (U3) always a bad development for the economy?...

    3. Is an increase in the unemployment rate (U3) always a bad development for the economy? Is a decrease in the unemployment rate (U3) always a favorable development for the economy (and the labor market)? 4. Assume U3 increases from 4% to 8% from year x to year y. If U6 were 5% in year x would we expect U6 to be greater than or less than 9% in year y? 5. Using the CPI-U: What is the percentage change...

  • Problem 8-5 Beta and required rate of return A stock has a required return of 12%;...

    Problem 8-5 Beta and required rate of return A stock has a required return of 12%; the risk-free rate is 6%; and the market risk premium is 4%. a. What is the stock's beta? Round your answer to two decimal places. b. If the market risk premium increased to 10%, what would happen to the stock's required rate of return? Assume that the risk-free rate and the beta remain unchanged. I. If the stock's beta is less than 1.0, then...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT