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, 23.06.2019 22:20
Read “suburban homes construction project” at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
question
Computers and Technology, 25.06.2019 02:30
Ahammer should not be applied to the gear shafts of an electric rotisserie because the shafts may be made of
Answers: 1
question
Computers and Technology, 25.06.2019 03:30
Kou converged his word document to a powerpoint document. when he received the powerpoint, he was missing material. which most likely explains why the material was missing? a it did not have a proper heading b he incorrectly copied and pasted it c he did not save his document properly d there was not enough space in powerpoint
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
Questions on the website: 13722361