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
thumb_up100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 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
- Define a function that takes a list (mylist) as argument, then, performs the following tasks within the function: Sum all the numbers in the list. write a code that calculates the average (do not use built in function to calculate average) of all numbers return a dictionary: the keys should be called as Sum and Average and assign your findings respectively. Run the following cell to generate a list of random numbers by entering your R number, it will generate a list called mylist. Use mylist as argument for the function call and you should use print function with appropriate message to display the outputs. # Only run this cell and input your R numberimport stringimport randomn=int(float(input("Type your R number: ")))%1000 mylist=random.choices(list(range(0,101)),k=n)print("\nmylist: ", mylist)## define your function in this cell ## call the function providing thelist as argument, ## and print the returns from the functionarrow_forwardC++arrow_forwardUse C++arrow_forward
- C++arrow_forwardWrite the following function in PYTHON a) display_PHU_summary() takes three input parameters, a 2D-list (similar to database), a dictionary (similar to dict), and an integer for the PHU_ID. Your function must print the following information, the id, name, city, website, and the total number of cases reported at this PHU. If the given PHU_ID is invalid, it should print a message and exit the function. >>> display_PHU_summary(database, dict, 2241) PHU id: 2241 PHU name: Kingston Frontenac and Lennox & Addington Public Health PHU city: Kingston, K7M 1V5 PHU website: www.kflaph.ca Total cases: 1 >>> display_PHU_summary(database, dict, 3895) PHU id: 3895 PHU name: Toronto Public Health PHU city: Toronto, M5B 1W2 PHU website: www.toronto.ca/community-people/health-wellness-care/ Total cases: 2 >>> display_PHU_summary(database, dict, 3800) The PHU Id is invalidarrow_forwardmember and non-member functions c++arrow_forward
- Use the function design recipe to develop a function named count_odds. The function takes a list of integers, which may be empty. The function returns the number of odd integers in the list. Automated testing is required Your solutions can use:• the [] operator to get and set list elements (e.g., lst[i] and lst[i] = a)• the in and not in operators (e.g., a in lst)• the list concatenation operator (e.g., lst1 + lst2)• the list replication operator (e.g., lst * n or n * lst)• Python's built-in len, min and max functions, unless otherwise noted.Your solutions cannot use:• list slicing (e.g., lst[i : j] or (lst[i : j] = t)• the del statement (e.g., del lst[0])• Python's built-in reversed and sorted functions.• any of the Python methods that provide list operations, e.g., sum, append, clear, copy, count, extend, index, insert, pop, remove, reverse and sort• list comprehensionsarrow_forwardWrite a function create_task that creates a dictionary to store the information for a single task. This function takes two parameters: a list with the keys and a list with the corresponding values and returns a dictionary with the provided keys mapping to the corresponding values. In our main program, we will create a list with the keys that allow us to capture: the name of the task (a string) description (a string) due date (a list) priority (an integer) In the main program, create a list called task_fields that stores these keys: task_fields = ["name", "description", "due date", "priority"] Do not hardcode these fields in the function -- they are provided as the argument into the function. Loop over each key to ask the user to input the corresponding information. Assemble it into a new list. Call create_task with these two lists as an input to get the dictionary with the task information. Print the resulting dictionary from the main program. When running the program, you could see…arrow_forwardplease code in python The following code defines a list of names and also contains a header for the function best. The best function takes two arguments: a generic scoring function, score, and a list of strings, names. Fill in the function so that it applies a score function to each string in the names list and returns the name with the highest score. If there are ties in the list, your function should return the first item with the maximum score. The best function needs to be designed so that it can take any scoring function and return the name with the highest score. For this question, define a function called len_score that returns the length of a word. Call the best function with the len_score function as a parameter. Example: names = ["Ben", "April", "Zaber", "Alexis", "McJagger", "J.J.", "Madonna"] best(len_score, names) -> 'McJagger'arrow_forward
- struct insert_at_back_of_sll { // Function takes a constant Book as a parameter, inserts that book at the // back of a singly linked list, and returns nothing. void operator()(const Book& book) { /// TO-DO (3) /// // Write the lines of code to insert "book" at the back of "my_sll". Since // the SLL has no size() function and no tail pointer, you must walk the // list looking for the last node. // // HINT: Do not attempt to insert after "my_sll.end()". // ///// END-T0-DO (3) ||||// } std::forward_list& my_sll; };arrow_forwardTrue/False Select true or false for the statements below. Explain your answers if you like to receive partial credit. 3) Which of the following is true about the insertBeforeCurrent function for a CircularLinked List (CLL) like you did in programming exercise 1?a. If the CLL is empty, you need to create the new node, set it to current, andhave its next pointer refer to itselfb. The worst case performance of the function is O(n)c. If you insert a new element with the same data value as the current node, theperformance improves to O(log n)arrow_forwardProblem DNA: Subsequence markingA common task in dealing with DNA sequences is searching for particular substrings within longer DNA sequences. Write a function mark_dna that takes as parameters a DNA sequence to search, and a shorter target sequence to find within the longer sequence. Have this function return a new altered sequence that is the original sequence with all non-overlapping occurrences of the target surrounded with the characters >> and <<. Hints: ● String slicing is useful for looking at multiple characters at once. ● Remember that you cannot modify the original string directly, you’ll need to build a copy. Start with an empty string and concatenate onto it as you loop. Constraints: ● Don't use the built-in replace string method. All other string methods are permitted. >>> mark_dna('atgcgctagcatg', 'gcg') 'at>>gcg<<ctagcatg' >>> mark_dna('atgcgctagcatg', 'gc')…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