#10 Understanding for loops with List | Python Tutorial Series | EMC Academy

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 พ.ย. 2024

ความคิดเห็น • 228

  • @jjjmemes420
    @jjjmemes420 7 หลายเดือนก่อน +24

    7 question i solved😊
    a=0
    For i in range(1, 11) :
    num=int(input ("enter the number:"))
    a=num+a
    Print("the total is:", a)
    Print("the average is:", a/10)

    • @preethisuriya4380
      @preethisuriya4380 15 วันที่ผ่านมา

      neenga kuduthathu ok but input 1,11 num illa any 10 num so above program only crt

  • @jaisrees.b9723
    @jaisrees.b9723 ปีที่แล้ว +19

    8.n=int(input())
    print("the first",n,"natural numbers:")
    b=[ ]
    for i in range(n):
    b.append(i+1)
    print(b)
    sum=0
    for i in b:
    sum=sum+i
    print("sum:",sum)
    Output:
    7
    the first 7 natural numbers:
    [1,2,3,4,5,6,7}
    sum:28

    • @nonopno
      @nonopno 7 หลายเดือนก่อน +1

      😢😅

    • @orubook
      @orubook 6 หลายเดือนก่อน

      🎉

    • @Anandh-tb3xh
      @Anandh-tb3xh 27 วันที่ผ่านมา

      last print("sum:"+str(sum))

  • @seethalakshmi9504
    @seethalakshmi9504 ปีที่แล้ว +26

    7Q answer:
    a=[]
    sum=0
    for i in range(1,6):
    sum=sum+i
    avg=sum/5
    Print(sum )
    Print(avg)
    Output:
    15
    3.0

    • @seethalakshmi9504
      @seethalakshmi9504 ปีที่แล้ว +2

      @@rajendraprasath8890 just try

    • @englishtub
      @englishtub 6 หลายเดือนก่อน

      @@seethalakshmi9504 bro it is correct ? pls reply i am confused 🤯🤯🤯

    • @fami003
      @fami003 6 หลายเดือนก่อน +1

      It's wrong

    • @fami003
      @fami003 6 หลายเดือนก่อน +2

      U adding the count of the number u need to add the numbers by appending and then find the sum & avg

    • @thalaivasalmohan5517
      @thalaivasalmohan5517 5 หลายเดือนก่อน +1

      U dint got input from user u just took your own numbers

  • @SowndhariyaRajasekar
    @SowndhariyaRajasekar 8 หลายเดือนก่อน +9

    Qus 9
    A=int(input("enter the number of terms"))
    for i in range (1,a+1):
    Print("number is:",i,"and cupe of the",i,"is:",i*i*i*)

  • @arunhhh333
    @arunhhh333 ปีที่แล้ว +15

    for i in range(1,6):
    Num=(i*i*i)
    print("Number is :",i,"and cube of the",i,"is :",Num)

    • @NaveenRaajK
      @NaveenRaajK 8 หลายเดือนก่อน

      instead of multiplying i by i*i*i u can just manipulate it as Num = (i**3) here ** refers to the power exponential factor which would take any num in its right side to the power of the value in its left side then I**3 wiud be cube of the number i

  • @seethalakshmi9504
    @seethalakshmi9504 9 หลายเดือนก่อน +4

    7Q
    a=[ ]
    Print ("enter the number ")
    For i in range(5):
    num=(int(input("enter num"+str(i+1)))
    a. append(num)
    Print(a)
    Sum=0
    for i in a:
    Sum =sum + i
    Ave=sum/5
    Print (sum)
    Print (ave)
    Output:
    15
    30.0

    • @salimsrk151
      @salimsrk151 7 หลายเดือนก่อน

      a=[]
      print("enter the number ")
      for i in range(5):
      num=(int(input("enter num"+str(i+1))))
      a.append(num)
      print(a)
      sum=0
      for i in a:
      sum =sum + i
      ave=sum/5
      print(sum)
      print(ave)

  • @rajithaajitha
    @rajithaajitha ปีที่แล้ว +7

    Hello bro. Thanks so much for your effort. After 12 years gap, I started learning programming. Your tutorial is very helpful for understanding.

    • @nonopno
      @nonopno 7 หลายเดือนก่อน

      Age 12 🤔

  • @JPRINGS
    @JPRINGS ปีที่แล้ว +14

    a=int(input("enter tha value"))
    b=[]
    for i in range(a):
    b.append(i+1)
    print("the first",a, "natural number is : ",b)

  • @Jayasri.B-p2s
    @Jayasri.B-p2s 4 หลายเดือนก่อน +7

    one small differentiation:
    In python while using comma , separator in print statement for concatenate it automatically converts integer to a string so we don't need to specify str(i). Directly you can mention ,i
    a = int(input("test data: "))
    for i in range(1, a + 1):
    print("Number is", i, "and cube of the number", i, "is", i**3)
    If we use '+" concatenate for converting integer to string, we need to specify str(i)
    a = int(input("test data: "))
    for i in range(1, a + 1):
    print("Number is " + str(i) + " and cube of the number " + str(i) + " is " + str(i**3))
    output:
    test data: 5
    Number is 1 and cube of the number 1 is 1
    Number is 2 and cube of the number 2 is 8
    Number is 3 and cube of the number 3 is 27
    Number is 4 and cube of the number 4 is 64
    Number is 5 and cube of the number 5 is 125

    • @Legend-gn9on
      @Legend-gn9on 4 หลายเดือนก่อน +1

      Nice bro

    • @SunderasanManivel
      @SunderasanManivel 3 หลายเดือนก่อน

      num=int(input())
      for loop in range(1,num+2):
      a=loop*loop*loop
      b="number of "+str(loop)+"cube is "+str(a)
      print(b)

  • @R.A.G.U.L
    @R.A.G.U.L ปีที่แล้ว +14

    7th question answer:
    n = int(input())
    sum = 0
    print("The first",n,"Natural numbers are:")
    for i in range(1,n+1):
    print(i)
    sum = sum + i
    print("The sum of",n,"Natural numbers are:",sum)

    • @justtryguys
      @justtryguys 9 หลายเดือนก่อน

      Ithu 8th question nga

  • @cinemareeltamil
    @cinemareeltamil 4 หลายเดือนก่อน +3

    Q9:
    a=int(input())
    for i in range(1,a+1):
    print("the number is",i,"the cube is",i*i*i)

  • @yogeshcr778
    @yogeshcr778 4 หลายเดือนก่อน +2

    simple answer:
    sum=0
    a=[]
    for i in range(10):
    b=int(input())
    a.append(b)
    sum=sum+a[i]
    print(sum)
    print(sum/10)

  • @nonopno
    @nonopno 7 หลายเดือนก่อน +2

    a =[]
    sum=0
    print("please Enter 5 subject mark :")
    for i in range(1,6):
    number =int(input("Enter the mark subject" +str(i) +": "))
    a.append(number)
    sum =sum+number
    ave =sum/i

    print("Your number list" ,a)
    print("The total :",sum)
    print("The Average :",ave,"%")
    if(ave

  • @hariram3988
    @hariram3988 ปีที่แล้ว +5

    7. Answer
    а=[]
    print ("Natural numbers")
    for i in range (1,8):
    a.append(i)
    print (a)
    sum=0
    for i in a:
    sum=sum+i
    print (sum)

  • @cinemareeltamil
    @cinemareeltamil 4 หลายเดือนก่อน +2

    Q7:
    a=[]
    for i in range(1,11):
    num=int(input("enter num"+str(i)))
    a.append(num)
    print(sum(a))
    print(sum(a)/10)

  • @Ditch-TheDiet
    @Ditch-TheDiet 5 หลายเดือนก่อน +1

    Q.no:8
    a = [ ]
    b = int(input())
    for i in range(1,b+1):
    a.append(i)
    print(a)
    sum = 0
    for i in a:
    sum = sum + i
    print(sum)

  • @user-lz8mq4wt1l
    @user-lz8mq4wt1l ปีที่แล้ว +16

    Bro thx for ur effect
    Ur way of learning is simple
    Pls continue this series
    U teach everything in python
    I trust u man

  • @realearnings1602
    @realearnings1602 ปีที่แล้ว +51

    Last 9 videos pakka but intha video romba confusing sollapona sutthama purila 😢😢😢

  • @King26787
    @King26787 11 หลายเดือนก่อน +1

    9th question....
    a=int(input("enter the number_"))
    for i in range (1, a+1) :
    Print("number is :", i, "and cube of the", i, " Is:", i*i*i)

  • @vk_innovative5298
    @vk_innovative5298 ปีที่แล้ว +5

    n=int(input())
    for i in range (1,n):
    print("Number is : " + str(i) + "and the cube of " + str(i) + "is :" + str(i**3))

  • @vinothannc1077
    @vinothannc1077 9 หลายเดือนก่อน +1

    7th question
    number = int(input("Enter a number :"))
    natural_numbers = ' '
    sum_numbers = 0
    for i in range(1, number + 1):
    sum_numbers = sum_numbers + i
    natural_numbers = natural_numbers + str(i) + ' '
    print(f"The first {number} Natural numbers are : {natural_numbers}")
    print(f"The sum of {number} is : {sum_numbers}")

  • @Maichel07
    @Maichel07 2 หลายเดือนก่อน

    7Q:
    a=[]
    for i in range (5):
    num=int(input ("Enter a number:"))
    a.append(num)
    sum=sum(a)
    len=len(a)
    avg=(sum/len)
    print(a)
    print("sum of a is",sum)
    print("average of a is",avg)

  • @mech_01_aishvharyha29
    @mech_01_aishvharyha29 ปีที่แล้ว +5

    Bro instead of using the term (i*i*i) for getting cube of the respective I value....we can use the term (i**3)....this can reduce the length of the code and also it's time saving....try this method guys!

    • @Partha2503
      @Partha2503 ปีที่แล้ว +1

      there is no difference in the lines of code in both the cases .so no problem any one of the both logics can be used!

  • @Neel993ksjue
    @Neel993ksjue 10 หลายเดือนก่อน +3

    for I in range(1,6):
    num=i*i*i
    print("Number is:" +str(i),"and cube of the" +str(i),"is:",num)
    Output
    Number is: 1 and cube of the 1 is:1
    Number is: 2 and cube of the 2 is:8
    Number is: 3 and cube of the 3 is:27
    Number is: 4 and cube of the 4 is:64
    Number is: 5 and cube of the 5 is:125

  • @nimaleshdroid4388
    @nimaleshdroid4388 หลายเดือนก่อน

    this one is using list :
    #same 7th question using list (get 10 numbers from user as input and find sum and avg)
    #this time using list
    sum = 0
    count = 0
    a=[]
    for i in range(0,5):
    ele = int(input(f"enter the number {count+1}: "))
    a.append(ele)
    count = count + 1
    sum = sum + ele
    average = sum/count
    print(a)
    print(sum)
    print(average)

  • @abirajjr
    @abirajjr 10 หลายเดือนก่อน

    Question 9
    n=int(input("Input number of terms : "))
    for i in range(1,n+1):
    print("Number is:",i,"and cube of the ",i,"is :",i*i*i)
    31:28

  • @sparrowlover1781
    @sparrowlover1781 หลายเดือนก่อน

    Question no 7.
    addition=0
    count=0
    for i in range(1,11):
    num=int(input())
    addition=addition+num
    count=count+1
    avg=addition/count
    print(addition)
    print(avg)

  • @kabilandina11
    @kabilandina11 8 หลายเดือนก่อน +2

    Question no.9
    a=int(input("Enter the number:"))
    For i in range(a):
    b=i*i*I
    Print("number is:"+str(i),"and cube of the"+str(i),"is:",b)

  • @abdulazees8060
    @abdulazees8060 10 หลายเดือนก่อน

    9.
    num=int(input("Enter A Number"))
    for i in range(1,num+1):
    cube=i**3
    Print("Number Is:",i,"And Cube Is:",cube)

  • @mugeshmani9790
    @mugeshmani9790 8 หลายเดือนก่อน

    Q9
    Num=0
    For I in range(1,6):
    Print("number is:, num+i, "and cube of the", num+i, " Is:", i*i*i)

  • @abirajjr
    @abirajjr 10 หลายเดือนก่อน

    Question 8
    n = int(input("Enter the number of terms: "))
    numbers = []
    for i in range(1, n+1):
    numbers.append(i)
    print(i, end=" ")
    sum=0
    for i in numbers:
    sum=sum+i
    print("
    The sum of the first", n, "natural numbers is:",sum)
    31:23

  • @pythondeveloper03
    @pythondeveloper03 ปีที่แล้ว +2

    question no 9
    a=[]
    for i in range(1,6):
    a.append(i)
    print(i*i*i)

  • @Thugx_
    @Thugx_ 5 หลายเดือนก่อน +1

    7Q:
    a=[]
    for i in range(10):
    num=int(input(str(i+1)+"enter:"))
    a.append(num)
    sum=0
    avg=0
    for i in a:
    sum=sum+i
    avg=sum/10
    print(sum)
    print(avg)

  • @19CSC40Naveen
    @19CSC40Naveen 2 หลายเดือนก่อน

    Q8
    a=[]
    n=int(input("Enter num:"))
    for i in range(1,n+1):
    a.append(i)
    print(f"The First {n} Natural Number is:{a}")
    sum=0
    for i in a:
    sum=sum+i
    print(f"sum={sum}")

  • @logeshwaran7434
    @logeshwaran7434 5 หลายเดือนก่อน

    Qus-9
    n = int(input ())
    for i in range(1,n+1):
    b = int(input("Enter the num"+str(i)+":"))
    c = b**3
    print("cube of the",b,"is",c)

  • @nimaleshdroid4388
    @nimaleshdroid4388 หลายเดือนก่อน

    here is the 7th question, hope it is correct,
    #question 7 : program to read 10 nos from keyboard and find their sum and avg
    print ("")
    sum =0
    count =0
    max_limit = int(input ("enter the max range of the sequence: "))
    max_limit = max_limit + 1
    for i in range (1,max_limit):
    elements = int(input("enter the values to be added in the sequence: "))
    count = count + 1
    sum = (sum + elements)
    average = sum/count
    print(f"the sum of the sequence is {sum}")
    print(f"the average of the sequence is {average}")

  • @farithh6830
    @farithh6830 3 หลายเดือนก่อน +1

    Q8:
    n=int(input("Enter Number = "))
    sum=0
    for i in range(1,n+1):
    print(i)
    sum = sum + i
    print("Natural Number")
    print("Total Number",sum)
    print(sum)
    ANSWER:
    1
    2
    3
    4
    5
    6
    7
    NATURAL NUMBER
    TOTAL NUMBER
    28
    Q9:
    n=int(input("Enter Number = "))
    sum=0
    for i in range(1,n+1):
    print("The number is ",i,"the cube of the",i,"is",i**3)
    ANSWER:
    Enter Number = 5
    The number is 1 the cube of the 1 is 1
    The number is 2 the cube of the 2 is 8
    The number is 3 the cube of the 3 is 27
    The number is 4 the cube of the 4 is 64
    The number is 5 the cube of the 5 is 125

  • @subashsmiles5447
    @subashsmiles5447 7 หลายเดือนก่อน

    9th question answer using formatted strings:
    for i in range (1,6):
    print(f"Number is : {i} and cube of the {i} is :", i*i*i)

  • @tnpugazhyt5732
    @tnpugazhyt5732 ปีที่แล้ว +2

    8.
    a=int(input(enter a number))
    for i in range(1,a+1):
    print(i)

  • @nonopno
    @nonopno 7 หลายเดือนก่อน

    8)
    n =int(input())
    b=[]
    sum =0
    for i in range(n) :
    b.append(i+1)
    sum =sum +i
    print("List",b)
    print("Total : ",sum) 31:54 31:54

  • @MR.Vampire_21
    @MR.Vampire_21 3 หลายเดือนก่อน +1

    Super explanation bro all the best ❤ 7 question super thanks bro❤👍

  • @wizzygamer2572
    @wizzygamer2572 ปีที่แล้ว +2

    a=int(input("test data"))
    b=[]
    for i in range(1,a):
    b.append(i)
    print(b)

  • @tolltown
    @tolltown 5 หลายเดือนก่อน

    8Q Ans:
    a=[]
    print("n team of natural numbers:")
    for I in range(1,8):
    b=int(input(str(I)))
    a.append(b)
    print(a)
    sum=0
    for I in a:
    sum=sum+I
    print(sum)
    Ans=28

  • @rajeshmechdesire
    @rajeshmechdesire 10 หลายเดือนก่อน +1

    Solution for exercise 8 is
    cube = []
    a = int(input("Enter the number 1: "))
    b = int(input("Enter the number 2: "))
    for i in range (a,b+1):
    cube.append(i)
    print("Cube of Number" + " " + str(i) + " " + str(i*i*i))
    print(cube)
    entered Value: 5
    output is
    Enter the number 1: 1
    Enter the number 2: 5
    Cube of Number 1 1
    Cube of Number 2 8
    Cube of Number 3 27
    Cube of Number 4 64
    Cube of Number 5 125
    [1, 2, 3, 4, 5]

  • @maharaja8692
    @maharaja8692 ปีที่แล้ว

    9.Ans
    for i in range(1,6):
    print("Number is:",i,"and cube of the",i,"is:",i**3)

  • @velanmurugesan4439
    @velanmurugesan4439 3 หลายเดือนก่อน

    8th question perfect answer is:
    n=int(input("enter the number:"))
    print ("the list of natural numbers before "+str(n)+" are,")
    a=[ ]
    for i in range(1,n+1):
    a.append(i)
    print(i,end=" ")
    print("
    ")
    b=sum(a)
    print("total sum="+str(b))

  • @animeshff.09
    @animeshff.09 2 หลายเดือนก่อน

    QUESTION 8:
    Q8. Write a program to display n terms of natural numbers and their sum
    CODE :
    a=[]
    sum=0
    b=int(input("ENTER THE NUMBER :"))
    for i in range(b):
    sum=sum+i
    a.append(i+1)
    print(a)
    print("SUM OF THE NUMBERS :",sum)

  • @19CSC40Naveen
    @19CSC40Naveen 2 หลายเดือนก่อน

    Q9
    a=[]
    n=int(input("Enter num:"))
    for i in range(1,n+1):
    a.append(i)
    print(f"Input Number of Terms:{n}")
    for i in a:
    print(f"Number is:{i} and cube of the {i} is:{i**i}")

  • @fazilahamed6751
    @fazilahamed6751 10 หลายเดือนก่อน

    g=int(input("enter the number:"))
    for i in range(1,g+1):
    print("number is:",str(i),"and cube of the ",str(i),"is :",i*i*i)

    • @fazilahamed6751
      @fazilahamed6751 10 หลายเดือนก่อน

      output:
      enter the number:5
      number is: 1 and cube of the 1 is : 1
      number is: 2 and cube of the 2 is : 8
      number is: 3 and cube of the 3 is : 27
      number is: 4 and cube of the 4 is : 64
      number is: 5 and cube of the 5 is : 125

  • @rajeshmechdesire
    @rajeshmechdesire 10 หลายเดือนก่อน

    solution for exercise 7 (using loop and list)
    list = []
    b = int(input("Enter the Number: "))
    for i in range(1,b+1):
    list.append(i)
    print(list)
    sum = 0
    for i in list:
    sum = sum + i
    print(sum)
    output:
    Enter the Number: 6
    [1, 2, 3, 4, 5, 6]
    21

  • @Abi_2405
    @Abi_2405 3 หลายเดือนก่อน +2

    8th question:
    ~~~~~~~~
    sum=0
    print("The first 7 natural number is:")
    for i in range(1,8):
    sum=sum+i
    print(i)
    print("sum of first 7 natural number is:")
    print(sum)
    Output:
    ~~~~
    The first 7 natural number is:
    1
    2
    3
    4
    5
    6
    7
    sum of first 7 natural number is:
    28
    === Code Execution Successful ===
    ❤Thank you❤

    • @iyarkai577
      @iyarkai577 2 หลายเดือนก่อน

      Super pa

    • @KakashiHatake-v1i
      @KakashiHatake-v1i 2 หลายเดือนก่อน

      Ithu wrong ithu illa answer

    • @Abi_2405
      @Abi_2405 2 หลายเดือนก่อน

      @@KakashiHatake-v1i illaye crt dhaan

    • @Abi_2405
      @Abi_2405 2 หลายเดือนก่อน

      @@iyarkai577 nandrii😇

    • @KakashiHatake-v1i
      @KakashiHatake-v1i 2 หลายเดือนก่อน

      @@Abi_2405 actually output vanthu avaru row ah vara soli irukaru...nenga kudutha output column ah irkum nala parunga...end separator use pananum nu nenaikran

  • @potterhead1816
    @potterhead1816 5 หลายเดือนก่อน

    q 8 ans=
    sum=0
    l=int(input())
    for i in range (l):
    print(i+1)
    sum=sum+i+1
    print(sum)

  • @vigneshsriraam
    @vigneshsriraam ปีที่แล้ว +9

    bro 1080p la videos upload pannunga please...

  • @sureshkrishna.m9817
    @sureshkrishna.m9817 5 หลายเดือนก่อน

    Q.9)
    n=int(input("n"))
    for i in range(1,n+1):
    print("Number is:",i,"and cube of the",i,"is",i*i*i)
    Run(F5). Output
    n=5
    Number is:1 and cup of the 1 is:1
    Number is:2 and cup of the 2 is:8
    Number is:3 and cup of the 3 is:27
    Number is:4 and cup of the 4 is:64
    Number is:5 and cup of the 5 is:125
    ❤❤❤❤❤❤❤❤❤❤

  • @MuthuAlagar-w8o
    @MuthuAlagar-w8o 4 หลายเดือนก่อน

    a=1
    count=0
    b=int(input())
    for i in range(b):
    sum=a+i
    count=count+sum
    print(sum)
    print(count)

  • @savithan275
    @savithan275 2 หลายเดือนก่อน

    8)n=int(input())
    for i in range(n):
    print("number is:",i+1,"and cube of the",n,"is:",i*i*i)

  • @jiljunk330
    @jiljunk330 7 หลายเดือนก่อน

    Program for cube:
    for i in range(1,6):
    n=int(input("Enter the number:"))
    print("Number is :",i,"and cube of the :",i,"is",i*i*i)
    Expected output:
    Enter the number:1
    Number is : 1 and cube of the : 1 is 1
    Enter the number:2
    Number is : 2 and cube of the : 2 is 8
    Enter the number:3
    Number is : 3 and cube of the : 3 is 27
    Enter the number:4
    Number is : 4 and cube of the : 4 is 64
    Enter the number:5
    Number is : 5 and cube of the : 5 is 125

  • @cinemareeltamil
    @cinemareeltamil 4 หลายเดือนก่อน +2

    Q8:
    a=int(input())
    for i in range(1,a+1):
    print(i)
    output:
    7
    1 2 3 4 5 6 7

    • @farithh6830
      @farithh6830 3 หลายเดือนก่อน

      where is a sum

    • @Abi_2405
      @Abi_2405 3 หลายเดือนก่อน

      8th sum:
      sum=0
      print("The first 7 natural number is:")
      for i in range(1,8):
      sum=sum+i
      print(i)
      print("sum of first 7 natural number is:")
      print(sum)
      Output:
      The first 7 natural number is:
      1
      2
      3
      4
      5
      6
      7
      sum of first 7 natural number is:
      28
      === Code Execution Successful ===

  • @teenastanly
    @teenastanly 4 หลายเดือนก่อน

    7 .
    a=[]
    Print("Enter 10 numbers ")
    For in in range (10):
    num=int(input(f"Enter num {i+1} : "))
    a.append(num)
    Sum=0
    For i in a:
    Sum=sum+i
    Print(f"sum = {sum}")
    Print(f"average ={sum/10}")

  • @rishipoobesh1450
    @rishipoobesh1450 หลายเดือนก่อน

    8)
    a=[]
    print("The first 7 natural numbers are:")
    for i in range(1,8):
    a.append(i)
    print(a)
    sum=0
    for i in a:
    sum=sum+i
    print("The sum of first 7 natural numbers are:",sum)

  • @Forlearningskills
    @Forlearningskills ปีที่แล้ว +4

    8Q
    a=int(input("Test Data: "))
    b=[]
    for n in range(1,a+1):
    b.append(n)
    print("The first "+str(a)+" natural number is: ")
    for n in b:
    print(n)
    sum=0
    for n in b:
    sum=sum+n
    print("Their sum="+str(sum))

    • @Azazel432
      @Azazel432 ปีที่แล้ว

      thank u so much for sharing this answer

  • @muducidulama
    @muducidulama 2 หลายเดือนก่อน

    7q ans
    a=[]
    c=0
    v=0
    for i in range(10):
    b=int(input())
    a.append(b)
    v+=1
    for j in a:
    c=c+j
    print(c//v)

  • @RahulB-i3q
    @RahulB-i3q 10 หลายเดือนก่อน

    n=int(input("Enter the end natural Number:"))
    print("The first {} Natural number is:". format(n))
    for i in range(1,n+1):
    print(i,end=" ")

  • @subashsmiles5447
    @subashsmiles5447 7 หลายเดือนก่อน +3

    You have explained if loop at your very best and it was clear, but in for loop you are bringing too much functions that we are confused to understand!!

  • @mohanapriyaa3818
    @mohanapriyaa3818 ปีที่แล้ว +6

    Idhu varaikum vandha vdos lam purinjuthu indha vdo semmaya kolapiduchu bro😢

  • @romy_editz6026
    @romy_editz6026 2 หลายเดือนก่อน

    ques 9
    a=int(input())
    for i in range(a):
    print("Number is",i+1,"and cube root of",i+1,"is:",((i+1)**3))

  • @seethalakshmi9504
    @seethalakshmi9504 9 หลายเดือนก่อน

    8Q
    n=int(input("test data:"))
    Print ("the first {0} natural number is". format(n))
    for i in range(1,n+1)
    Print(i, end=' ')
    Output:
    Test data:7
    The first 7 natural number is:
    1 2 3 4 5 6 7

  • @nimaleshdroid4388
    @nimaleshdroid4388 หลายเดือนก่อน

    #question8 : to find the sum of n natural nos., let me know if it can be minimalized.
    sum = 0
    count = 0
    a = []
    n = int(input(f"enter the no. of digits for summing: "))
    for i in range (n):
    count = count + 1
    a.append(count)
    print(a)
    print(f"the list of natural nos. are:")
    for i in (a):
    print(i)
    sum = sum + i
    print (f"the sum value of the sequence: {sum}")

  • @chandkishore
    @chandkishore ปีที่แล้ว

    for i in range(1,6):
    print("the number :",str(i), "and the cube is", i**3)

  • @ramkumar-df5fw
    @ramkumar-df5fw ปีที่แล้ว +1

    Hi EMC and Hello friends ,
    Here I am shared the Program for Two questions :
    1.Sum of First n natural number :
    a=int(input("Test data : "))
    b=[]
    s=0
    for i in range(0,a+1):
    b.append(i)
    print(i)
    s=s+i
    print(b)
    print(s)
    2.Cube Problem:
    a=int(input("Test data :"))
    sum=0
    for i in range(0,a+1):
    sum=sum+i
    print("Number is : "+str(i)+" and cube of the "+str(i)+" is : ",(i*i*i))

    Some what I solved this I am learning too and its because of your teaching please Keep up the Good Work Brother @EMC

    • @UNIQUEFASHION-mr9wl
      @UNIQUEFASHION-mr9wl ปีที่แล้ว +1

      Bro ithu correct ahh?

    • @ramkumar-df5fw
      @ramkumar-df5fw ปีที่แล้ว

      @@UNIQUEFASHION-mr9wl Hi Bro, Please let me know if any changes required . its worked and I got the excepted Output. please let correct me if anything wrong on the code

    • @linz834
      @linz834 ปีที่แล้ว

      ​@@ramkumar-df5fwbro first sum la average varala

  • @AJITHKUMARRAVI
    @AJITHKUMARRAVI ปีที่แล้ว

    gnum=int (input("How many cube value needed:"))
    for i in range(gnum):
    c=(i+1)
    d=c*c*c
    print("Number is:",c,"and cube of the",c,"is :",d)

  • @shuraimaslam
    @shuraimaslam ปีที่แล้ว +3

    question 9 answer :
    for i in range(int(input("no.of terms:"))):
    num=((i+1)*(i+1)*(i+1))
    print("number is",i+1,"and cube of the",i+1,"is",num)

    • @arunhhh333
      @arunhhh333 ปีที่แล้ว +1

      for i in range(1,6):
      Num=(i*i*i)
      print("Number is :",i,"and cube of the",i,"is :",Num)

  • @AkAk-sy2nx
    @AkAk-sy2nx ปีที่แล้ว

    8 question answe program:
    a=int(input("Enter number:"))
    b=[]
    for i in range(a):
    b.append(i+1)
    for i in b:
    print("Number is:",i,"and cube of",i,"is:",i*i*i)

  • @imsumo7891
    @imsumo7891 ปีที่แล้ว

    a=[]
    sum=0
    for i in range(7):
    num=int(input("Enter Num "+str(i+1)))
    sum=sum+num
    print(sum)

  • @dasarathraketh440
    @dasarathraketh440 หลายเดือนก่อน

    Understood clearly bro ❤🔥 Superb🙏🏻

  • @kameshkumar9236
    @kameshkumar9236 ปีที่แล้ว

    for i in range(1,6):
    print('number is :',i,'and cube of the', i ,'is :',i*i*i)

  • @Thilak_07
    @Thilak_07 ปีที่แล้ว

    21:40 instead of changing i into string we can use f(literal string) to add : (colon) after number to make it easier to understand. ie... (f"enter number {i}: ")

  • @karuppasamibalakrishnan7154
    @karuppasamibalakrishnan7154 8 หลายเดือนก่อน

    7Q ANSWER:
    n=[]
    for a in range(10):
    num=int(input())
    n.append(num)
    sum=0
    for b in (n):
    sum=sum+b
    print(sum/10)

  • @S.p.Jeevaperisan
    @S.p.Jeevaperisan 4 หลายเดือนก่อน

    for I in range(1,6):
    num=I*I*I
    print("Number is:",I,"cube of the",I,"is:",num)

  • @Sulthanaravi07
    @Sulthanaravi07 ปีที่แล้ว +5

    7. a=[]
    sum=0
    for i in range(10):
    num=int(input("enter num"+str(i+1)+":"))
    a.append(num)
    print(a)
    sum=sum+num
    average=sum/len(a)
    print(sum)
    print(average)

  • @mothish.
    @mothish. ปีที่แล้ว

    8)num=int(input("enter number"))
    for i in range(num):
    print(i+1)

  • @pradeesh5718
    @pradeesh5718 6 หลายเดือนก่อน +2

    7.average output is missing
    Avg=sum/len(a)
    Print(a)

  • @takemytech88
    @takemytech88 ปีที่แล้ว

    for i in range(1,7):
    print(i, "and cube of the ", i, ":" , str(i*i*i))

  • @imsumo7891
    @imsumo7891 ปีที่แล้ว

    a=[]
    sum=0
    count=0
    for i in range(10):
    num=int(input("Enter Num "+str(i+1)))
    a.append(num)
    sum=sum+num
    count=count+1
    print(sum)
    print(sum/count)

  • @sureshkrishna.m9817
    @sureshkrishna.m9817 5 หลายเดือนก่อน

    Q.8)
    n=int(input("n="))
    a=[ ]
    print("The first 7 natural number is")
    for i in range(1,n+1):
    Print(i,end=" ")
    a.append(i)
    sum=0
    for i in a:
    sum=sum+i
    print()
    print("sum")
    print(sum)
    Run(F5). Output
    n=7
    The first 7 natural numbers is
    1234567
    sum
    28
    ❤❤❤❤❤❤❤❤❤❤

  • @saimanasab7386
    @saimanasab7386 5 หลายเดือนก่อน

    QN 7: my answer
    sum=0
    count=0.0
    avg=0
    lst=[]
    for i in range (10):
    num=int(input("Enter 10 Numbers to get its sum and avg:"))
    lst.append(num)
    print(num)
    count+=1
    print(lst)
    sum+=num
    avg=sum/count
    print("Sum of your numbers is:", sum)
    print("Avg of your numbers is:", avg)

  • @r15_menan
    @r15_menan ปีที่แล้ว +2

    a=int(input("a"))
    b=int(input("B"))
    c=int(input("C"))
    d=int(input("D"))
    e=int(input("E"))
    f=int(input("F"))
    g=int(input("G"))
    h=int(input("H"))
    i=int(input("I"))
    j=int(input("J"))
    k=a+b+c+d+e+f+g+h+i+j/10
    print("the average is", k)

    • @Shiva_shankaran
      @Shiva_shankaran ปีที่แล้ว

      you can use map function for multiple input

  • @nimaleshdroid4388
    @nimaleshdroid4388 29 วันที่ผ่านมา

    #question 9: write a program to display the cube of the number up to an integer. , (let me know if this can be simplified, thanks.)
    count = 0
    a = []
    seq = int(input("enter the value: "))
    for i in range (seq):
    count = count + 1
    a.append(count)
    #print (count)
    print(f"the {3} root of {count} is: {pow(count,3)}")

  • @Srinath143-q3b
    @Srinath143-q3b 3 หลายเดือนก่อน +8

    Not understand this video

  • @Gokul.M-yw8hq
    @Gokul.M-yw8hq 8 หลายเดือนก่อน

    for i in range(1,6):
    a=(i*i*i)
    print("Number is:",i,"and cube of the",i,'is:',a)
    ans:
    Number is: 1 and cube of the 1 is: 1
    Number is: 2 and cube of the 2 is: 8
    Number is: 3 and cube of the 3 is: 27
    Number is: 4 and cube of the 4 is: 64
    Number is: 5 and cube of the 5 is: 125
    _____x_____

  • @punithavalli1306
    @punithavalli1306 8 หลายเดือนก่อน

    8. Write a program to display n terms of natural numbers and their sum
    Test Data:7
    Expected output: The first 7 natural number is: 1,2,3,4,5,6,7.
    My ans 👇🏻:

    • @punithavalli1306
      @punithavalli1306 8 หลายเดือนก่อน

      n=int(input("Enter the number"))
      sum=0
      for i in range (1,n+1):
      sum=sum+i
      print("The sum is:" , sum)
      • This is correct ✅ or wrong ❌ someone say plz... 😢😖😖.

  • @dwarakanaths7944
    @dwarakanaths7944 7 หลายเดือนก่อน

    Question 9:
    -----------
    Write a program to display cube of the number:
    Test Data:
    Input number of terms: 5
    Expected Output:
    ----------------
    Number is 1: and cube of the 1 is:1
    Number is 2: and cube of the 2 is:8
    Number is 3: and cube of the 3 is:27
    Number is 4: and cube of the 4 is:64
    Number is 5: and cube of the 5 is:125
    Solution:
    ---------
    a = int(input("Input number of terms: "))
    print("Expected Output:")
    print("----------------")
    for i in range(1,6):
    print("Number is:",i,"and cube of the",i,"is:",i*i*i)Output:
    Input number of terms: 5
    Expected Output:
    ----------------
    Number is: 1 and cube of the 1 is: 1
    Number is: 2 and cube of the 2 is: 8
    Number is: 3 and cube of the 3 is: 27
    Number is: 4 and cube of the 4 is: 64
    Number is: 5 and cube of the 5 is: 125

  • @g.k6561
    @g.k6561 ปีที่แล้ว +1

    7 question ku answer here
    a=[ ]
    c=int(input('how many number you have :'))
    for i in range(c):
    b=int(input( 'enter number '+str(i+1) +'\t:'))
    a.append(b)
    sum=0
    for i in a:
    sum=sum+i
    average=(sum)/c
    print('result is =',average)

  • @Vishwa0030
    @Vishwa0030 ปีที่แล้ว +6

    Intha video puriyala bro 😢 entha code oda output varamatikithu

  • @ManikandanC-f4b
    @ManikandanC-f4b ปีที่แล้ว

    n=int(input("Enter the value of n:"))
    sum=0
    print("the first",n,"natural number is:")
    for i in range(1,n+1):
    sum=sum+i
    print(i)

    print("the sum of first",n,"natural numbers is:",sum)
    output:
    Enter the value of n:5
    the first 5 natural number is:
    1
    2
    3
    4
    5
    the sum of first 5 natural numbers is: 15

  • @danieldani3130
    @danieldani3130 4 หลายเดือนก่อน

    I haven doubt in understanding forloop with list; 7,8 problem.
    In 7th problem how to enter or calculate average.
    In that video find out adding and the average.but, adding only shows in video.
    Gave a small tip for 8th problem

  • @logeshwaran7434
    @logeshwaran7434 5 หลายเดือนก่อน

    Qus-8
    n = int(input ())
    a = [ ]
    for i in range(1,n+1):
    a.append(i)
    print(a)

  • @ashokkrc1467
    @ashokkrc1467 ปีที่แล้ว +3

    Hey bro this is your subscriber from Australia!!
    My programming exam is commencing on next month week -1 , I kindly request you to post some videos of def class and while loop , import modules and json file as well
    I’m an international student from south india

    • @ErrorMakesClever
      @ErrorMakesClever  ปีที่แล้ว +2

      All the best brother. We will try to upload more videos soon.

    • @ItsmeBharathi20
      @ItsmeBharathi20 10 หลายเดือนก่อน

      Sir intha video Romba confuse aaguthu .pls antha 8th qn ku right code Inga sollunga sir

    • @VigneshVignesh-sp3zn
      @VigneshVignesh-sp3zn หลายเดือนก่อน

      Yes bro konjam reply pannuga bro nenga two questions ha mix panni sollitinga bro ennaku cofuce ha eruku bro 🙏🙏🙏🙏 plZ reply bro na 11k pay panni veliya python basics learn panna join panna but avanga solli thadu puriyala unga video pathu tha kathukatan nenga endha video mattum konjam vera video make panni upload pannuga plZ bro 🙏🙏🙏🙏 nenga unga video va fulla watch pannuga apa tha nenga mistake pannadu ungaluku theriyum so plZ pathu konjam reply pannu bro plzzz bro 🙏🙏🙏🙏🙏🙏

  • @saddy2311
    @saddy2311 ปีที่แล้ว +2

    8q and 9q answers correct bro?
    a=[]
    for i in range(1,8):
    a.append(i)
    Print("the first 7 natural number is:",a)
    sum=0
    for i in a:
    sum=sum+i
    average=sum/2
    Print("average:",average)
    Output
    The first 7 natural number is: [1, 2, 3, 4, 5, 6, 7]
    Average: 14.0
    9q
    for i in range(1,6):
    print("number is:",i,"and cube of the",i,"is:",i*i*i)

    • @SKTheConqueror
      @SKTheConqueror ปีที่แล้ว

      Correct bro

    • @King26787
      @King26787 11 หลายเดือนก่อน

      Wrong, n need to input

  • @NaafeelMohamed-fq8bv
    @NaafeelMohamed-fq8bv หลายเดือนก่อน

    #---------Q7 Answer with SUM and Average---------------
    -----------------------------My Output-----------------------------------
    Input 10 Numbers.
    NUM 0: 1
    NUM 1: 2
    NUM 2: 3
    NUM 3: 4
    NUM 4: 5
    NUM 5: 6
    NUM 6: 7
    NUM 7: 8
    NUM 8: 9
    NUM 9: 10
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    Sum : 55
    Average : 5.5
    -----------------------------My Input---------------------------------------
    Ten_Numbers = [ ]
    print("Input 10 Numbers.")
    sum = 0
    Count = 0
    Avg = 0
    for Numbers in range(10):
    Input_Number = int(input("NUM " + str(Numbers) + ": "))
    Ten_Numbers.append(Input_Number)
    sum = sum + Input_Number
    Count = Count + 1
    Avg = sum / Count

    print(Ten_Numbers)
    print("Sum :",sum)
    print("Average :",Avg)
    ------------------I hope this will help for someone 😊------------------