subject

0.0/2.0 points (graded) 1| my2DTuple = ((1, 2, 3), 2| (4, 5, 6), 3| (7, 8, 9)) 4| 5| sum = 0 6| for aTuple in my2DTuple: 7| for num in aTuple: 8| sum += num 9| print(sum) The code above adds up every integer in the 2D tuple my2DTuple. The goal is for it to print sum once at the end, once all the numbers have been added. Right now, however, it's printing sum after each individual number is added. sum is calculated correctly, but it is printed at every step along the way. How would we change this code so that sum prints only once, after all the numbers have been added? Select all the changes we would need to make.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. a company wants to use online methods to target more customers. it decides to conduct a market research by collecting the data of a few customers with their consent. they want to track data of the sites that their customers frequently visit. which software can the company? a. spyware b. bots c. adware d. trojan horse e. rootkits
Answers: 1
question
Computers and Technology, 25.06.2019 00:00
When pasting an existing chart into a word document, you can choose to using the paste options button. a. paste the chart as a picture b. embed the chart c. add the chart while keeping the destination formatting intact d. insert the chart while keeping the source formatting intact
Answers: 1
question
Computers and Technology, 25.06.2019 01:00
Why is outfitting a workplace with video games in a technology development company consiered a strategic use of money
Answers: 1
You know the right answer?
0.0/2.0 points (graded) 1| my2DTuple = ((1, 2, 3), 2| (4, 5, 6), 3| (7, 8, 9)) 4| 5| sum = 0 6| for...
Questions
question
Social Studies, 03.12.2019 20:31
Questions on the website: 13722363