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.

write a loop that will input 8 numbers from the keyboard and find the sum

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