#27 Python Tutorial for Beginners | Array values from User in Python | Search in Array

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

Комментарии • 1,2 тыс.

  • @priyanshupatel02
    @priyanshupatel02 4 года назад +424

    Those who can not see the assignment due to Playlist in front of questions.. The assignment que. is:
    1) Create an array with 5 values & delete the value at index no. 2 without using in-built function.
    2) write a code to reverse an array without using in-built function.

    • @priyanshupatel02
      @priyanshupatel02 3 года назад +1

      @Prabesh Guragain at the end of the video u can see that...

    • @priyanshupatel02
      @priyanshupatel02 3 года назад +3

      @Prabesh Guragain in python series video no. #23 at time 7:42 u can see [upper(right side)] assignment

    • @Alexmercer0
      @Alexmercer0 3 года назад

      how did you removed that playlist??

    • @priyanshupatel02
      @priyanshupatel02 3 года назад +1

      @@Alexmercer0 i m not removed any Playlist itself.. I m just guessing + and i tried to saw the question little bit. 😋

    • @gogulanbazhakan3987
      @gogulanbazhakan3987 3 года назад +4

      Yes the video thumbnail recommendation is hiding the assignment questions in most of the videos.

  • @nishantsharma3100
    @nishantsharma3100 5 лет назад +96

    i do competitive coding, whenever i get confused with basic fundamentals , your channel is where i land. thanks bro . 🙌

    • @PawanKumar-ol5sl
      @PawanKumar-ol5sl 3 года назад +1

      What is competitive coding?

    • @vivekveeraswamyalli7787
      @vivekveeraswamyalli7787 3 года назад

      what is mean by competitive coding..?

    • @devashishthakkar6723
      @devashishthakkar6723 3 года назад +4

      @@vivekveeraswamyalli7787 bro there are different online platforms you can search for on browser with host special competitions..coding and this is called competitive coding..by participating and winning here you get grades and stars which you can mention in your resume or cv's...which can give u pretty decent placement and jobs.

    • @gourabchakraborty2209
      @gourabchakraborty2209 Год назад

      Hi @nishantsharma3100 , would you suggest a place I can start competitive coding. Let's just say I know python only from Telusko videos

  • @FonxyStar
    @FonxyStar 4 года назад +178

    the way he says "bye bye " at the end of the video makes me to feel something special....

    • @adamya3565
      @adamya3565 3 года назад +10

      if this is how you satisfy your need to feel special.. you are definitely in a need of girlfriend bro. :-D

    • @aashishmalhotra
      @aashishmalhotra 3 года назад

      Lol !!!

    • @HARSH-jj1qj
      @HARSH-jj1qj Год назад

      Are you gay bro 🧐

    • @FonxyStar
      @FonxyStar Год назад

      @@HARSH-jj1qj ask ur dad? Is he gaya or not.
      If yes, u were adopted.

    • @KeremAli-cm3pj
      @KeremAli-cm3pj 6 месяцев назад

      @@FonxyStar you are LGBTQ

  • @sathishkumars2380
    @sathishkumars2380 4 года назад +70

    Hi Navin Reddy, thank you so much for the sessions.
    1)
    # To create array with 5 elements and delete element with index value 2:
    from array import *
    arr = array('i',[])
    #
    len = int(input("Enter length of array:"))
    #
    for i in range(len):
    ele = int(input("Enter elements:"))
    arr.append(ele)
    print(arr)
    #
    for d in range(len):
    if d == 2:
    arr.pop(d)
    print(arr)
    # OR
    for d in range(len):
    if d == 2:
    del arr[2]
    print(arr)
    **********************************
    2.a) Reversing array:
    from array import *
    arr = array('u',['a','b','c','d'])
    len = len(arr)
    #
    for i in range(int(len/2)):
    temp = arr[i]
    arr[i] = arr[len-i-1]
    arr[len-i-1] = temp
    print("The reversed array is:",arr)
    *******************************************
    2.b) Creating new array with reversing of existing array:
    from array import *
    #
    arr = array('u',['a','b','c','d'])
    #
    len = len(arr)
    arr1 = array(arr.typecode,[])
    #
    i = 1
    while i

    • @gauravbisht9622
      @gauravbisht9622 4 года назад +5

      BRO their are some mistakes in your 1st answer..
      Correct 1st answer is:
      from array import *
      arr=array('i',[])
      for i in range(5):
      x=int(input("Enter the next value"))
      arr.append(x)
      print(arr)
      k=0
      for e in arr:
      if k==2:
      arr.pop(k)
      k=k+1
      print(arr)

    • @harendragoswami5893
      @harendragoswami5893 4 года назад +8

      Also bro he asked not to use in-built functions

    • @thenoxai
      @thenoxai 4 года назад

      @@gauravbisht9622
      there is a mistake towards the end
      arr.pop(e)

    • @gauravbisht9622
      @gauravbisht9622 4 года назад +1

      @@thenoxai ahhhh sry maaah bad

    • @AmitGupta-hp1re
      @AmitGupta-hp1re 4 года назад

      Hey what if I use while loop and decrement the value of l to print the reverse array like:
      L=len(arr)
      i=0
      While (L-1>i):
      Print(arr[L])
      L=L-1
      Plz help I'm confused as error comes of index out of range
      @Sathishkumar S

  • @ramarashdi2421
    @ramarashdi2421 6 лет назад +30

    You are one of the best teachers for the programming language.
    Go a head.

  • @mrniceguy9653
    @mrniceguy9653 6 лет назад +9

    NaveenBhau, I'm Binge watching your PythON series since this morning. They are quite good. Thanks and Greetings from Switzerland.

  • @abhinavs03
    @abhinavs03 6 лет назад +64

    Hi sir! Just wanted to say your videos are inspiring and to the point. Love them.

    • @sujeetkumarsharma9538
      @sujeetkumarsharma9538 5 лет назад

      really

    • @GAMINGWITHDESTRYER
      @GAMINGWITHDESTRYER 4 года назад +1

      how to remove End screen

    • @yashjain2370
      @yashjain2370 4 года назад +3

      @@GAMINGWITHDESTRYER want to remove the video and channel link at the end to see assignment ?? Inspect element and edit as html and remove that part and enter.

    • @rachitchhabra9578
      @rachitchhabra9578 4 года назад

      @@yashjain2370 Thank you!

  • @maimomjhanshirani7426
    @maimomjhanshirani7426 5 лет назад +1

    Thanks for your tutorial.
    Qs.1:
    import array
    arr = array.array('i',[])
    n = int(input("Enter the length of array"))
    for i in range(n):
    data = int(input("Enter the array value"))
    arr.append(data)
    print(arr)
    arr2 = array.array('i',[])
    item = int(input("Enter the element you wish to remove:"))
    for delete in arr:
    if delete == item:
    continue
    else:
    arr2.append(delete)
    print(arr2)
    Qs.2:
    import array
    arr = array.array('i',[1,5,10,15,20,25])
    print(arr)
    NewArr = array.array('i',[])
    for i in range(6):
    for j in arr:
    if i == arr.index(j):
    NewArr.append(arr[5-i])
    print(NewArr)

  • @piyushbadule78
    @piyushbadule78 5 лет назад +56

    # Second Program
    from array import *
    arr = array('i',[10,20,30,40,50,60,70,80,90,100])
    print(arr[::-1])

  • @rohitgoel3194
    @rohitgoel3194 4 года назад +1

    Sir ji TUSSI GREAT HO. College time me kabhi coding nahi sikhi or nahi kabhi mann kiya but jab 5 saal baad lga mechanical me bhi coding important h and then I thought, let's give it a try.
    My brother and one friend suggested your channel and after going through your videos I never felt like coding is difficult. From your course, I realized that the only thing required for coding is logic. More you apply logic, more simpler will be a language. Really thankyou for efforts and HATS OFF to your energy while expalining! Love you pal :)

  • @shubhankursharma3323
    @shubhankursharma3323 4 года назад +3

    Navin sir, I just want to say thank you for this knowledge that you're providing us. Hats off🙏🏻🙏🏻

  • @biasnitin
    @biasnitin 5 лет назад +2

    In my quest to learn Python and to start from basic, I went to google to understand OOP concept a week back and got to your channel purely by chance...That session was truly awesome, which brought me to your series on Python and I could simply say that I am loving it, every single minute is a learning, .....Also shared your details with many of my friends and colleagues...You have really great teaching skills..Good Teacher could be a good programmer but every good programmer can not be a good Teacher...THANKS

  • @dineshnandyala2727
    @dineshnandyala2727 4 года назад +15

    yup this quarantine is python's by Navin sir
    by the way, they are amazing

  • @avishekmandal6448
    @avishekmandal6448 4 года назад

    1.
    from array import *
    arr = array('i',[])
    for i in range(5):
    x= int(input("enter values"))
    arr.append(x)
    print(arr)
    numbers=arr
    print("Deleted element is :",numbers.pop(2))
    print("Current elements are:",numbers)
    2.
    from array import *
    arr = array('u',[])
    for i in range(5):
    x= (input("enter character"))
    arr.append(x)
    print("Before Reversing Array:",arr)
    arr.reverse()
    print("After reversing Array:",arr)
    Thank You Sir...Love from West Bengal...and sir now i realized that my time at the lock down was not wasted.

  • @vijayroy93
    @vijayroy93 6 лет назад +9

    Naveen the way you teach is fabulous and here I request you to teach SQL because it's you who can only make it fun learning SQL. All the best

  • @shashanksharma9350
    @shashanksharma9350 4 года назад +2

    Hi, there are so many channels in youtube for python tutorials, but the way you describe its uniqe and very understable. keep the pace.

  • @thatguyadarsh
    @thatguyadarsh 5 лет назад +33

    '''answer for the first question'''
    import array as a
    arr=a.array("i",[])
    lent=int(input("Enter the length of array : "))
    for i in range(lent):
    val=int(input("Enter the elements of array one by one and press enter"))
    arr.append(val)
    print(arr)
    arr2=a.array('i',[])
    del_elm=int(input("Enter the element you wish to remove/delete : "))
    for element in arr:
    if del_elm==element:
    continue
    else:
    arr2.append(element)
    print("The new array is :
    ",arr2)

    • @noelrakshit
      @noelrakshit 4 года назад

      Bro, it doesn't remove the value at the index. However, its a good code.

    • @nalinmahajan1337
      @nalinmahajan1337 4 года назад +8

      @@noelrakshit
      The answer of first question
      from array import *
      x=array('i',[1,2,3,4,5])
      y=array('i',[])
      n=int(input('enter Index no.'))
      for i in range(len(x)):
      if(i==n):
      continue
      y.append(x[i])
      x=y
      print(x)

    • @stockfish3379
      @stockfish3379 4 года назад

      @@nalinmahajan1337 that was to the point af boi

  • @achalpvt8548
    @achalpvt8548 4 года назад +1

    I am your BIG follower............
    i hav subscribed u r channel in 4 of my phones..., a laptop ..and shared to many friends.....
    tq faa helping in learning PYTHON ........ "i am an alien of U"............ ; )

  • @garimasrivastava4824
    @garimasrivastava4824 4 года назад +7

    Thankyou sir! Your Python tutorials have made my quarantine productive .

  • @adamya3565
    @adamya3565 3 года назад

    I read out the video description and try out the programs or exercises before watching the video. This is an effective method.

  • @hassnainamjad1059
    @hassnainamjad1059 4 года назад +56

    i can not see the assignment question on assignment question his playlist and channel logo pops up

    • @Arun_Kumar_x86
      @Arun_Kumar_x86 4 года назад +1

      yes me too dude , that end screen cards are blocking it .. ! sad

    • @mdc9602
      @mdc9602 4 года назад +3

      Telusko channel can only disable it!

    • @yogeshjain5907
      @yogeshjain5907 4 года назад +7

      Pause the video and then slowly slide down the video. You'll now be able to see the assignment question

    • @muneraalkurbi4583
      @muneraalkurbi4583 4 года назад

      @@yogeshjain5907 what if I'm using a pc :)

    • @rohankumar-si2we
      @rohankumar-si2we 4 года назад

      Factorial

  • @Veerendra_virus
    @Veerendra_virus 2 года назад +1

    I saw so many classes about phython sir,but no chanel is not have clear cut theme sir,but u are very very simplier the concepts sir,tnq sir

  • @raghuram6382
    @raghuram6382 4 года назад +5

    Hello Navin Reddy, I personally think it would be nice if you make videos on all the data-science libraries and make a separate playlist of it.(Pandas, scikit, matplotliib, scipy and also maybe tensorflow).

  • @anupamakovid4568
    @anupamakovid4568 4 года назад +1

    The energy with which u explain is commendable. U make learning python fun. Thanks for such tutorials

  • @ranjithkumarneeruganti4710
    @ranjithkumarneeruganti4710 4 года назад +8

    # code for 2nd Q,s
    from array import *
    arr = array("i", [ ])
    for i in range(4):
    x = int(input("Enter the value: "))
    arr.append(x)
    print(arr)
    b = array('i', [])
    for i in range(4):
    b.append(arr[-(i+1)])
    print(b)

  • @sultanhussainnajafi5716
    @sultanhussainnajafi5716 Год назад

    I am really really thankful from you. you are the best teacher that I have seen. be successful in whole of your life

  • @Deepaksingh_7_2
    @Deepaksingh_7_2 6 лет назад +6

    the amazing energy you have sir is too good❤

  • @DevOpsWithPankaj
    @DevOpsWithPankaj 4 года назад +1

    #1
    from array import *
    arr = array('i', [])
    n = int(input("Enter the length of array elements: "))
    for e in range(n):
    x=int(input("Enter the array elements: "))
    arr.append(x)
    print(arr)
    arr.remove(2)
    print(arr)
    #2 Reverse the array
    newarr = array('i', [])
    c=len(arr)
    for j in range(c):
    y=arr[c-j-1]
    newarr.append(y)
    print(newarr)
    Thanks!

  • @skjnas
    @skjnas 4 года назад +35

    Not able to see the assignment question at the end of these videos, It is hidden by Django playlist

    • @leijit8648
      @leijit8648 4 года назад

      me too

    • @dimitarzortev7199
      @dimitarzortev7199 4 года назад +14

      You can block the playlist with ad blocker. It says:
      1. Create an array with 5 values and delete the value at index number 2 without using in-built functions.
      2. Write a code to reverse an array without using in-built functions.

    • @djgaming5224
      @djgaming5224 4 года назад +3

      @@dimitarzortev7199 thanks bro to assignment.

    • @golshanswonderland8906
      @golshanswonderland8906 4 года назад +1

      @@dimitarzortev7199 Thank you very much!

    • @samrudhraja224
      @samrudhraja224 4 года назад +1

      @@dimitarzortev7199 Thank you

  • @voiceofheart9873
    @voiceofheart9873 4 года назад

    1.
    from array import *
    a=array('i',[10,20,30,40])
    b=array(a.typecode,[])
    i=0
    while i

  • @moazelsawaf2000
    @moazelsawaf2000 6 лет назад +30

    Question ( 2 ) :
    from array import *
    x = array('i', [1, 2, 3, 4, 5])
    print(x)
    y = array(x.typecode, (a for a in x))
    counter = len(x)-1
    for i in x:
    y[counter] = i
    counter -= 1
    print(y)

    • @prathapp2792
      @prathapp2792 3 года назад +2

      Simply can use ::-1 method

  • @anilsaini5309
    @anilsaini5309 4 года назад

    My Solution, asking value no. as well
    arr = array ('i', [])
    x = int(input('Enter the Length: '))
    for i in range(x):
    print ('Enter Value', i+1, ':', end="")
    a = int(input())
    arr.append(a)
    print(arr)
    Great Learning Thanks Navin :)

  • @koyyadashashank7260
    @koyyadashashank7260 3 года назад +5

    2)reverse
    from array import *
    arr=array('i',[1,2,3,4,5])
    k=-len(arr)-1
    for i in range(-1,k,-1):
    print(arr[i])

  • @yogeshwarprasad6797
    @yogeshwarprasad6797 4 года назад +1

    27.1
    from array import *
    arr = array ('i',[])
    n = int(input("length of array = "))
    for i in range(n):
    x = int(input("enter the next number = "))
    arr.append(x)
    print (arr)
    arr1 = array('i',[])
    i =0
    while (i

  • @satyam4122
    @satyam4122 4 года назад +6

    Next video card at the end of the videos are troubling me to see the questions assignments. Please rearrange these to give a clear view of questions.

  • @vishalvikas9472
    @vishalvikas9472 4 года назад +1

    hi navin, u r one of the best teachers whom i came across. great job kudos for that. one small problem here is after every episode u give a assignment to finish ryt, but due to adds n stuff of your other courses we are not able to see the assignments properly, can u please adjust that. thanks

  • @saipriyareddy762
    @saipriyareddy762 4 года назад +10

    1st sol:
    from array import *
    arr=array('i',[2,9,8,7,6])
    print(arr[0:2]+arr[3:])
    2ns sol:(reverse)
    from array import *
    arr=array('i',[10,22,55,78,90])
    print(arr[::-1])

  • @dheerukuraku5094
    @dheerukuraku5094 4 года назад

    sir ur python series is the best that i could find on youtube...
    may be because of ur clear cut explanation or the way u teach...
    sir please bring us with more series in 2020 to improve ourselves and tq somuch for this series sir...

  • @soundharyav4634
    @soundharyav4634 3 года назад +8

    Hello!
    Your videos are great. Just one suggestion: At the end of every video, the pop-ups about your previous video and the Telusuko logo actually block the assignment questions. So, can you pls type the assignment question in the description as well, or maybe you have a better solution? But I personally feel you have to do something about it.
    Thank you
    Great work :)

  • @ibadkhan481
    @ibadkhan481 4 года назад

    Best teacher i ever came across in my life lots of love and respect

  • @yashkothari644
    @yashkothari644 5 лет назад +5

    from array import *
    from math import *
    vals= array('i',[12,34,14,5,16])
    vals=array('i',(a for a in vals if vals.index(a)!=2));
    print(vals)

  • @tufailkhan8803
    @tufailkhan8803 5 лет назад +2

    Sir your way of teaching is very good i have no words for describing.
    love your videos and also loves u alot...

  • @nagababuthepython2325
    @nagababuthepython2325 5 лет назад +15

    1). question
    from array import*
    arr=array ('i',[1,2,3,4,5])
    for i in arr:
    if i==arr[2]:
    continue
    print (i)

    • @shubhamshiroya2208
      @shubhamshiroya2208 4 года назад +1

      if i==arr[2]: means arr[2] represent 3rd number position of the array then skip 3rd number values of array.

    • @The_Mankita
      @The_Mankita 4 года назад

      Sahi nahi aa raga

  • @piushdengani1145
    @piushdengani1145 2 года назад

    sir am form non IT background and by watching your videos feel very comfortable in python. Thanks a lot sir.

  • @lkstamenov
    @lkstamenov 5 лет назад +8

    Navin, I love learning programming in a funny way :)

  • @b.sasikumar2141
    @b.sasikumar2141 4 года назад

    Every one understand firmly ur classes sir.... Good job... 🙏🙏🤝🤝👍👍

  • @BoomcoreIsLive
    @BoomcoreIsLive 5 лет назад +21

    #ReversingArray
    from array import *
    arr = array('i',[40,30,20,10,55,77])
    print(arr[::-1])

    • @pikachu6626
      @pikachu6626 5 лет назад

      explain the last line please

    • @BoomcoreIsLive
      @BoomcoreIsLive 5 лет назад +1

      @@pikachu6626 it is slicing... [startValue:endValue:jumpValue]...refer internet about slicing

    • @mirzaebrahimbaig5633
      @mirzaebrahimbaig5633 5 лет назад

      The orignal array is not reversing .this code is just displaying the values in reverse.

    • @mirzaebrahimbaig5633
      @mirzaebrahimbaig5633 5 лет назад +1

      from array import *
      import math
      arr = array('i',[])
      n = int (input("enter the length of array"))
      for a in range (n):
      x = int(input("enter array value"))
      arr.append(x)
      print("orignal array")
      print(arr)
      k = int(n/2) # numbers of iteration
      d=n-1
      for i in range(k):
      j = arr[i]
      u = arr[d]
      arr[d] = j
      arr[i] = u
      d=d-1
      print("after reverse")
      print(arr)

    • @CiceroChen
      @CiceroChen 5 лет назад

      @@mirzaebrahimbaig5633 newArrR = array('i',newArr[::-1])

  • @nafisanahar3413
    @nafisanahar3413 6 лет назад

    best teacher of all. Couldn't find anyone better. best best best...

  • @adanufrancis4600
    @adanufrancis4600 5 лет назад +19

    Reverse😁
    from array import*
    arr =array('i', [2, 4 ,56 ,23, 46])
    k= len(arr) - 1
    while k > -1:
    print(arr[k])
    k -= 1

    • @turbosardar39
      @turbosardar39 4 года назад +1

      Thats not the reverse of an array its only printing in values of an array from last to first...

    • @stockfish3379
      @stockfish3379 4 года назад

      @@turbosardar39 yeah it's nonsense and other 18 people liked r bigger blockheads

    • @kumarb4336
      @kumarb4336 4 года назад +2

      @@stockfish3379 for second question
      from array import*
      arr=array('i',[2,4,7,8,9])
      newarr=array('i',[])
      for e in range(len(arr)):
      if e

  • @harshvora1922
    @harshvora1922 6 лет назад +1

    Removing element at index 2:
    import array as arr
    vals = arr.array('i', [])
    num = int(input("Enter the length of the array: "))
    for i in range(num):
    x = int(input("Enter the next value: "))
    vals.append(x)
    print(vals)
    vals.pop(2)
    print(vals)

  • @pardeepsaini1634
    @pardeepsaini1634 6 лет назад +7

    n=int(input("enter a size of array "))
    a=array("i",[int(input()) for x in range(n)])
    print(a)

  • @yogeshwarprasad6797
    @yogeshwarprasad6797 4 года назад +2

    27.2 Reverse an array without using function
    from array import *
    arr = array ('i',[])
    n = int(input("length of array = "))
    for i in range(n):
    x = int(input("enter the next number = "))
    arr.append(x)
    print (arr)
    revarr = array('i',[])
    i = 0
    while(i

  • @vijaychaurasiya3227
    @vijaychaurasiya3227 5 лет назад +8

    1.
    arr=[2, 5, 3, 9, 1]
    Narr=[]
    for e in arr:
    if e==arr[2]:
    continue
    Narr.append(e)
    print(Narr)
    2.
    from array import *
    ar=array('i', [2, 5, 3, 9, 1])
    inver=array(ar.typecode,[])
    for i in range(len(ar)):
    inver.append(ar[len(ar)-i-1])
    print(inver)

  • @ramnathan4236
    @ramnathan4236 4 года назад

    from array import *
    val =array('i',[1,23,12,44,10,13,4])
    i=0
    j=len(val)-1
    while(i

  • @gameswar5066
    @gameswar5066 5 лет назад +3

    question 1
    from array import *
    arr=array('i',[1,2,3,4,5])
    k=2
    for x in arr:
    if x==2:
    arr.pop(x)
    print(arr)

  • @vishnuchaithanya6146
    @vishnuchaithanya6146 6 лет назад +2

    hi sir, i really love the way you teach programming languages. getting inspired from your
    teachings

  • @divyanshutanter6385
    @divyanshutanter6385 5 лет назад +7

    #for del. pos 2 in array
    from array import *
    a = array('i',[3,2,9,1,8])
    b = array('i',[])
    for e in range(0,2):
    b.append(a[e])
    for e in range(3,len(a)):
    b.append(a[e])
    print(b)
    #for reversing array
    from array import *
    a = array('i',[1,2,3,4,8,9])
    b = array('i',[])
    for i in range(1,6):
    b.append(a[-i])
    for i in range(0,1):
    b.append(a[i])
    print(b)

  • @balakrishnan9785
    @balakrishnan9785 6 лет назад

    1st sol:
    from array import *
    arr=array("i",[])
    n = int(input("Enter the lenght of array"))
    for i in range(n):
    x=int(input("Enter the value "))
    arr.append(x)
    print(arr)
    d=int(input("Enter the value to be deleted"))
    k=0
    for e in arr:
    if k==d:
    arr.remove(e)
    k+=1
    print(arr)
    thanks telusko

  • @anooptiwari4098
    @anooptiwari4098 4 года назад +9

    Assignment
    Q 1. To create array with 5 elements and delete element with index value 2.
    Q2a) reversing a array without using inbuilt function .b) Creating new array with reversing of existing array

  • @alexchristian220
    @alexchristian220 6 лет назад +1

    2nd program:
    from array import *
    a = array('i',[])
    n = int(input("Enter a length of an array"))
    for i in range(n):
    x = int(input("Enter a Value"))
    a.append(x)
    for e in range(1,len(a)+1):
    b = a[-e]
    print(b)

  • @samrudhraja224
    @samrudhraja224 4 года назад +4

    Sir the end screens are covering the assignments

  • @omsahareofficial5637
    @omsahareofficial5637 4 года назад +1

    Hello sir, I am engineering first year student and I genuinely love your videos, all your content is fantastic. Just one suggestion from my side, at the end of the video you give a small quiz question which I want to solve but I can't see it because of the end screen (Subscribe and playlist button). Please rearrange the icons on the end screen so that we can see and solve the quiz question. Thank you

  • @adityachand1750
    @adityachand1750 5 лет назад +28

    from array import *
    A=array('i',[1,2,3,4,5])
    print(A)
    for i in range(5):
    if(i==2):
    continue
    print(A[i])

    OUTPUT-:
    array('i', [1, 2, 3, 4, 5])
    1
    2
    4
    5

    • @seemapassi6550
      @seemapassi6550 5 лет назад +1

      Aditya Chand
      that's ok but can you write in the array form

    • @karthikjonnala5837
      @karthikjonnala5837 5 лет назад +2

      @@seemapassi6550
      from array import *
      arr=array("i",[1,2,3,4,5])
      reqarr=array("i",[])
      for i in range(len(arr)):
      if i==2:
      continue
      reqarr. apend(arr[i])
      print(reqarr)
      Output:
      array("i",[1,2,4,5])

    • @growthforyou6900
      @growthforyou6900 4 года назад

      @@karthikjonnala5837 error its append not apend

    • @bhagatg1917
      @bhagatg1917 4 года назад

      @@karthikjonnala5837 thanx bro

    • @balasaasthab4044
      @balasaasthab4044 6 месяцев назад

      Wow nice thinking

  • @ritakashyap2453
    @ritakashyap2453 4 года назад

    Exercise 1:
    from array import *
    capture_bb = array ('i', [6,8,38,60,61,98,70,40]
    capture_bb.sort()
    for i in capture_bb:
    print (capture_bb)
    Output:
    array('i',[6,8,38,40,60,61,70,98]
    Thank you so much!!

    • @rashuagarwal8119
      @rashuagarwal8119 3 года назад

      you have to make it without using inbuilt function

  • @adityasaxena6619
    @adityasaxena6619 5 лет назад +3

    sir as I noticed after using a.remove()
    size also got decreased by 1 but when we are trying to do it manually we are not able to decrease size

  • @mdwaqar7401
    @mdwaqar7401 4 года назад +1

    best tutorials in the internet just amazing

  • @aarushjadge31
    @aarushjadge31 5 лет назад +26

    Hey Navin, You are Some man..
    I got this for you
    Navin=My Bad
    print(Navin)
    >> My Bad..
    hahahhahaha You r Great Man. Love From Bangalore

    • @Anonymousss07
      @Anonymousss07 4 года назад +1

      thats a wrong code bro u have given a string in the print it prints navin only...lol

    • @giridharsriram9404
      @giridharsriram9404 4 года назад

      @@Anonymousss07 i think it wont print anything brother because he didnt defined mybad

    • @saijyothi2903
      @saijyothi2903 4 года назад

      U'll get an error coz.. string must be place in single quotes

  • @Dileepkumar-jw4sz
    @Dileepkumar-jw4sz 6 лет назад

    2.sol:
    from array import *
    arr = array('i',[])
    n = int(input('enter the size of the array'))
    for i in range(n):
    x = int(input('enter the next value:'))
    arr.append(x)
    print(arr)
    a = array('l',[])
    for l in range(n):
    k=0
    while l

  • @RahulGupta-ly2uu
    @RahulGupta-ly2uu 6 лет назад +9

    1st quize code:
    from array import *
    arr = array('i',[])
    n=int(input("enter the number of values in array"))
    for i in range(n):
    val=int(input("enter the next value"))
    arr.append(val)
    print(arr)
    arr.pop(1) """ sir without using pop we cant delete a value from array atleast this inbuilt
    function we have to use"""
    output:
    enter the number of values in array4
    enter the next value3
    array('i', [3])
    enter the next value2
    array('i', [3, 2])
    enter the next value1
    array('i', [3, 2, 1])
    enter the next value5
    array('i', [3, 2, 1, 5])
    >>> arr
    array('i', [3, 1, 5])
    2nd quize code:
    from array import array
    arr= array('i',[])
    n=int(input("how many numbers u want to add in the array"))
    for i in range(n):
    x = int(input("enter the next value"))
    arr.append(x)
    print("your array is " ,end="")
    """for reversing"""
    for e in range(n//2):
    temp=arr[e]
    arr[e]=arr[-(e+1)]
    arr[-(e+1)]=temp
    print(arr)
    OUTPUT:
    how many numbers u want to add in the array7
    enter the next value1
    enter the next value2
    enter the next value3
    enter the next value4
    enter the next value5
    enter the next value6
    enter the next value7
    your array is array('i', [7, 6, 5, 4, 3, 2, 1])
    >>>

    • @chandinisaleem692
      @chandinisaleem692 6 лет назад

      Hi.. can you please explain how the second query works..??

    • @premkiran6591
      @premkiran6591 6 лет назад

      for e in range(n//2):
      temp=arr[e]
      arr[e]=arr[-(e+1)]
      arr[-(e+1)]=temp
      instead of this we can use
      for e in range(n//2):
      arr[-(e-1)],arr[e]=arr[e],arr[-(e-1)]

    • @premkiran6591
      @premkiran6591 6 лет назад

      sry it is
      arr[e],arr[n-e-1]=arr[n-e-1],arr[e]

    • @sagnikray5391
      @sagnikray5391 5 лет назад

      you have to pop the value at index no.2

  • @alexchristian220
    @alexchristian220 6 лет назад +1

    for the 1st program:
    from array import *
    arr = array('i',[23,12,34,54,89])
    for i in range(len(arr)):
    if(i==2):
    continue
    print(arr[i])

  • @vishalmalav1626
    @vishalmalav1626 6 лет назад +3

    from array import *
    a=array("i",[])
    n=int(input("enter the length"))
    for i in range(n):
    x=int(input("enter the next value"))
    a.append(x)
    print(a)
    n=int(input('enter the value for delete'))
    for e in a:
    if e==n:
    a.remove(e)
    print(a)

  • @shreyasdevang
    @shreyasdevang 6 лет назад

    You have made concepts very simple for beginners, just like in bangalore we have Manjunath Aradhya Sir. Very good, All the best.

  • @erinfolamiquadri3406
    @erinfolamiquadri3406 5 лет назад +5

    from array import *
    a = array('d', [1,2,3,4,5])
    print(a)
    for i in range (5):
    if i==2:
    continue;
    print (a[i])

    • @nabilarehman3274
      @nabilarehman3274 3 года назад

      thank you. it was a simple code and got me so confused

  • @govoorsaiteja8552
    @govoorsaiteja8552 5 лет назад +2

    1st..
    from array import *
    arr=array('i',[])
    n=int(input("enter the lenth"))
    for i in range(n):
    x=int(input("enter the next number"))
    arr.append(x)
    arr.pop(2)
    print(arr)

  • @anjaligarg3807
    @anjaligarg3807 4 года назад +6

    Will you please remove the end screen cards on your videos I can't seen the assignment part or you add the assignment in the video part. It's a request to you.

    • @mahmouddaragmeh5198
      @mahmouddaragmeh5198 4 года назад +4

      1-creat an array with 5 values and delete the value at index number 2 without using in build function
      2-write a code to reverse an array without using in build function

    • @kusumanjali_akula
      @kusumanjali_akula 4 года назад +1

      @@mahmouddaragmeh5198 thanks

    • @BIT_HIMANIGulati
      @BIT_HIMANIGulati 4 года назад +1

      @@mahmouddaragmeh5198 thanx

    • @lucasdominichini3095
      @lucasdominichini3095 4 года назад

      @@mahmouddaragmeh5198 thx

  • @BhuveshDhiman
    @BhuveshDhiman 5 лет назад +1

    1st Q
    from array import *
    x=array('i',[])
    print("Enter 5 values")
    for i in range(5):
    x.append(int(input()))
    for j in range(4):
    if j>=2 :
    x[j]=x[j+1]
    for k in range(4):
    print(x[k])

  • @subbubhat7805
    @subbubhat7805 4 года назад

    Wow, beautiful explanation sir. The way you are Explaining is in very understandable manner.

  • @onkkkar
    @onkkkar 5 лет назад +9

    2. Write a code to reverse an array without using an in-built function
    myArr = array('i', [12, 7, 85, 50, 63])
    print(myArr[-1::-1])

  • @nihalhasan783
    @nihalhasan783 4 года назад

    2)
    from array import *
    a=array('i',[])
    n=int(input("enter size of array"))
    for i in range(n):
    x=int(input("enter next value"))
    a.append(x)
    print(a)
    b=array('i',[])
    for k in range(n-1,-1,-1):
    b.append(a[k])
    print(b)
    print("thank you sir")

  • @shabalbaig9544
    @shabalbaig9544 5 лет назад +3

    If only I could heart react your videos like I do on instagram.

  • @nihalhasan783
    @nihalhasan783 4 года назад

    1)
    from array import *
    a=array('i',[])
    for i in range(5):
    x=int(input("enter values"))
    a.append(x)
    print(a)
    y=int(input("enter the value to be removed"))

    k=0
    for e in a:
    if e==y:
    a.remove(e)
    else:
    continue
    print(a)
    thank you sir

  • @klibsha6565
    @klibsha6565 5 лет назад +4

    One day when I will earn good money, you will get a good donation from me!:)

  • @FreeTechCafe
    @FreeTechCafe 6 лет назад

    I have watched many python videos, but your's the best.

  • @ilovehorses38
    @ilovehorses38 3 года назад

    wow, I like ur dynamic coding teaching style. Thank u!!

  • @haniyabatool9914
    @haniyabatool9914 4 года назад

    I already entered n ,and it feels so good for a beginner.You are so good

  • @rezwanhaque9979
    @rezwanhaque9979 3 года назад

    Dude this guy is the best programming teacher online

  • @hassanabdulmalik5433
    @hassanabdulmalik5433 5 лет назад +1

    mr navin you the best in teaching python thank you so much

  • @jaikishanmore5538
    @jaikishanmore5538 5 лет назад +2

    from array import *
    vals = array('i',[10,11,12,13,14])
    print("Array elements before deletion: {0}".format(vals))
    vals = vals[:2]+vals[3:]
    print("Array elements post deletion: {0}".format(vals))

  • @sagarmehla3781
    @sagarmehla3781 4 года назад +1

    2. from array import *
    arr=array('i',[12,13,14,15,100])
    l,r=0,int(len(arr)-1)
    while l

  • @adnanpasha948
    @adnanpasha948 4 года назад

    1)
    from array import *
    arr = array('i',[ ])
    for i in range(5) :
    x = int(input("Enter the value :"))
    arr.append(x)
    print(arr)
    for i in range(5) :
    if i == 2 :
    continue
    print(arr[i],end = " ")
    print("

  • @matthewmorrison2071
    @matthewmorrison2071 3 года назад

    Q2
    from math import *
    from array import *
    arr = array('i', [1, 2, 3, 4, 5])
    i = 0
    while(i < floor(len(arr)/2)):
    arr[i], arr[len(arr) - i - 1] = arr[len(arr) - i - 1], arr[i]
    i += 1
    print(arr)

  • @042rehansiddique4
    @042rehansiddique4 6 месяцев назад

    I was able to identify the n mistake while u were writing the code.. u r a great teacher❤…

  • @munish2839
    @munish2839 4 года назад

    You are awesome and way of teaching is extraordinary..... Thanks

  • @sayanpoddar6595
    @sayanpoddar6595 4 года назад +1

    from array import *
    arr = array('i', [])
    n = int(input("Enter the length of the array"))
    for i in range(n):
    x = int(input("Enter the next value"))
    arr.append(x)
    print("Original array elements:", end=" ")
    for i in range(n):
    print(arr[i], end=" ")
    print()
    y = int(input("enter element to delete"))
    for i in range(n):
    if arr[i] == y:
    break
    pos = i
    if pos < n-1:
    for j in range(pos,n-1,1):
    arr[j] = arr[j+1]
    n = n-1
    elif pos == n-1:
    n = n-1
    print("Elements in array after deletion", end=" ")
    for k in range(n):
    print(arr[k], end=" ")
    print()

  • @RakeshKumar-zc6gg
    @RakeshKumar-zc6gg 6 лет назад

    Hello sir,
    you are the best teacher for programming.

  • @antonypaul7579
    @antonypaul7579 5 лет назад

    Mixed both question 1 & 2
    1)from array import*
    arr = array('i',[])
    n = int(input("What is the length of array"))
    for i in range(n):
    x =int(input("What is the next value of the array"))
    arr.append(x)
    print(arr)
    val = int(input("what is the value to be searched & deleted"))
    k = 0
    for e in arr:
    if e == val:
    print(k)
    arr.remove(arr[k])
    break

    k=k+1

    print(arr)
    2)arr =arr[::-1]
    print(arr)

  • @shamminamina
    @shamminamina 4 года назад

    you are the best sir. Wish you were my professor during college

  • @anupburnwal9255
    @anupburnwal9255 5 лет назад

    from array import *
    a=array('i',[])
    n=int(input("enter size of array"))
    for i in range(n):
    x=int(input('enter the value'))
    a.append(x)
    print(a)
    x=int(input("enter the index no. by which you want to delete element"))
    b=array('i',[])
    for i in range(n-1):
    if i

  • @chhavimanichoubey9437
    @chhavimanichoubey9437 5 лет назад

    for defining typecode and it's input accordingly:
    from array import *
    types = str(input('enter data type code:'))
    a = array(types, [])
    length = int(input('enter array length'))
    for i in range(length):
    if types == 'b' or types == 'B' or types == 'u':
    x = str(input('enter elements:'))
    a.append(x)
    else:
    x = int(input('enter elements:'))
    a.append(x)
    print(a)

  • @lohithn3473
    @lohithn3473 5 лет назад +1

    for deleting an element in array:
    from array import*
    list1=[ ]
    for i in range(6):
    list1.append (int(input("Enter the value for array")))
    print (list1)
    v=array('i',[ ])
    print(array('i',list1))
    n=int(input("Enter the value to be removed from the array "))
    for a in list1:
    if a==n:
    continue
    v.append(a)
    print(v)