Lecture 6 : Functions & Recursion in Python | Python Full Course

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

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

  • @atifmalik8012
    @atifmalik8012 10 месяцев назад +164

    32:55
    n = int(input("enter your num:"))
    def odd_or_even(n):
    if(n%2 == 0):
    print("EVEN")
    else:
    print("ODD")
    odd_or_even(n)

    • @Pasargevivek-ez7yc9gx3y
      @Pasargevivek-ez7yc9gx3y 10 месяцев назад +4

      Great bro 👍

    • @muhammadalam1198
      @muhammadalam1198 9 месяцев назад +8

      def input_num():
      num1 = int(input("Enter any one number"))
      if num1 % 2 == 0:
      print("even")
      else:
      print("odd")
      input_num()

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

      your code is showing an error

    • @NishchayGola
      @NishchayGola 8 месяцев назад +5

      def odd_even():
      n = int(input("enter number:"))
      if n%2 == 0:
      print("EVEN")
      else:
      print("ODD")
      odd_even()

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

      n= int(input("Please Enter a number: "))
      def checker(a):
      if a % 2 == 0:
      print("EVEN")
      else: print("ODD")
      checker(n)

  • @tahirahmed7773
    @tahirahmed7773 9 месяцев назад +37

    The best teacher i have ever seen. Ap bohot logon ki dua lerahi ho didi

  • @zubairzakeer8772
    @zubairzakeer8772 6 месяцев назад +12

    32:45
    def func(a):
    if(a%2 == 0):
    print("EVEN")
    else:
    print("ODD")
    n = int(input("please enter a number : "))
    func(n)

  • @krishnakumardubey5069
    @krishnakumardubey5069 11 месяцев назад +145

    Please ma'am after completing this series please go with Flask or Django series Please❤

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

    key topic with time stamp :---->
    00:01 Functions in Python are blocks of code that can be reused.
    02:02 Functions reduce redundant code and improve reusability.
    06:12 Understanding function calls and parameters in Python.
    08:09 Using functions reduces redundancy and makes code more efficient.
    12:13 Functions in Python can be created with or without parameters and return values.
    14:17 Functions offer a way to encapsulate code for reuse.
    18:06 Understanding built-in and user-defined functions in Python.
    19:58 Understanding default parameter values in Python functions
    24:04 Creating functions to print lists with proper formatting
    26:09 Understanding functions and recursion in Python
    30:35 Introduction to functions and recursion in Python
    32:36 Recursion in Python
    36:10 Recursion is used to print numbers in a function call
    37:55 Explaining recursion in Python with a specific example
    41:39 Understanding the call stack in Python.
    43:29 Recursion creates layers of function calls
    46:59 Understanding the concept of recursion and factorial in Python.
    49:04 Understanding recursion and its application in programming
    52:51 Understanding recursion through the factorial function
    54:40 Understanding recursion and writing recursive functions in Python.
    58:29 Understanding recursion in Python
    1:00:41 Understanding recursion in Python
    thanks

  • @Anonymous-Guy-01
    @Anonymous-Guy-01 11 месяцев назад +176

    Everyone mail Apna College to complete the Python series all topics in deep & start DSA with Python 🙏🏻

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

    32:50
    def check_num(n):
    if n%2 == 0:
    print("this is an even number")
    if n%2 != 0:
    print("this is an odd number")
    n = int(input("enter num: "))
    check_num(n)

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

    32:33
    def even_odd(number):
    if number%2==0:
    print("even")
    else:
    if number%2!=0:
    print("odd")
    even_odd(9)
    Output:-
    Odd

  • @sauravrawat-gk5kb
    @sauravrawat-gk5kb 11 месяцев назад +16

    def num(a):
    if(a %2== 0):
    print("This is even",a)
    else:
    print("This is odd",a)

    num(10)

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

      input lena tha user se
      def even_odd(num):
      if (num % 2 == 0):
      print("Even")
      else:
      print("odd")
      even_odd(int(input("Enter No:")))

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

      Wrong h

    • @shivambhardwaj8748
      @shivambhardwaj8748 17 дней назад

      bhai user input lena thaa [ num(int(input("Enter a number"))) ] function call hoga

  • @ManavGarg7
    @ManavGarg7 6 месяцев назад +36

    32:30 hw
    def finder(n):
    if(n%2==0):
    print("even")
    else:
    print("odd")
    finder(int(input("enter the number : ")))

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

      Def finder()
      X =(int(input("entered no. ="))
      If(X%2==0):
      print("even")
      else:
      print("odd")
      It's an easy method😌

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

      @@ArjunKr-q3o it will work

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

      @@ArjunKr-q3o I think u have understand the question.....Ma'am have told to use an input program.....pls rewatch the question

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

      @@potnuruchaitanya8496 he used it at func call..

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

      n = int(input("Enter : "))
      def odd_even():
      if n % 2 == 0:
      print("EVEN")
      else:
      print("ODD")
      odd_even()

  • @GovindKhedkar-vr6yl
    @GovindKhedkar-vr6yl 8 месяцев назад +6

    55:00
    # sum of first n natural number using recursion
    n = int(input("Enter a number "))
    def sum1(n):
    if (n ==0):
    return 0
    return n + sum1(n-1)
    print(sum1(n))
    # write a recursion function to print all elements in list
    list =[53,88,43,77,12,88,33]
    def fun(list, n):
    if (n == len(list)):
    return
    print(list[n], end= " ")
    fun(list, (n+1))
    fun(list, 0)

  • @DebaprasadDas-z9t
    @DebaprasadDas-z9t 9 месяцев назад +5

    Hi Shrahda,
    The way you teach is really helpful . Thanks a lot . One thing i just wanted to say that factorial of any num is not like 1*2*3*...*num ,it should be num*....*3*2*1 . I know both will give same result but logic will get changed and i believe correct logic does matter even though both logics are giving same result .My intention was not to crrect you as you know many things better than me, here i just wanted to provide my opinion . Thank you....😊

  • @anoopverma1965
    @anoopverma1965 11 месяцев назад +15

    Please continue this series of tutorials with SQL (MySQL) so that projects using database can be created. This will be useful as it will use some dataset libraries like Numpy or Matplotlib and projects can be made.

  • @khushpreet9991
    @khushpreet9991 6 месяцев назад +8

    Recursion smjh nhi aaya tha..toh shradha didi ki dekhne k baad code with h arry pr dekha vha bhi nhi aaya phir codebios pr dekha,, phir dobara yhi aagyi,.. or ab perfect smjh aagya... you are best didi ❤

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

    32:40
    def chkodd_even(n):
    if n%2 == 0:
    return "EVEN"
    else:
    return "ODD"
    n = int(input("Enter a number:"))
    print(chkodd_even(n))
    INPUT: Enter a number:5
    OUTPUT: ODD

  • @vishnusit1
    @vishnusit1 4 месяца назад +12

    i am following you since last 4 years. You deserve Bharat Ratna for your free contents. which is infinite times useful than any paid content available in india..

  • @akhileshghatate4157
    @akhileshghatate4157 6 месяцев назад +2

    57:36
    I made a basic self question to practise by self for odd/even with recursion
    def eve(n):
    if(n==0):
    return True
    elif (n==1):
    return False
    else:
    return eve(n-2)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def od(n):
    if(n==0):
    return False
    elif(n==1):
    return True
    else:
    return od(n-2)

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

    32:55
    def inp_odd_even (n):
    if n%2 == 0:
    print("Even")
    else:
    print("Odd")
    n=int(input("Enter a no to check it is odd or even= "))
    inp_odd_even (n)

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

    32:41 cal_fact(81)
    def cal_evod(num):
    if(num%2==0):
    print("the remainder is",num%2,",","THIS IS AN EVEN NUMBER !")
    else:
    print("the remainder is",num%2,",","THE NUMBER IS ODD !")
    cal_evod(84)

  • @Rajput1678
    @Rajput1678 11 месяцев назад +22

    Ma'am please also cover the projects throughout this python series as you did for JavaScript series

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

    55:00
    n=int(input("Enter Number To Calculate First N Natural Nos= "))
    def calsum(n):
    if n==0:
    return 0
    else:
    return n + calsum(n-1)
    sum=calsum(n)
    print("Sum of First",n,"Natural Numbers = ",sum)

  • @AkshayDabas-mh4hx
    @AkshayDabas-mh4hx 6 месяцев назад +2

    32:55
    def even_odd(num):
    if num%2==0 :
    print("even")

    else:
    print("odd")


    even_odd(66)

  • @rishikasharma8822
    @rishikasharma8822 5 месяцев назад +3

    Homework at 32:20,
    n = int(input("Enter the value: "))
    def odd_even(n):
    if(n % 2 != 0):
    print("ODD")
    else:
    print("EVEN")
    odd_even(n)

  • @F2003S
    @F2003S 9 месяцев назад +3

    An outstanding learning platform. Well done, Ma'am.

  • @GireeshHiremath-zr1jv
    @GireeshHiremath-zr1jv 2 месяца назад +7

    Recursion ko 2x me dekhane wale🗿🗿>>>>>>>>>

  • @amritanshushandilya5238
    @amritanshushandilya5238 4 месяца назад +6

    Home work question answer
    def odd_even(n):
    if(n%2==0):
    print("EVEN")
    else:
    print("ODD")
    odd_even(45)

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

      use input function

  • @Eminem-realslimshaddy
    @Eminem-realslimshaddy 5 месяцев назад +2

    32:40 def num_check(number):
    if(number%2==0):
    print("Even")
    else:
    print("Odd")
    num_check(13)

    • @Jeevan-gj6wj
      @Jeevan-gj6wj 5 месяцев назад

      can anyone explain me what is the use of "return" code at 13:50

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

      @@Jeevan-gj6wj if you call the function by assigning its value to a variable. then it stores the final output of the function.
      basically if u print() then the value will be directy gets printed.
      if you want to use the output further u should return it

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

    32:40
    n = 1
    def odd_even(n):
    if n % 2 == 0:
    print('Number is Even')
    else:
    print('Number is odd')
    odd_even(5)
    odd_even(6)

  • @manjeettyping7979
    @manjeettyping7979 10 месяцев назад +2

    32:49
    My Solution Code
    userinput = int(input("Enter Your Number
    "))
    def oddevenchecker(thisnumber):
    myvalue = thisnumber
    if(myvalue%2 == 0):
    print('Even Number')
    elif(myvalue%2 == 1):
    print('Odd Number')
    oddevenchecker(userinput)

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

    Home work : = 32:30
    def num (a):
    if a % 2==0:
    print("Even")
    else:
    print("Odd")
    num(int(input("Enter your number :")))😊😊

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

    57:20
    n=int(input("enter number"))
    def calc(n):
    if(n==0):
    return n
    else:
    return calc(n-1)+n
    print(calc(n))
    this will also do the job

  • @krishnaagarwal1541
    @krishnaagarwal1541 11 месяцев назад +10

    Home Work:
    def number(n):
    if(n%2==0):
    print("even")
    else:
    print("odd")
    return n
    number(9)
    number(4)

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

      well tried.🎉
      mad said, you have to take input from user

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

      ​@@siamkhan3682n = int(input("Enter a any number"))
      def even_odd(n):
      if n%2==0:
      print("Even")
      else:
      print("Odd")
      even_odd(n)

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

    00:01 Functions in Python are blocks of code that can be reused.
    02:02 Functions reduce redundant code and improve reusability.
    06:12 Understanding function calls and parameters in Python.
    08:09 Using functions reduces redundancy and makes code more efficient.
    12:13 Functions in Python can be created with or without parameters and return values.
    14:17 Functions offer a way to encapsulate code for reuse.
    18:06 Understanding built-in and user-defined functions in Python.
    19:58 Understanding default parameter values in Python functions
    24:04 Creating functions to print lists with proper formatting
    26:09 Understanding functions and recursion in Python
    30:35 Introduction to functions and recursion in Python
    32:36 Recursion in Python
    36:10 Recursion is used to print numbers in a function call
    37:55 Explaining recursion in Python with a specific example
    41:39 Understanding the call stack in Python.
    43:29 Recursion creates layers of function calls
    46:59 Understanding the concept of recursion and factorial in Python.
    49:04 Understanding recursion and its application in programming
    52:51 Understanding recursion through the factorial function
    54:40 Understanding recursion and writing recursive functions in Python.
    58:29 Understanding recursion in Python
    1:00:41 Understanding recursion in Python
    Crafted by Merlin AI.

  • @Peoplesshine
    @Peoplesshine 11 месяцев назад +352

    we want DSA in python

    • @chandu.wri8ts_
      @chandu.wri8ts_ 8 месяцев назад +7

      Hammm yarrrr

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

      Dude do it with java . It's much better

    • @BRO12954
      @BRO12954 6 месяцев назад +2

      Yes mam we want

    • @pratikdahal1750
      @pratikdahal1750 5 месяцев назад +1

      ​​@@plazatotalmemeing9071ok.
      Hey , do you know any other languages?
      Can you tell me what I should learn next after learning PYTHON?

    • @MitaliDani-ht2nn
      @MitaliDani-ht2nn 5 месяцев назад +2

      Yes we want

  • @Ali-t3q1i
    @Ali-t3q1i 5 месяцев назад +5

    Not a single person in subcontinent explains Python language like Mark Myers do but you are definitely made your mark. Fan from Pakistan

    • @Jeevan-gj6wj
      @Jeevan-gj6wj 5 месяцев назад

      can anyone explain me what is the use of "return" code at 13:50

    • @shashank_1874
      @shashank_1874 5 месяцев назад +3

      @@Jeevan-gj6wj Good question. In that case, it wasn't necessary to use "return" because we were directly printing the average. However, it's generally a good practice to use "return" in programming. If you're returning a value, store it in a variable and then print it..

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

      ​@@shashank_1874 did she explained advance python?

  • @Rajput-wm6sc
    @Rajput-wm6sc 8 месяцев назад +1

    32:44
    def checker():
    a = int(input("enter number : "))
    if(a%2==0):
    print("EVEN.")
    else:
    print("ODD.")

    checker() #calling the function.

  • @sidharthkashyap6241
    @sidharthkashyap6241 10 месяцев назад +3

    That Call Stack Analogy was enormously helpful to grasp the Recursion concept...thanks a lot mam❤

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

      Really awesome this function But This video make me easy to learn recursion in python
      ruclips.net/video/JzoAowI_9pU/видео.html

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

    14:32
    def calc(a,b,c):
    sum = a+b+c
    avr = sum/3
    print(avr)
    calc(int(input("enter a first value")),int(input("enter a secound value")),int(input("enter a thred value")))

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

    58:31 alternate solution
    def print_list_elements(lst):
    if not lst:
    return
    print(lst[0],end = ' ')
    print_list_elements(lst[1:])
    print_list_elements([1,3,4,5,3,5,6,8])

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

    i liked......... you sow that line of great swami vivekanand ji . It is very beautiful way to encourage to student that seeing your python lecture...... if some student seen title and they thought it is difficult of chapter 6 that lines you sown on screen it make inspire ............. your teaching style is very cool apna collage..😇

  • @Aman__Chopra
    @Aman__Chopra 10 месяцев назад +3

    Homework:
    def check_odd_even(n):
    if(n%2==0):
    print(n,"is EVEN")
    else:
    print(n,'is ODD')
    n=int(input("Enter the number:"))
    check_odd_even(n)

    • @KhushbooYadav-ve5oh
      @KhushbooYadav-ve5oh Месяц назад +1

      n = int(input("enter your number"))
      def evenodd(n):
      If n%2==0
      Print ("even")
      Else:
      Print ("odd")
      evenodd (n)

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

    32:55
    def oddeven(value):
    n=value
    if(n%2==0):
    print("Even")
    else:
    print("Odd")
    oddeven(5)

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

    32:30
    def cal_num(number):
    if(number%2 == 0 ):
    print("its a even number")
    else:
    print("its a odd number")
    cal_num(int(input("put your number: ")))

  • @abhinavop1406
    @abhinavop1406 24 дня назад

    32:50 Answer:
    n=int(input("Enter the value"))
    def odd_even(n):
    if n%2==0:
    print("Even")
    else:
    print("Odd")
    odd_even(n)

  • @Eminem-realslimshaddy
    @Eminem-realslimshaddy 5 месяцев назад

    23:59 def length_list(list):
    print(len(list))
    for i in list:
    print(i,end=' ')
    length_list([2,3,4]) #ques1 and ques2

  • @neelampandey1959
    @neelampandey1959 5 месяцев назад +2

    def even_or_odd(num):
    if num==0:
    print("not even aur not odd")
    elif num%2==0:
    print("even number")
    else:
    print("odd number")
    num=int(input("enter a number:"))
    even_or_odd(num)
    Print("Thankyou didi") 32:23

  • @rahulagg911
    @rahulagg911 2 дня назад

    One of the best learning videos I have ever come across.. Thank you so much!!

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

    num = int(input("Odd or Even num: "))
    def oddEven(a):
    if a%2==0:
    return("Even")
    else:
    return("Odd")
    print(oddEven(num))
    Done❤❤

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

    32:39
    n1=int(input("enter number"))
    def identifier(n):
    rem=n%2
    if(rem!=0):
    print(n, "is ODD")
    else:
    print(n,"is EVEN" )
    identifier(n1)

  • @BATMAN_rizz
    @BATMAN_rizz 7 месяцев назад +2

    def fun(a):
    if(a%2==0):
    print("GIVEN NUMBER IS EVEN")
    elif(a%2 != 0):
    print("GIVEN NUMBER IS ODD")
    fun(int(input("ENTER A NATURAL NUMBER : ")))

  • @noobienation8144
    @noobienation8144 15 дней назад

    32:51 def OE():
    n=int(input("enter yout no:"))
    if n%2==0:
    print("even")
    else:
    print("odd")
    OE()

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

    30:20
    def even_odd(num):
    if (num % 2 == 0):
    print("Even")
    else:
    print("odd")
    even_odd(int(input("Enter No:")))

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

    32:44
    def odd_even(n):
    if n%2==0:
    print("EVEN")
    else:
    print("ODD")
    odd_even(10)

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

    Fantastic explanation of recursion. Thank you so much. Now I have clear understanding of recursion in python. nice job.

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

    Hello all
    This one the best python basic lecture you will ever get,
    In the entire video she never asked for subscribe or like.
    Let’s encourage her to do more courses like this and help crores of students and learner’s. Keep up the good work Shraddha and keep on helping people.

  • @VarunYedla-w3b
    @VarunYedla-w3b 3 месяца назад +6

    Yes ma'am could you please make videos on dsa in python

  • @Kohlified-17
    @Kohlified-17 6 месяцев назад +1

    32:55
    #function to check odd or even
    def check_master(n):
    if n%2 == 0:
    print("This is Even number")
    else:
    print("This is Odd number")

    print(check_master(24))

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

      Input lena bhul gya😂👍

  • @hitesh14581
    @hitesh14581 11 месяцев назад +15

    def number_chk(a):
    calc = a % 2
    if(calc == 0):
    print("Even")
    else:
    print("Odd")
    number_chk(int(input()))
    😊

    • @AnkitKumar-vy6tq
      @AnkitKumar-vy6tq 10 месяцев назад +1

      I also wrote the same thing but getting error

    • @bhavinthakur
      @bhavinthakur 10 месяцев назад +3

      @@AnkitKumar-vy6tq
      def number_chk():
      a = int(input('Enter number to check >'))
      calc = a % 2
      if(calc == 0):
      print("Even")
      else:
      print("Odd")
      number_chk()
      *corrected

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

      you can add more lines to avoid getting errors like using if else for input to be int and not any other value.@@AnkitKumar-vy6tq

  • @suryanshgoswami3437
    @suryanshgoswami3437 10 дней назад +1

    def user(n=1):
    n=int(input("enter the num: "))
    if n%2==0:
    print("EVEN")
    else:
    print("ODD")

    user()

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

    Bahut acchi teacher ho aap wo quality hai aap me ki samane wale ko kya chahye thank u so much

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

    I literally learnt this entire series in one day!
    simple straightforward.
    also my previous coding exp. of C++ java and c# helped, but python is so simplistic as compared to them! no need for semicolons also :P ;
    bas real project me impliment karna hai aur bekar logo k saath kam karne na mile bas yahi dua h.

  • @dipakkandel2934
    @dipakkandel2934 6 месяцев назад +2

    def fact(a):
    val=1
    for o in range(1,a+1):
    val*=o
    print(val)
    fact(9)

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

    "Thank you so much for your detailed explanation-it really helped me on my Python journey. Please keep making more Python videos in the future. You're amazing!"

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

    num = int(input('Enter number: '))
    def checkNum(i):
    if(i%2 == 0):
    print('Even Number')
    else:
    print('Odd number')
    checkNum(num)

  • @prabhdeepsingh475
    @prabhdeepsingh475 11 месяцев назад +1

    Home work :
    n=int(input("Enter the number:"))
    def eo(n):
    if(n%2!=0):
    print("ODD")
    elif(n%2==0):
    print("EVEN")
    eo(n)

  • @AthifShaik-wj8re
    @AthifShaik-wj8re 4 месяца назад

    11:49
    We can do with " for " also like:
    for i in range (5):
    Print ("hello")
    Boom

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

    HW ---->
    def check():
    no = int(input("Enter a no:"))
    if no%2==0:
    print("EVEN")
    else:
    print("ODD")
    check()

  • @AhmedNadim-ez5ij
    @AhmedNadim-ez5ij 8 месяцев назад +1

    def num(a):
    a = int(input("Enter a number: "))
    if (a %2 == 0):
    print("EVEN",a)
    else:
    print("ODD",a)
    num(4)

  • @AtharvaJoshi-rg5hc
    @AtharvaJoshi-rg5hc 9 месяцев назад +2

    def find_odd_even(a):
    if(a%2 == 0):
    print("even number")
    else:
    print("odd number")

    find_odd_even(2)

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

    THANK YOU FOR THIS GOLDEN SERIES! ALWAYS WILL BE BLESSED FOR YOUR TEACHING SUPER GRATEFUL GOD BLESS YOU

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

    32:40 homework problem
    num=int(input("enter your number-"))
    def odd_even(n):
    if n%2==0:
    state="even"
    else:
    state="odd"
    return(state)
    print(odd_even(num))

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

    wow, just looking like a great teacher

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

    32:45
    homework problem answer
    a = int(input("Enter your number"))
    def num(a) :
    if (a%2 == 0):
    print("EVEN")
    else :
    print("ODD")
    num(a)

  • @zeeleditz01
    @zeeleditz01 8 месяцев назад +2

    Great Explanation

  • @akshatpurigoswami3856
    @akshatpurigoswami3856 6 месяцев назад +2

    x = int(input("enter any number:"))
    def odd_even(x):
    if x%2==0:
    print("EVEN")
    else:
    print("ODD")
    odd_even(x)
    My work

  • @pradeepahirwar3663
    @pradeepahirwar3663 11 месяцев назад +2

    It's was amazing video lecture series. Very Useful. 🎉🎊

  • @tausifeditor2.0
    @tausifeditor2.0 2 месяца назад +1

    # Recursion Function
    def show(n): # n==7 # n==6
    if n == 0: # 7==0 false # 6==0 false
    return
    print(n) # 7 # 6
    show(n-1) # 7-1 # 6-1 etc.
    show(7) # Calling

  • @rabinsdhi-mv1pt
    @rabinsdhi-mv1pt 6 месяцев назад +1

    homework question.
    def check(n):
    if n%2==0:
    print("even")
    else:
    print("odd")
    check(6)
    the output will be "even".

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

    def checker ():
    a = int(input("enter the number to check :"))
    if a %2 == 0:
    print(a,"is a even number")
    else:
    print(a , "is an odd number")
    checker()

  • @datascience-z7l
    @datascience-z7l 10 месяцев назад +1

    def calc_num(n):
    if n%2==0:
    print("EVEN")
    else:
    print("ODD")
    calc_num(8)

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

    Thank you very very much Shraddha didi for this beautiful , interesting and excellent explanation python series ❤😁

  • @nazishjahan04
    @nazishjahan04 10 месяцев назад +2

    you explained recursion brilliantly

  • @Pavan..Chavan
    @Pavan..Chavan День назад

    Thank you..Mam..Teaching a recursion method...

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

    Shardha didi I love your explanation 🥰🥰

  • @Ritesh.s
    @Ritesh.s 5 месяцев назад +1

    Recursion is just opposite of Occurrence ❤

  • @Game.on-point
    @Game.on-point 3 месяца назад +1

    def cal_numType():
    num= int(input("Entere a num: "))
    if(num % 2 == 0):
    print("even")
    else:
    print("odd")
    cal_numType()

  • @seekhoaursikhao4046
    @seekhoaursikhao4046 8 месяцев назад +2

    Hi Shradha, Thank you for the series, its really helpful, the words spelled from your voice, is effective to place in our mind, but yes we have to do lots of practice. 2ndly Can you create a vision or direction towards IT-Admin switching to DevOps platform , for them how you will take the python as a scripting language, as a DevOps Admin, not like a developer/coder. Please create a video series on this.case studies or scenario based tutorials please, so the we can clear the basic concepts which is used in day to day life in companies (playing With AWS,Docker,K8 and a lot, for Automation). Waiting for it.

  • @adityabobade2685
    @adityabobade2685 11 месяцев назад +1

    def even_odd(n):
    if n %2==0:
    print("even")
    else :
    print("odd")
    n = int(input("enter a number:"))
    even_odd(n)

  • @Kumar-he7ey
    @Kumar-he7ey 8 месяцев назад +2

    Homework:
    def odd_or_even(number):
    if number % 2 == 0:
    return "even"
    else:
    return "odd"

  • @bangff6537
    @bangff6537 11 месяцев назад +4

    def finder(a):
    if(a%2==0):
    print(a,"is even number")
    else:
    print(a,"is odd num")

  • @ImRich-xo8cm
    @ImRich-xo8cm 9 месяцев назад

    n=int(input('enter the num:'))
    def fact_(n):
    b=1
    if(n

  • @noobstar.x
    @noobstar.x 6 месяцев назад +1

    def check_even_odd():
    number = int(input("Enter a number: "))
    if number % 2 == 0:
    print("EVEN")
    else:
    print("ODD")
    # Example usage:
    check_even_odd()

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

    all clear , thankyou
    ❤❤

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

    Layer wala concept kamal ka hai ma'am

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

    Didi has mad me her fan, Thanks for the teachings DIDI
    i

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

    num=int(input("Enter the number:"))
    def oddeven(num):
    if num%2==0:
    print("THIS IS AN EVEN NUMBER")
    else:
    print("THIS IS AN ODD NUMBER")
    oddeven(num)

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

      You can do the same by this method also:
      def oddeven():
      num=int(input("Enter the number:"))
      if num%2==0:
      print("THIS IS AN EVEN NUMBER")
      else:
      print("THIS IS AN ODD NUMBER")
      oddeven()
      good work anyway

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

    # write a recursive function to calc the sum of first n natural numbers.
    n = int(input("enter the value of n:"))
    def sum(n):
    if(n==0):
    return n
    else:
    return n + sum(n-1)
    print(sum(n))

  • @PRASHANTKUMAR-os4nl
    @PRASHANTKUMAR-os4nl 6 месяцев назад

    Thank you mam for teaching us python in such a easy way

  • @vinayprat
    @vinayprat 12 дней назад

    Ma'am 🎉🎉🎉🎉🎉 concept clear thanks a lot

  • @Kush-q6l
    @Kush-q6l 6 месяцев назад +1

    def odd_even(n):
    if n%2==0:
    return "EVEN"
    else:
    return "ODD"
    n=int(input("enter the value of n: "))
    print("number is : ",odd_even(n))