Find the Sum of Natural Numbers using the Python Program.

preview_player
Показать описание


WsCube Tech is a leading Web, Mobile App & Digital Marketing company, and institute in India.

We help businesses of all sizes to build their online presence, grow their business, and reach new heights.

All the courses are job-oriented, up-to-date with the latest algorithms and modules, fully practical, and provide you hands-on projects.

📞 For more info about the courses, call us: +91-7878985501, +91-9269698122

✅ CONNECT WITH THE FOUNDER (Mr. Kushagra Bhatia) -

Connect with WsCube Tech on social media for the latest offers, promos, job vacancies, and much more:

--------------------------------------| Thanks |---------------------------
#python #pythontutorials #pythonprograms
Рекомендации по теме
Комментарии
Автор

😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments.

wscubetech
Автор

with for loop and function created: def natural_num_sum_for(n):
if n<0:
print("Enter the positive number")
else:
sum=0
for i in range(1, n+1):
sum+=i

return sum n= int(input("Enter the number: "))

print(natural_num_sum_for(n))

nhbdybz
Автор

Mam please attempt my question - write a program to calculate sum of first 50 natural numbers

nitinrao
Автор

Sir YouTube cms mcn ispe video bnaiye na plz, , master class bhi dijiye, , sir iska dashboard kaise lengai, , apna khud ka network, , es pr video bnaiye

Buranamaanomastihai
Автор

Mam please palindrome program bhi lao bhut important h please 🥺

mativeTech
Автор

N=int(input("enter any number till you want"))
Print(sum(range(1, n+1)))
😂😂😂😂 Most Easy one

swatdeep
Автор

jaise jaise programs ka level bdhta jarha hai logic samjh anna band horhe hai

BMWCLASSICS_
Автор

You can better use this formula: n(n+1)/2, along with a check of "no negative number to be entered".

Al-Ahdal
Автор

# Find the Sum of Natural Numbers using the Python Program.
n=int(input())
x=0
if n>=1:
for i in range(1, n+1):
x=x+i
print(x)

BhoomiGupta-pi