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 16:20
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
What shows the web address of the page that is currently displayed in the workspace? status window toolbar location bar internet box
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Why would a business likely use a java applet - to back up their data files for the business - to create a program that a customer can launch in their web browser - to create music on a powerpoint presentation - to organize files on their company directory
Answers: 3
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
Mathematics, 30.09.2019 11:30