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
When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This adjustment can be done by normalizing to values between 0 and 1, or throwing away outliers.
For this program, adjust the values by dividing all values by the largest value. The input begins with an integer indicating the number of floating-point values that follow. Assume that the list will always contain positive floating-point values.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print(f'{your_value:.2f}')
SAVE
AI-Generated Solution
info
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
Unlock instant AI solutions
Tap the button
to generate a solution
to generate a solution
Click the button to generate
a solution
a solution
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 answer in pythonarrow_forwardPYTHON PROGRAMMING (practice review for final) (please see attached)arrow_forwardIn PYTHON use a Monte Carlo Simulation to write a code that gives the probability that in a classroom of x people, at least 2 will be born on the same day of the year, ignoring leap year? The number of people in the class is given by the user as variable x. Here is the code outline that is needed to answer this question. Please use it in your answer: import mathimport random # create and initialize frequency table:ft = []k = 0while(k < 365) : ft.append(0) k = k+1 # Allow the user to determine class size:print("Please type in how many people are in the class: ")x= int(input()) success = 0 # Simulate:c = 0while(c < 10000) : # Step 1: re-initialize birthday frequency table (it must be re-initialized for each play-through (why?): k = 0 while(k < 365) : ft[k] = 0 k = k+1 # Step 2: randomly get x birthdays and update frequency table: k = 0 while(k < x): # your code goes here ########################## k = k+1 # Step 3: Check to see if this…arrow_forward
- In python This assignment assess problem solving ability and the use of the modulo operator, functions, lists and nested loops. The Modulo (%) operator returns a remainder of the two numbers divided. e.g. 9 % 2 will yield a 1 because 9/2 = 4 and the remainder is 1. Write one program that will compute both the Least Common Multiple, and the Greatest Common Factor of two random numbers between 2 and 30. The program will display all factors and multiples of the two numbers. When displaying the multiples of the numbers, only display up to the first input times the second input. Use functions to compute the answers. Loop the program so that the user try again. create the loop so that hitting enter will continue. The example is below: Integer1: 12Integer2: 3 The Multiples of 3 are 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, The Multiples of 12 are 12, 24, 36, The lowest common Multiples is 12 The Factors of 3 are 1, 3, The Factors of 12 are 1, 2, 3, 4, 6, 12, The greatest…arrow_forwardpython onlystart from here: def ask_for_age(): age = int(input('Enter the age of a family member: ')) return agearrow_forwardSolve using python make sure your code is correct please Assume the variable temps has been assigned a list that contains floating-point values representing temperatures. Write code that calculates the average temperature and assign it to a variable named avg_temp . Besides temps and avg_temp , you may use two other variables -- k and total .arrow_forward
- Design an algorithm for a problem that processes results of a swimming competition. The program will set a number of competitors, obtain their names from the user, and uses random number generator to get the results (in seconds, as real numbers with three digits after the decimal point). Then it will find and display the average timefor all competitors, andthe names and best three results (first, second, and third places). 1. Set a number of competitors as a constant TOTAL (no more than 10) 2. Declare two arrays to hold names and results (an actual array should have different name than the formal array in the function definitions) 3. Call functions to fill the arrays with names (user entries) and results (random decimal numbers) 4. Print all names and results as a table with appropriate titles 5. Display the average time (by calling function getAverage()) 6. Sort the array of results and corresponding names 7. Print names and results for the first three places (first…arrow_forwardPYTHON Question 4: Sum of the first N natural numbers: Part 1: Write a function sumNaturals (n) that returns the sum of the first n natural numbers. You can use this formula 1 + 2 + ... + n = n(n+1) / 2. Make sure that the function returns an integer. Do not use a for loop or a while loop. def sumNaturals(n): """ Sum all the first n natural numbers. >>> sumNaturals(3) # 1 + 2 + 3 = 6 6 >>> sumNaturals(5) # 1 + 2 + 3 + 4 + 5 = 15 15 """ *** YOUR CODE HERE *** Part 2: Define a lambda expression that takes n and returns the sum of the first n natural numbers, using the above formula.arrow_forwardUsing Python: The credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of 12%. Monthly payments are 5% of the listed purchase price, minus the down payment. Write a program that takes the purchase price as input. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items: The month number (beginning with 1) The current total balance owed The interest owed for that month The amount of principal owed for that month The payment for that month The balance remaining after payment The amount of interest for a month is equal to balance × rate / 12. The amount of principal for a month is equal to the monthly payment minus the interest owed. An example of the program input and output is shown below: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