Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Expert Solution
arrow_forward
Explanation
1) Since you have not specified programming language, I have written program in python programming language
2) Below is program that defines the list of top saga games, then prompt user which one they would like to remove, then show the updated list again
- It first defines list of top Sega games
- Display the top Sega games
- Prompt user to which one they would like to remove
- Remove selected game from list
- Display the new top Sega games
3) Save Program in python file and run
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 1) Write a function that takes one argument, a list named sample-list. 2 ) If the length of the sample-list is > 8, then use the last element of sample-list and return it in a list. 3) If the length of sample-list is <= 8 and > 4, then return the first elements of sample-list in a list. 4) Otherwise, return the string “This is the third option.”. Please make sure to test your function!!! and explain your code shortly by adding comments to each line.arrow_forwardModify the sample code to prompt the user for a name. Have theprogram search the existing list for the entered name. If thename is in the list, display the corresponding phone number;otherwise display this message,The name is not in the current phone directory. #include<iostream>#include<iomanip> using namespace std;const int MAXNAME = 30;const int MAXTEL = 15;struct Tele_typ{char name[MAXNAME];char phone_no[MAXTEL];Tele_typ* nextaddr;};void display(Tele_typ*);int main(){Tele_typ t1 = { " Cage, Mark", "(555) 898-2392" };Tele_typ t2 = { " Dolan, Nick", "(555) 682-3104" };Tele_typ t3 = { " Lennon, John", "(555) 718-4581" };Tele_typ* first; first = &t1; t1.nextaddr = &t2; t2.nextaddr = &t3; t3.nextaddr = NULL; display(first); return 0;}void display(Tele_typ * contents) // of type Tele_typ {while (contents != NULL){cout.setf(ios::left);cout.width(25); cout << '\n' << contents->name;cout.width(20); cout << contents->phone_no;contents =…arrow_forwardLAB ASSIGNMENTS IMPORTANT: you should complete the PDP thinking process for each program. Turn in items: 1) book_list.py: you can adapt your Chapter 4 book_list.py Lab program. The program summarizes costs of a book list. It uses all of our standard mipo_ex features. In this version of the program you must use pylnputPlus functions to perform all the input validation and for the main() loop decision. Adjust your program to allow book prices to include $ and cents. Restrict individual book prices to $100 maxium. • Clearly document, with comments, your use of the pyip functions. This program summarizes a book liat. Enter the number of books that you need: Please enter a whole number: three Enter a number greater than 0: 3 Enter the name of book #1: The Mueller Report Enter cost of The Mueller Report, to the nearest dollar: Please enter a whole number: 18 Enter the name of book #2: Educated: A Memoir Enter cost of Educated: A Memoir, to the nearest dollar: Please enter a whole number: 24…arrow_forward
- program7.pyThis assignment requires the main function and a custom value-returning function. The value-returning function takes a list of random integers as its only argument and returns a smaller list of only the elements that end with 7. This value-returning function must use a list comprehension to create this smaller list.In the main function, code these steps in this sequence: Set random seed to 42 import randomrandom.seed(42) create an empty list that will the hold random integers. use a loop to add 50 random integers to the list. All integers should be between 200 and 250, inclusive. Duplicates are okay. sort the list in ascending order and then use another loop to display all 50 sorted integers on one line separated by spaces. print a slice showing list elements indexed 5 through 10, inclusive. print a second slice showing the final 5 elements in the sorted list. execute the custom function with the entire original list as its sole argument. report the number of elements in…arrow_forwardPython code please help, indentation would be greatly appreciatedarrow_forwardModify the sample code to prompt the user for a name. Have theprogram search the existing list for the entered name. If thename is in the list, display the corresponding phone number;otherwise display this message,The name is not in the current phone directory. #include<iostream>#include<iomanip> using namespace std;const int MAXNAME = 30;const int MAXTEL = 15;struct Tele_typ{char name[MAXNAME];char phone_no[MAXTEL];Tele_typ* nextaddr;};void display(Tele_typ*);int main(){Tele_typ t1 = { " Cage, Mark", "(555) 898-2392" };Tele_typ t2 = { " Dolan, Nick", "(555) 682-3104" };Tele_typ t3 = { " Lennon, John", "(555) 718-4581" };Tele_typ* first; first = &t1;t1.nextaddr = &t2;t2.nextaddr = &t3;t3.nextaddr = NULL;display(first);return 0;}void display(Tele_typ * contents) // of type Tele_typ {while (contents != NULL){cout.setf(ios::left);cout.width(25); cout << '\n' << contents->name;cout.width(20); cout << contents->phone_no;contents =…arrow_forward
- Python programming only NEED HELP PLEASEarrow_forwardAssume that the variable data refers to the list [5, 3, 7]. Write the expressions that perform the following tasks: a. Replace the value at position o in data with that value's negation. b. Add the value 10 to the end of data. c. Insert the value 22 at position 2 in data. d. Remove the value at position 1 in data. e. Add the values in the list newData to the end of data. f. Locate the index of the value 7 in data, safely. g. Sort the values in data.arrow_forwardLargest Value. Create a program that uses a list to store input values, and outputs the largest value entered at its location in the list. The program shall accept input values until the user enters -1. And Next Movie Time. Create a program that shows the user when the next showing for a movie is. The program first reads the different showing times (only hours) in a 24-hour clock format (that is, 1PM is 13, 6PM is 18, etc.). The program then asks when a customer wants to go to the movies. The program replies with the time for the next showing. If the next showing matches the hour input by the customer, show the next showing after that. If the next showing is past the last one, the program shall output, “There are no more showings.”, Here is a sample execution: I am trying to use these programs as practice for practicing lists, strings and inputs. But am struggling a bit after laying down the foundation on each problem. I plan to put them into thonny to compare them with my own work.arrow_forward
- .arrow_forwardPython programing question 2. Write a program that replaces the name of each month with its three-letter abbreviation. Save it as months.py.a) Create a list.months = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november','december']b) Use a for loop to update and store each month with its three-letter abbreviation into a new list.c) Print the value of each month in a row separated by a ‘|’ as displayed in the output example.d) Print the new list as displayed in the output example.e) Print the original list as displayed in the output example.arrow_forwardPYTHON Complete the function below, which takes two arguments: data: a list of tweets search_words: a list of search phrases The function should, for each tweet in data, check whether that tweet uses any of the words in the list search_words. If it does, we keep the tweet. If it does not, we ignore the tweet. data = ['ZOOM earnings for Q1 are up 5%', 'Subscriptions at ZOOM have risen to all-time highs, boosting sales', "Got a new Mazda, ZOOM ZOOM Y'ALL!", 'I hate getting up at 8am FOR A STUPID ZOOM MEETING', 'ZOOM execs hint at a decline in earnings following a capital expansion program'] Hint: Consider the example_function below. It takes a list of numbers in numbers and keeps only those that appear in search_numbers. def example_function(numbers, search_numbers): keep = [] for number in numbers: if number in search_numbers(): keep.append(number) return keep def search_words(data, search_words):arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education