Python Interview Questions and Answers | Tricky Questions | Python Interview Questions For Freshers

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

Комментарии • 65

  • @Codeyug
    @Codeyug  Месяц назад

    Master in Python :- ruclips.net/p/PLI4OVrCFuY543naNBsCaRLrLSxI7MUOzZ

  • @SerendipitySage29
    @SerendipitySage29 Год назад +4

    recently they have asked me in a interview and told me not to use any loop , inbuilt function so I have used this high order function and solution is
    l1=[1,2,3]
    l2=[4,5,6]
    l3=[7,8,9]
    #output=[12,15,18]
    result=list(map(lambda x,y,z:x+y+z,l1,l2,l3))
    print(result)

  • @rushikeshpabalkar6943
    @rushikeshpabalkar6943 2 месяца назад +2

    We can also use ''' ''' for printing that statment

  • @shantanubiswas5227
    @shantanubiswas5227 Год назад +2

    Appreciate your effort for these kind of videos. Thanks it was really helpful.
    But in last question input and output are different.

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

      Yeah.. Small mistake happened in last. I didn't check input properly...

  • @bidhanry9740
    @bidhanry9740 8 месяцев назад +1

    As you said - "If stop value is not found then the output will be null"
    so if I print - print(name[2:100:1], then the output will be "antanu"
    in this case, it will start from index 2 and will keep on searching for 100, python will fail to get index 100 so it should'nt print any result right???

    • @himalstech769
      @himalstech769 8 месяцев назад

      It prints then till index

    • @AnuragsMusicChannel
      @AnuragsMusicChannel 3 месяца назад

      Nope. If arg for step(third arg) is negative it needs to have the starting ending which is 8 which is out of bounds. Hence empty string.

  • @dr.sandeepkulkarni459
    @dr.sandeepkulkarni459 Год назад +2

    Very informative, Good👍

  • @theraizadatalks14
    @theraizadatalks14 Год назад +2

    Hi,
    I'm following your interview playlist. It's very good and you clear all the concepts. Thank you ✌️❤
    If you could post one video on "Creating different star patterns in python and also include some character patterns like :"
    A B C D
    A B C
    A B
    A
    or some complex star patterns that would be helpful. It's a request. Most of the time you post question from comment section. I hope you'll do for this request too.

    • @Codeyug
      @Codeyug  Год назад +1

      I am planning to create a playlist on pattern programs as it is mostly asked in interviews. But, I am not getting much time from current topics. I will start working on this as soon as possible. thank you for comment!

  • @Ahamsanatani8213
    @Ahamsanatani8213 8 месяцев назад +1

    no.5-- u can use '''quote it will work

  • @DhavalAhir10
    @DhavalAhir10 9 месяцев назад +2

    Just use print(repr(those long string with """))

  • @mr.chauhan7854
    @mr.chauhan7854 Год назад

    3:10
    How the Modulo work**
    It follows below points:
    1. The result is always depend on the sign of Denominator.
    2. There is no fuss if the Dividend is complely divisible with divisor (eg. 4%2), the result will always be 0(Zero).
    3. Real fuss happens when the Dividend is not complely divisible with divisor.
    Eg 1.( 7%-2)
    Result = A - (A//B) * B
    i.e 7 - (7//-2)*(-2)
    = 7 - (-4) * (-2)
    = 7 - 8
    = -1 is the answer!
    & 7//-2 = -3.5 which is negative floor value = (-4)
    Eg 2. ( -7%2)
    Result = A - (A//B) * B
    i.e -7 - (-7//2)*(2)
    = -7 - (-4) * (2)
    = -7 + 8
    = 1
    Remember Rule #1, result is always depend on the sign of Denominator.
    Hence, (-1 is the answer!)

  • @narendraparmar1631
    @narendraparmar1631 9 месяцев назад +1

    Thanks for this good explanation

    • @Codeyug
      @Codeyug  8 месяцев назад

      Thanks for comment

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

    Sir aapke logics itne strong kaise he, aap har question ke pechhe kya strategy followed krte he, please btaiyye, mujhe bhi aapke jaise strong logic krna he,mujhe question solve krne me kaafi time lgta he aap har question ko itne easily kaise solve kr lete he please, btaiyye mujhe, aur aapki initial journey kaisi thiii, i mean aap kya starting se hi coding me pro theee, ya hmare jaisi hi dhere -2 solve krte theee, please mujhe sab battein aaapke baare me jannna he, me kaafi pareshaan ho chuka hu mere logics jaldi bnte nhi, kya karu, please meri kuchh help kr dijiye sir 😓😓😭😭

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

      It's about practice and mee concepts dimag me ekdam clear hai

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

      @@Codeyug Thank You Sir 😇

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

    print('''"""conversation - He said,"Shantanu's explanation is very good" and I subscribed channel"""''')

    • @SUNILSINGH-d2i7w
      @SUNILSINGH-d2i7w 5 месяцев назад

      thanks yar ye trick jyada achha h aapka

  • @palakjaiswal7345
    @palakjaiswal7345 6 месяцев назад +1

    How many years of experience do you have in IT?

  • @seenusunny981
    @seenusunny981 Месяц назад +1

    print("\"\"\"conversation - He said, \"Shantanu's explanation is very good\" and I subscribed channel\"\"\"")

    • @Codeyug
      @Codeyug  Месяц назад

      Thanks and welcome

  • @ksradau
    @ksradau 9 месяцев назад +1

    perfect! thank u

    • @Codeyug
      @Codeyug  8 месяцев назад

      Thanks and please do share

  • @anjalidhull1964
    @anjalidhull1964 Год назад +1

    can you suggest me best tutorial for statistics on you tube (for Data science course).?

    • @Codeyug
      @Codeyug  Год назад +1

      Let me check..

    • @Codeyug
      @Codeyug  Год назад +1

      there are courses on udemy with 'statistics for data science'. Could you please check..

    • @anjalidhull1964
      @anjalidhull1964 Год назад +1

      @@Codeyug okkk thankyou so much 😊

  • @VrajParmar-k8v
    @VrajParmar-k8v 5 месяцев назад +1

    Thanks Sir

    • @Codeyug
      @Codeyug  5 месяцев назад

      Welcome

  • @MrsKim-f7e
    @MrsKim-f7e Год назад +1

    very great//sir thank you

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

      Please check playlists section

  • @kanishkbhatt4264
    @kanishkbhatt4264 Год назад +1

    @Code-yug
    a=[1,4,7]
    b=[2,5,8]
    c=[3,6,9]
    print(list(zip(a,b,c)))
    output will be---> [(1,2,3),(4,5,6),(7,8,9)]
    and the desired output is [(1,4,7),(2,5,8),(3,6,9)]
    can be obtained by:
    l=[]
    l.append(tuple(a))
    l.append(tuple(b))
    l.append(tuple(c))
    print(l)
    Thanx for the video, helped a lot 😍❤

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

      Thank you for the comment. Please have a look in playlist section

    • @irfanpattu
      @irfanpattu 9 месяцев назад

      bro before he shows the answer i literally did same as you did in 2nd one.. i dont understand what zip will do in
      first solution

  • @siddhigolatkar8558
    @siddhigolatkar8558 7 месяцев назад +1

    Thank you

    • @Codeyug
      @Codeyug  7 месяцев назад

      Please do share!

  • @pratikdumbhare6504
    @pratikdumbhare6504 Год назад +1

    Sir
    Can share tutorial link

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

      ruclips.net/p/PLI4OVrCFuY5725OhoRi-G2YwnjKXh7v0F

  • @KaushikBiswas-j8m
    @KaushikBiswas-j8m 15 дней назад

    The last question : a= [1,4,7] and not a=[1,2,3] . So you solution will not give the desired output

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

    print('\"python uses \
    for newline"')

  • @Ahamsanatani8213
    @Ahamsanatani8213 8 месяцев назад +1

    3no. qn...wahan ' quote nehin he apporstrophe

  • @AnonamousUser
    @AnonamousUser 10 месяцев назад +1

    a = """ \"\"\" conversation - He said, \"shantanu\'s explaination
    is very good\" and i subscribed channel\"\"\" """
    print(a)

    • @Codeyug
      @Codeyug  10 месяцев назад

      Thanks and please do share

  • @anusreekp7619
    @anusreekp7619 3 месяца назад +1

    zip function expalnation is wrong

    • @Codeyug
      @Codeyug  3 месяца назад

      Please tell me

  • @siddhigolatkar8558
    @siddhigolatkar8558 7 месяцев назад +1

    these are 9 questions

    • @Codeyug
      @Codeyug  7 месяцев назад

      Chalta hai ab😅

  • @r.k.jangra1638
    @r.k.jangra1638 Месяц назад +1

    Last ans wrong hai

    • @Codeyug
      @Codeyug  Месяц назад

      I got it..thanks!

  • @sandeepdash5652
    @sandeepdash5652 4 месяца назад +1

    Your explanation of the zip function is incorrect .Jo dikh raha hai image mein wo kaam waise nahi karta hai ..Otherwise things are good and fine .Its not taking a , b and c lists individually .Rather its taking the first element of a,b,c then 2nd element of a,b,c and so on

    • @Codeyug
      @Codeyug  4 месяца назад

      whats wrong?

    • @sandeepdash5652
      @sandeepdash5652 4 месяца назад

      @@Codeyug Check at 15:55 .The Given input doesnt generate the out given output .The given input upon applying the zip function results in
      [(1, 2, 3), (4, 5, 6), (7, 8, 9)] list ... and not [(1,4,7),(2,5,8) , (3,6,9) ] as you have shown .. Small error.only in the image .

    • @CodeEminence
      @CodeEminence 3 месяца назад

      😅​@@sandeepdash5652

  • @nothacker7778
    @nothacker7778 10 месяцев назад +1

    Lo sede eddange edyala guru

    • @Codeyug
      @Codeyug  10 месяцев назад +1

      Mean?

    • @nothacker7778
      @nothacker7778 10 месяцев назад

      @@Codeyug look at 10th question..
      U have mentioned something u written something

    • @Codeyug
      @Codeyug  10 месяцев назад

      Okay will correct that Or edit