Web(Enter no or yes): ') #the getPints function def getPints (pints): counter = 0 while counter < 7: pints [counter] = input ('Enter pints collected: ') counter = counter + 1 return pints #the getTotal function def getTotal (pints, totalPints): counter = 0 while counter < 7: totalPints = totalPints + pints [counter] counter = counter + 1 return ... WebDeclare Integer counter = 0 Set totalPints = 0 For counter = 0 to 6 Set totalPints = totalPints + pints[counter] End For Step 3: Complete the following chart by writing what the counter …
lab 9.docx - Starting Out with Programming Logic and Design...
WebFeb 29, 2024 · pints[counter] = input(‘Enter pints collected: ‘) counter = counter + 1. return pints Step 7: Write a function call to the getTotal function and pass it pints and totalPints. … WebStep 8: Under the documentation for the getTotal function, add the following statements: Initialize counter back to 0 Add a while loop that runs 7 iterations and includes: o … city college of new york political science
Student Lab 1: Input, Processing, and Output - Studylib
WebElement Index 34 0 39 1 25 2 18 3 43 4 31 5 12 6 Step 2: Recall Step 5 of Lab 8.1 that accumulates the pints collected. Declare Integer counter = 0 totalPints = 0 For counter = 0 to 6 totalPints = totalPints + pints[counter] End For Step 3: Complete the following chart by writing what the counter and the totalPints value stores on each ... WebThe problem is from Introduction to Programming and Data Structures with C++, 4th edition (Count positive and negative numbers and compute the average of numbers)Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values … WebAccumulate totalPints by setting totalPints = totalPints + pints[counter] Increment counter. Return totalPints. Step 9: Write a function call to the getAverage function and pass it totalPints and averagePints. This function should be set to the averagePints variable since it will be returned from the function. dictionary definition of inimical