Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Introduce AND and OR operators for at least 2 keywords, ok to limit to only 1 operator (either AND used or OR used, ok

Python

Introduce AND and OR operators for at least 2 keywords, ok to limit to only 1 operator (either AND used or OR used, ok if program doesn't work well for combination of both or for more than 2 keywords):

a search query "love AND flower" should return only results containing both "love" and "flower":

"If you love a flower that lives on a star, it is sweet to look at the sky at night. All the stars are a-bloom with flowers...", "Of course, I love you,' the flower said to him. 'If you were not aware of it, it was my fault." "If you love a flower that lives on a star, then it's good at night, to look up at the sky. All the stars are blossoming." optional (ok if it is returned or not): "If someone loves a flower of which just one exists among all the millions and millions of stars, that's enough to make him happy when he looks at the stars.",

a search query "love OR flower" should return results containing either "love" or "flower": optional (ok if it is returned or not): "You see, one loves the sunset when one is so sad." "If you love a flower that lives on a star, it is sweet to look at the sky at night. All the stars are a-bloom with flowers..." "Grown-ups love figures... When you tell them you've made a new friend they never ask you any questions about essential matters. They never say to you \"What does his voice sound like? What games does he love best? Does he collect butterflies? \" Instead they demand \"How old is he? How much does he weigh? How much money does his father make? \" Only from these figures do they think they have learned anything about him." "I was too young to know how to love her." optional (ok if it is returned or not):"I have always loved the desert. One sits down on a desert sand dune, sees nothing, hears nothing. Yet through the silence something throbs, and gleams..." "Of course, I love you,' the flower said to him. 'If you were not aware of it, it was my fault.", part E (submit as a separate program): Analyze the inputs and outputs from the program above, what happens if the user enters same keyword multiple times, ex: "flower AND flower", does your program still search for each one? If yes, modify your program such that it does not search for repeated keywords. Also, ensure that the output quotes are only displayed once, i.e. there should be no repeating quotes in the output.

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago