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
Write a program that would (using stl) make a list named “num” made of floats. Write code asking a user to enter a few numbers and then put those numbers in the list. Once done, empty the list.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 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
- please explain pythonarrow_forwardWrite a program named p3.py that starts with an empty list and then asks the user for a positive integer n. Then your program must generate n random integers in the range [1-10] (inclusive) and store them in the list. Your program must then ask the user repeatedly to enter a number and a string to replace all occurrences of that number with the string (e.g., replace 1’s with "hello", 2’s with “hi”) and count the number of times a particular number was replaced by the string.Hint: use a for (counter controlled) loop inside a while (event-controlled) loopSample output: n >> 12List: [1, 3, 3, 9, 5, 7, 8, 2, 10, 8, 4, 1] number to change ['q' to quit]>> 1 with string >> helloList: ['hello', 3, 3, 9, 5, 7, 8, 2, 10, 8, 4, 'hello']The number 1 was replaced 2 times in totalnumber to change ['q' to quit]>> 8 with string >> hiList: ['hello', 3, 3, 9, 5, 7, 'hi', 2, 10, 'hi', 4, 'hello']The number 8 was replaced 2 times in totalnumber to change ['q' to quit]>>…arrow_forwardpython LAB: Subtracting list elements from max When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. Write a program that adjusts a list of values by subtracting each value from the maximum value in the list. The input begins with an integer indicating the number of integers that follow.arrow_forward
- Written in python with docstrings if applicable. Thanksarrow_forwardCreate a program that starts with an empty list, prompts the user three times to enter their favorite game, and then prints out the output using the pop() method. Expected Output What is your favorite game? The Legend What is your second favorite game? Teen What is your third favorite game? Donke One of your favorite games is Donkey Ko One of your favorite games is Teenage M One of your favorite games is The Legenarrow_forwardIn python Create a list from the items in the Bonjoir le monde! String and assign it to the liste variable. Hint: use the list function to built a liste from an it érable sequence (e.g. a string).arrow_forward
- Write a program using PHYTHON to create a grocery list where the user will add items one at a time until entering the word "STOP".At that point, the program will print out the items in the grocery list, 1 item per line.arrow_forwardqweerarrow_forwardWrite a program that uses 2 lists. Call the lists Items and Basket respectively. The first list will contain a list of at least 10 items (make up your own items) to select from. The second list will be used to add the selected items in the new list.(Basket) Your program should do the following in a Loop until the user exits the loop: Display the list (print out 1, 2, 3, 4, etc. before each item in the list (Hint: Use Index + 1) Prompt the user to select an item from the Items list. Add the selected item to the new list (Basket) (HINT: Use number entered - 1 for the Index) When the user selects 0, exit the loop and print out the new list of items (Basket)arrow_forward
arrow_back_ios
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