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
Concept explainers
Question
Hello, I am having trouble with a coding problem I am working on. I was wondering if an expert could help me with this coding problem. Its in four parts. Please let me know if you can answer this question. Thank you.
Write a
- Ask the user for number of runners
- For each runner:
- Ask the user the name of the runner
- Ask the user for number of runs
- For each run, ask the user
- What the distance was in miles (in decimal format, e.g. 3.1 miles is acceptable)
- What the time was in minutes (in decimal format, e.g. 23.9 minutes is acceptable)
- After gathering all the info from steps 1 & 2 above, output a summary in 3 sections:
- The name of each runner along with the average pace of each runner
- The average pace of all runs for all runners
- The total number of runners & runs
Expert Solution
arrow_forward
Step 1: Introduction
They are as much a test of logic as they are of patience and grit. But worry not! Together, we'll embark on this coding journey, step by step. This problem is a delightful mix of loops, user input, data storage, and data presentation. Let's begin by discussing a broad strategy, and then we'll plunge right into the solution.
Step by stepSolved in 3 steps
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
Do you know if you can paste the code in eclpise format?
Solution
by Bartleby Expert
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
Do you know if you can paste the code in eclpise format?
Solution
by Bartleby Expert
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
- The correct statements are: (ab)*a = a(ba)* (a U b)* b (a U b)* = a*b (a U b)* (a U b)* ba (a U b)* U a*b* = (a U b)* □ (a U b)* b (a U b)* U (a U b)* a (a U b)* = (a U b)*arrow_forwardPython questionarrow_forwardPython Lab 2a: Input and output 1. Ask the user to enter their name. Then say hello and repeat their name. 2. Ask the user to enter their age. Print out their age 5 years from now. 3. Use concatenation and str() to print a message telling the user how old they will be in 5 years. 4. Ask the user to enter in values that might be floating point. 5. Print out the result of the calculation in a single print statement, using concatenation. 6. If Time In Python, the input() function is used to accept input. The result is stored as a string type. name = input ('what is your name?') print ('Hello ' + name) To be able to add 5 to the user input, it has to be converted to an integer. x = int(input ('what is your age?') print (x + 5) When you are printing out a string message and want to concatenate a number onto the string, use str() to convert a numeric value to a string. If the user entered 27, your output should be similar to the following: In 5 years you will be 32 years old Let's calculate…arrow_forward
- The quadratic.py program we wrote in class will never give an error for any values of a, b and c. O True Falsearrow_forward2. You are again working for the census bureau and they need some statistics regarding the distribution of ages. Write a program to read in a number of ages. (You do not know upfront how many entries you have, so you need to keep track of it.) Compute the average age and the age that occurs most frequently (some of the ages might be the same). Ages should be read in as integers, the average should be a real number. Calculate the population standard deviation using the formula: 2 n. ai/n-(/n) Standard deviation = 1 1arrow_forwardhelp with c Please do not copy from the other's answer, and it's not right Your friend's monitor is too small and can only display up to 50 characters on a line before they run off the screen. They aren't good with computers, so you decide to write a program for them called truncator.c that will reprint input so that no line is longer than 50 characters. Specifically, for lines less than or equal to 50 characters, simply reprint the line. For lines greater than 50 characters, insert a newline at each 50-character interval. Note: If the 51st character of a line in the input is a newline '\n', then you should not print it (to avoid unnatural double newlines in the text). Depending on your solution, you may not need extra code for this. So worry about this case last. Tip: Write your own file with test input for the case where the 51st character is a newline. In the bottom-right corner of Vim, you can see the line and column number of your cursor and plan your 51-character input…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