Question

In: Computer Science

Exercise 6 - Oscar nominated movies(Using python to solve it! please) Write a bot that asks...

Exercise 6 - Oscar nominated movies(Using python to solve it! please)

Write a bot that asks a user what movies they have seen. If they have not seen a movie, it tells them to watch that movie. The user can pick as many names as they want, but they will put all of the names in one input, which means the names will be in a single string rather than a list. Use the following list of movies:

  1. Once Upon a Time in Hollywood
  2. 1917
  3. Marriage Story
  4. Little Women
  5. Joker
  6. Jojo Rabbit
  7. The Irishman
  8. Ford v Ferarri
  9. Parasite

Solutions

Expert Solution

Please find below code and don't forget to give a Like.

Please refer below screenshots for Indentation and output.

Code:

def movies(string1):
    string1.lower()
    list1=[]
    if('once' in string1):
        list1.append('Once Upon a Time in Hollywood')
    if('1917' in string1):
        list1.append('1917')
    if('little' in string1):
        list1.append('Little Women')
    if('joker' in string1):
        list1.append('Joker')
    if('jojo' in string1):
        list1.append('Jojo Rabbit')
    if('irishman' in string1):
        list1.append('The Irishman')
    if('ford' in string1):
        list1.append('Ford vs Ferarri')
    if('parasite' in string1):
        list1.append('Parasite')
    print("-------------------------------")
    print("User Entered these movies which are yet to watch:")
    for i in list1:
        print(i)
list2=['Once Upon a Time in Hollywood','1917','Marriage Story','Little Women',
       'Joker','Jojo Rabbit','The Irishman',
'Ford v Ferarri','Parasite']
print("Hello! did you watch from these movies")
print("------------------------------------")
for i in list2:
    print(i)
print("-------------------------------------")
print("If you haven't watched any of the Movie then please watch those movies")
movie_string=input("Enter the movie names that are yet to watch:")
movies(movie_string)


Related Solutions

Please write in Python code please: Write a program that asks the user to enter 5...
Please write in Python code please: Write a program that asks the user to enter 5 test scores between 0 and 100. The program should display a letter grade for each score and the average test score. You will need to write the following functions, including main: calc_average – The function should accept a list of 5 test scores as an input argument, and return the average of the scores determine_grade – The function should accept a test score as...
use python to solve Write a function called word_chain that repeatedly asks the user for a...
use python to solve Write a function called word_chain that repeatedly asks the user for a word until either (1) the user has entered ten words, or (2) the user types nothing and presses enter. Each time the user enters an actual word, your program should print all the words entered so far, in one long chain. For example, if the user just typed "orange", and the user has already entered "apple" and "banana", your program should print "applebananaorange" before...
Please write in python Use modular design to write a program that asks the user to...
Please write in python Use modular design to write a program that asks the user to enter his or her weight and the name of a planet. The program then outputs how much the user would weigh on that planet. The following table gives the factor by which the weight must be multiplied for each planet. PLANET CONVERSION FACTOR Mercury 0.4155 Venus 0.8975 Earth 1.0000 Moon 0.1660 Mars 0.3507 Jupiter 2.5374 Saturn 1.0677 Uranus 0.8947 Neptune 1.1794 Pluto 0.0899 The...
Python Programming Exercise Scenario: Write a program that asks the user to enter scores the number...
Python Programming Exercise Scenario: Write a program that asks the user to enter scores the number is based on what the user wants to enter. The program will display a letter grade and associated message for each score, based on the table below, and the average score. The program will not contain any repeated code and have a minimum of two functions besides Main. Score                Letter Grade             Message 90 – 100                       A                     Excellent work 89 – 80                         B                     Nice job 79 –...
Using LIST and FUNCTION Write a program in Python that asks for the names of three...
Using LIST and FUNCTION Write a program in Python that asks for the names of three runners and the time it took each of them to finish a race. The program should display who came in first, second, and third place.
Write a program in PYTHON, using a while loop, that asks the user to enter the...
Write a program in PYTHON, using a while loop, that asks the user to enter the amount that they have budgeted for the month. The program should then prompt the user to enter their expenses for the month. The program should keep a running total. Once the user has finished entering their expenses the program should then display if the user is over or under budget. The output should display the monthly budget, the total expenses and whether the user...
Write a python program that asks the user to enter a student's name and 6 numeric...
Write a python program that asks the user to enter a student's name and 6 numeric tests scores (out of 100 for each test). The name will be a global variable. Create functions to calculate a letter grade for the student and calculate the average of the test scores for the student. The program should display a letter grade for each score, and the average test score, along with the student's name. Assume 6 students in the class. Functions in...
Using Python Write a program that does the following in order: 1.     Asks the user to enter...
Using Python Write a program that does the following in order: 1.     Asks the user to enter a name 2.     Asks the user to enter a number “gross income” 3.     Asks the user to enter a number “state tax rate” 4.     Calculates the “Federal Tax”, “FICA tax” and “State tax” 5.     Calculates the “estimated tax” and round the value to 2 decimal places 6.     Prints values for “name”, “gross income” and “estimated tax” The program should contain three additional variables to store the Federal tax, FICA...
Write a Python program in a file called consonants.py, to solve the following problem using a...
Write a Python program in a file called consonants.py, to solve the following problem using a nested loop. For each input word, replace each consonant in the word with a question mark (?). Your program should print the original word and a count of the number of consonants replaced. Assume that the number of words to be processed is not known, hence a sentinel value (maybe "zzz") should be used. Sample input/output: Please enter a word or zzz to quit:...
Using python as the coding language please write the code for the following problem. Write a...
Using python as the coding language please write the code for the following problem. Write a function called provenance that takes two string arguments and returns another string depending on the values of the arguments according to the table below. This function is based on the geologic practice of determining the distance of a sedimentary rock from the source of its component grains by grain size and smoothness. First Argument Value Second Argument Value Return Value "coarse" "rounded" "intermediate" "coarse"...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT