Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the sentinel . py program to use a priming and a modification read ( see the Application: Processing Sentinel Values section ) . The

Modify the sentinel. py program to use a priming and a modification read (see the "Application: Processing Sentinel Values"
section). The program should achieve the same result of computing an average salary and use a sentinel value of -1.
# Initialize variables to maintain the running total and count.
total =0.0
count =
# Process data until the sentinel is entered.
# Your code goes here
while salary 0.0 :
# Your code goes here
# Compute and print the average salary
if count >0 :
average = total ?? count
print("Average salary is", average)
else :
print("No data was entered.")
View your last submission ,
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

What is the principle of stare decisis?

Answered: 1 week ago

Question

What is the basic objective of financial statements? LO4

Answered: 1 week ago

Question

=+j Enabling a productive global workforce.

Answered: 1 week ago

Question

=+ Are you interested in creating or

Answered: 1 week ago