Комментарии:
sum=0
for count in range(1, 101):
sum = sum + count
print(sum)
sum=0
for i in range(1,101):
sum=sum+i
if i==100:
print('Sum:',sum)
Fact = 5
For i in range (4) :
Fact = ( fact * i )
Print ( fact )
Answer me sir i don't understand this problem sir
For anyone watching this video in 2023 (soon to be 2024):
Here is the homework answer if you want it :> :
number = 0
for number in range(0,100):
number = number+1
print(number)
Explanation :
So we will always start from 0 to obtain the next number. And as explained in the video, we take the range as well. So after that since we gave our beginning value of number '0', '0' + 1 = 1. And this will continue till the range is satisfied. This is the magic of for loop!
If somebody didnt understand, I am so sorry. Maybe I shouldnt be a teacher 😃
Thanks to you
Ответитьnumber=0
for number in range(0,100):
value=number+1
print(value,"+")
sum=0
for i in range(1,101):
sum=sum+i
print(sum)
First issue was understanding the word "iterate" lol
ОтветитьThank you for your lessons! You 're explaining really very good. I solved the task,you gave at the end of the video and I was excited, when it ran and everything was correct.
Ответитьresult = 0
for sum in range(1,101):
sum = sum + result
result = result + 1
print(result,"+",end=' ')
You’re brilliant - thank you :)
Ответитьlove you bro nice class
Ответитьcount=1
number=2
while count<=100 and number<=101:
ans=count+number
print(count,"+",number,"=",ans)
count=count+1
number=number+1
Man you are born to teach.. even a 5 years old can understand you..
ОтветитьAwesome Explanation Brother
Ответитьnumber = 100
product = 0
for sum in range(1, number + 1):
product = product + sum
print(product)
# Initialize a variable to store the sum
total_sum = 0
# Loop through numbers from 1 to 100 and add them to the sum variable
for num in range(1, 101):
total_sum += num
# Print the total sum
print("The sum of numbers from 1 to 100 is:", total_sum)
for i in range(1,101):
Sum+=i
print(Sum)
can you put a lint to the repsitory ?
ОтветитьFor result in range(1,101):
Sum= i + result
Result += 1
Print(sum)
programming Task solved:
this is Right?
x = 0
for count in range(0,100):
product = count + (x<= 100)
print(product)
number = int(input("Enter an integer: "))
for count in range(1, 100):
product = number + count
print(number, "+", count, "=", product)
Provided: 1 / it should be this one code, if I am correct. If not - please correct me. Thanks!
thanks!
ОтветитьPlease I don't get understand the trial Question🤷
Ответитьfor i in range (1, 100):
print(i, "+", end=" ")
print(100, end=" ")
print("=", sum (range(1,101)))
sum=0
print('sum of 1-100 is:')
for i in range(0,101):
sum=sum+i
if i==100:
print(sum)
bro you are awesome by watching your videos i am feeling confident to give my practical
Ответитьthis is the hardest thing ive learnt so far
Ответитьinstead of count = count + 1 , you could type count +=1
Ответитьhow can i find the solution of the task?
Ответитьthis video was very helpful!
Ответитьnumber=int(input("enter an integer "))
for count in range(1,11):
product=number*count
print(number,"x",count,"=",product)
output: 9x10=90
i was not happy with this answer
at 7minutes:02 seconds
could you please help me with it.
Thank you !
ОтветитьThis guy is the 🐐
Ответитьidk if you'll ever see this comment python sensei but i want you to know you deserve great things in life your videos have helped me so much in my learning journey
ОтветитьCould anyone clarify me how the result of the sum of 1 to 100 is not executed in the rows but as sum of all? i believed the for loop will provide result in rows, like 1+1 =2
2+1=3 etc
sum=0
for value in range(1,101):
sum= sum+value
print(sum)
Thank you sir 🙏 ☺
ОтветитьThanks for your clear enlightenment on python.
But mine did not work has yours did. It only took the last digit of the series of number who in my case was 20.
This is my code
Number = int(input("Enter an integer:"))
Product=number*count
Print(number, "X", count, "=", product)
i was looking for nested for loops
ОтветитьIs there any way to do step or skip in python in for loop
ОтветитьCan we print elements using "for" Loop side-by-side??
Can anyone get it??
Thank you for this tutorial.
Ответитьmy answer
number=int(input('Enter number:'))
for sequence in range(1,101):
sum=number+sequence
print(number,'+',sequence,'=',sum)
You == awesome
ОтветитьGreat video👍, the way of your explanation is very good👌, all concepts are clear.
ОтветитьHere it is...
Print("result")
For i in range(1,100):
Print(i,end="+")
Print(i+1)