Using Python, add all integers from 0 to 25. At what point, does the sum exceed a value of 100? Print the value of the integer at which this occurs. The attachment has my code as I have worked it so far. How do I formulate an output that would ONLY print: "The sum of the square roots is 325 and the value where the sum exceeds 100 is 14."

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter5: Working With Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 4AYK
icon
Related questions
Question
100%

Using Python, add all integers from 0 to 25. At what point, does the sum exceed a value of 100? Print the value of the integer at which this occurs.

The attachment has my code as I have worked it so far.

How do I formulate an output that would ONLY print:

"The sum of the square roots is 325 and the value where the sum exceeds 100 is 14."

►Sum_2 = 0
for value in range(0,26):
Sum_2= Sum_2 + value
if (Sum_2100):
print('The value where the sum exceeds 100 is', value)
100 is 16
100 is 17
100 is 18
The value where the sum exceeds 100 is 14
The value where the sum exceeds 100 is 15
The value where the sum exceeds
The value where the sum exceeds
The value where the sum exceeds
The value where the sum exceeds 100 is 19
The value where the sum exceeds 100 is 20
The value where the sum exceeds 100 is 21
The value where the sum exceeds 100 is 22
The value where the sum exceeds 100 is 23
The value where the sum exceeds 100 is 24
The value where the sum exceeds 100 is 25
print('The sum of all integers is', Sum_2)
The sum of all integers is 325
Transcribed Image Text:►Sum_2 = 0 for value in range(0,26): Sum_2= Sum_2 + value if (Sum_2100): print('The value where the sum exceeds 100 is', value) 100 is 16 100 is 17 100 is 18 The value where the sum exceeds 100 is 14 The value where the sum exceeds 100 is 15 The value where the sum exceeds The value where the sum exceeds The value where the sum exceeds The value where the sum exceeds 100 is 19 The value where the sum exceeds 100 is 20 The value where the sum exceeds 100 is 21 The value where the sum exceeds 100 is 22 The value where the sum exceeds 100 is 23 The value where the sum exceeds 100 is 24 The value where the sum exceeds 100 is 25 print('The sum of all integers is', Sum_2) The sum of all integers is 325
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage