Westonci.ca is your trusted source for finding answers to all your questions. Ask, explore, and learn with our expert community. Discover the answers you need from a community of experts ready to help you with their knowledge and experience in various fields. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.
Sagot :
THIS IS FOR PYTHON
total = 0
for i in range(8):
number = int(input('Number: '))
total += number
print(total)
The loop that will input 8 numbers from the keyboard and find the sum is as follows:
user_input = [int(input('Enter your value: ')) for i in range(8)]
print(sum(user_input))
The code ask for the user's input for 8 times. Recall the range is 8.
Then we loop through the users input values
The looped users input will be summed using the sum() function. The sum function sums all the users input value.
The summed value is then printed with the print statement.
learn more on loop: https://brainly.com/question/14201070?referrer=searchResults
Thank you for your visit. We are dedicated to helping you find the information you need, whenever you need it. We appreciate your time. Please come back anytime for the latest information and answers to your questions. Get the answers you need at Westonci.ca. Stay informed with our latest expert advice.