Q1 - Johnny works as a water meter programmer. His needs to calculate the average value of water volume through a pipe every second. He has an sensor that gives readings V, of water volume and this is updated every second. Write an algorithm that allows him to display A, the average water volume. NOTES: The value of V changes every second, so you need to use a loop to update A or M. every second.
Q1 - Johnny works as a water meter programmer. His needs to calculate the average value of water volume through a pipe every second. He has an sensor that gives readings V, of water volume and this is updated every second. Write an algorithm that allows him to display A, the average water volume. NOTES: The value of V changes every second, so you need to use a loop to update A or M. every second.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Can you help me to find a logic or the algorithm to complete this task? You also able to add more variable if needed, you can answer by math equation or using any programming languages or flowchart

Transcribed Image Text:Q1 - Johnny works as a water meter
programmer. His needs to calculate the
average value of water volume through a
pipe every second. He has an sensor that
gives readings V, of water volume and this
is updated every second. Write an
algorithm that allows him to display A, the
average water volume.
NOTES:
The value of V changes every second, so
you need to use a loop to update A or M
every second.

Transcribed Image Text:Q2 - Johnny's boss says he needs to
calculate the Median water volume every
second. Assume that the water meter
sensor has a resolution of 1 m3/s, and that
the maximum water volume is 1000 m3/s.
le, 0 <= V <= 1000 and V is an integer. Write
a new algorithm that calculates M, the
Median water volume every second.
NOTES:
The value of V changes every second, so
you need to use a loop to update A or M
every second.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY