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
In Python, using a single loop, ask user to enter values to 3 different lists, the first one should contain
the names of 3 people, the second one should contain the heights of 3 people, and the third one
should contain the weights of 3 people. Use the zip function to zip all three lists at the same
time; print list
Expert Solution
arrow_forward
Step 1 ::
- We need to code the python program for people's data.
Step by stepSolved in 3 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
- Pythonarrow_forwardprogram5_2.pyWrite another program that generates another table with the same columns and decimals but by using a function that returns the kilometers for a specified miles parameter. Use a loop in main and generate random integers as before, but catch the value returned by the function and use it in the loop to print a line of the table. Repeat: The table is printed in main.arrow_forwardAssume, you have been given two lists: List_one and List_two. [Your program should work for any two given lists; change the following lists and check whether your program works correctly for the code you have written] Write a Python program that prints "True", if the given two lists have at least one common member. Otherwise, print "False". Hint: use a boolean variable as a flag to indicate if the two lists have at least one common element. Use break to end the loop when seeing a commom element. =================================================================== Given lists 1:List_one : [1, 4, 3, 2, 6]List_two : [5, 6, 9, 8, 7] Sample Output 1:True =================================================================== Given lists 2:List_one : [1, 4, 3, 2, 5]List_two : [8, 7, 6, 9] Sample Output 2:False #assign the boolean result (True/False) to variable "common_ele" (flag). def task5(list_1, list_2): # YOUR CODE HERE return common_elearrow_forward
- Create a python program that generates an eight-digit account number. The program should generate eight random numbers, each in the range of 0 to 9, and assign each number to a list element. Then write another loop that displays the entire contents of the list without the [].arrow_forwardIn python, A. Make a list of 15 random numbers between 1 and 100. B. To find the sum of the values in the list above, use a loop. "The sum of the numbers was: mySum," with mySum being the sum of the list's values. Thanks!arrow_forwardWhen 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 fewer than 20 floating-point values. Output each floating-point value with two digits after the decimal point, which can be achieved as follows:System.out.printf("%.2f", yourValue); Ex: If the input is: 5 30.0 50.0 10.0 100.0 65.0 the output is: 0.30 0.50 0.10 1.00 0.65 The 5 indicates that there are five floating-point values in the list, namely 30.0, 50.0, 10.0, 100.0, and 65.0. 100.0 is the largest value in the list, so each value is divided by 100.0. For coding simplicity, follow every output value by a space, including the last one.arrow_forward
- PYTHON A perpetuity pays a coupon value of C each and every period forever. Given a discount rate of r, the value of a perpetuity is given by V=∑t=1∞C(1+r)t Compute the value of a perpetuity using the summation formula. In the function below, use a for loop to estimate the value of a perpetuity, approximated to N periods. def summation_formula(C,r,N):arrow_forwardIn a chemistry class there are ten students and each the students has taken 5 tests.The total mark awarded for each test is hundred points.i)With the aid of c++ programming language determine the grade each student got and also the class average. ii)What is the average test score?Determine it. ii)Find the grade using the guide given below. N.b kindly add up the following data in the code(Test scores and students name.) Guide for finding the gradeConsidering the average is >=90 then print grade=A Considering the average is >=80 &&<90 then print grade=B Considering the average is >=70 && average <80 then print grade=C Considering the average is >=60 && average <70 then print grade=D Otherwise print grade=Farrow_forwardSivaNums are integers greater than 9. For example, the list [4, 15, 20, 2, -2, 0, 12] has 3 SivaNums. Use a 'for' loop and an 'if' statement to complete the Python function below so that it counts the number of SivaNums in any list. 1 def countSivaNums (numList): count = 0 6 return countarrow_forward
- Word Statistics: The second requirement change is to allow replacement of all occurrences of a given word to a given replacemWrite the code only in python language with the opeartion exactly and necessary comments to be added.arrow_forwardPython programming only NEED HELParrow_forwardIN PYTHON: Using a function, create a list of 20 numbers randomly between 1-99. With recursive function, you are going to take the numbers from the list, one at a time starting at position 0 and add them together. If the numbers added together equals a user specified sum, stop the program and show the two digits that sum together. If not, remove the first number from the list and add the next two. Continue running the program until you have reached the end of the list. sample output: randomly selected numbers: [61, 6, 78, 3, 64, 22, 11, 9, 34, 99, 31, 56, 43, 8, 77, 27, 93, 47, 58, 20] User input : 86 61 + 6 = 67 FALSE [6, 78, 3, 64, 22, 11, 9, 34, 99, 31, 56, 43, 8, 77, 27, 93, 47, 58, 20] 6 + 78 = 84 FALSE [78, 3, 64, 22, 11, 9, 34, 99, 31, 56, 43, 8, 77, 27, 93, 47, 58, 20] 78 + 3 = 81 FALSE [3, 64, 22, 11, 9, 34, 99, 31, 56, 43, 8, 77, 27, 93, 47, 58, 20] 3 + 64 = 67 FALSE [64, 22, 11, 9, 34, 99, 31, 56, 43, 8, 77, 27, 93, 47, 58, 20] 64 + 22 = 86 TRUE!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