Question-69: When you run this below code snippet it print 55.0 on console.
n=??
sum=(n* (n+1))/2
print(sum)
What is the value, variable “n” is holding?
- 55
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Answer : B
Exp:
Simple program for sum of numbers
- If you want to print a sum of numbers.
- Change the value of n and try again and again
You can access to full explanation to question and answer from this page.