Python Functions | Python Tutorial for Absolute Beginners #1

Поділитися
Вставка
  • Опубліковано 13 чер 2024
  • Learn all about Python functions, *args, **kwargs with this Python tutorial for beginners.
    🔥Complete Python course for beginners: • Python Tutorial - Pyth...
    🔥Subscribe for more videos like this: goo.gl/6PYaGF
    Functions are one of the fundamental building blocks of Python and most programming languages that have ever existed. In this tutorial, you'll learn everything you need to know about functions in Python.
    You'll learn all about creating and calling functions, as well as working with parameters, arguments, keyword arguments, default arguments, and much, much more.
    This is one of the many Python tutorials for beginners I've added to my channel.
    Python Exercises for Beginners:
    programmingwithmosh.com/pytho...
    Python Cheat Sheet:
    programmingwithmosh.com/pytho...
    Want to learn more from me? Check out my blog and courses:
    programmingwithmosh.com
    / programmingwithmosh
    / moshhamedani

КОМЕНТАРІ • 423

  • @avinashnadkar9197
    @avinashnadkar9197 5 років тому +262

    I waisted my money by tacking various courses now I realise on youtube its free...

    • @avinashnadkar9197
      @avinashnadkar9197 5 років тому +25

      I am intermediate to the programming, I want to learn python for data science and also I want to make career into the field of AI, Thanks for tutorials...

    • @faustobrusamolino6345
      @faustobrusamolino6345 4 роки тому +39

      Tutorials on UA-cam are "free" because generous people uploads the content, in which they invested time and passion.

    • @son_of_hiskingdom5092
      @son_of_hiskingdom5092 2 роки тому +1

      @@faustobrusamolino6345 yea thank Jesus for that too I did it on the Python3IDE it went very well till the last one other than that it was very good I’m looking to go very far in Python

    • @preethamsshaiva2212
      @preethamsshaiva2212 2 роки тому +24

      You have wasted on your English classes aswell

    • @ayferno7337
      @ayferno7337 2 роки тому +3

      @@preethamsshaiva2212 fr

  • @terrancekayton007
    @terrancekayton007 4 роки тому +88

    OMG bro, I'm 'bout to cry 3 minutes in...I've been struggling with trying to understand the difference between parameters and arguments.. Shhphew!! Thanks, so much for knowledge sharing your skills!!

    • @alvarocajina87
      @alvarocajina87 3 роки тому +1

      Dude, that's exactly what I thought. I've been struggling for days!!!

    • @MrDjRayner
      @MrDjRayner 3 роки тому +2

      For the benefit of everyone struggling with understanding the basic difference between parameters and arguments, parameters are the comma separated placeholders (CSPHs) that appear in the function declaration, the first line of a function. Arguments are comma separated values, and they appear in the function call. The relationship between parameters and arguments is that arguments and mapped to parameters. So depending on " which side of the line you're on", the term used varies.

    • @bryan0x05
      @bryan0x05 2 роки тому +1

      @@MrDjRayner this is not quite right, the function call and function declaration both have parameters, we call them formal parameters in the function declaration and actual parameters in the function call. Honestly this is just pedantic and not vital to understanding the code.

    • @Believer758
      @Believer758 3 місяці тому

      ​@@alvarocajina87 Hello Dear .I have Just read your comment posted 2 years ago. Please let me know, where are you right Now as you have Watched this tutorial 2 years ago and I'm taking it today 27 February 2024

    • @Believer758
      @Believer758 3 місяці тому

      ​@@MrDjRaynerHello Dear .I have Just read your comment posted 2 years ago. Please let me know, where are you right Now as you have Watched this tutorial 2 years ago and I'm taking it today 27 February 2024

  • @owilhm
    @owilhm 3 роки тому +53

    def appreciation(name):
    return name
    word = “Thankyou very much “
    print(word + appreciation(Mosh))

    • @noemirignanese635
      @noemirignanese635 2 роки тому +5

      print(word + ' Mosh') and you get the same result quikly, you don't understand why we use function

    • @DeArtTerminator
      @DeArtTerminator 2 роки тому

      @@noemirignanese635 hahahahahaha

    • @thecrypticmelon
      @thecrypticmelon 2 роки тому +2

      where are the quotes in Mosh

    • @truepvp5463
      @truepvp5463 2 роки тому

      @@thecrypticmelon its a string

    • @lambachurro8790
      @lambachurro8790 2 роки тому +1

      nice dude, i love reading comments

  • @mty1966
    @mty1966 3 роки тому +159

    4:50 Types of functions
    8:51 Key words argument
    10:56 Default arguments
    12:30 args
    16:48 args**
    19:09 Scope
    24:21 Exercise

    • @saraswatiyadav1881
      @saraswatiyadav1881 2 роки тому +4

      ,,🤗

    • @ahamedsha9348
      @ahamedsha9348 2 роки тому +3

      Thanks mate

    • @kingofgaming1295
      @kingofgaming1295 2 роки тому +1

      Thank you, it was very helpful

    • @ahmadrandhawa238
      @ahmadrandhawa238 Рік тому

      Plz someone tell me error?:
      def geto(first,sec):
      return ("Hello",first,sec)
      message=geto("Baapo"," & maiya")
      file=open("content.txt",'w')
      file.write(message)

    • @Believer758
      @Believer758 3 місяці тому

      ​@@saraswatiyadav1881Hello Dear .I have Just read your comment posted 2 years ago. Please let me know, where are you right Now as you have Watched this tutorial 2 years ago and I'm taking it today 27 February 2024

  • @AndrewClark83
    @AndrewClark83 4 роки тому +72

    Thanks for taking the time to create these videos, it's really helping me in my course. You've got a great teaching style and the content is great. Cheers.

    • @Believer758
      @Believer758 3 місяці тому

      Hello Dear .I have Just read your comment posted 2 years ago. Please let me know, where are you right Now as you have Watched this tutorial 2 years ago and I'm taking it today 27 February 2024

  • @hqbib8083
    @hqbib8083 3 роки тому +56

    im not even in high school yet, and i already know most of Python because of you! Keep up the good work :')

    • @justasydefix6251
      @justasydefix6251 3 роки тому +3

      @shiva swaroop P.S Learn C++ C# then make something big, that the difference between an engineer and a kid, and between electrician and electrical engineer

    • @codingwithkenny6492
      @codingwithkenny6492 2 роки тому

      That's awesome! Me too! :)))

    • @FTech109
      @FTech109 2 роки тому

      @shiva swaroop P.S learning the syntax is differs from solving complicated problems and developing algorithms

    • @skloit_dev3089
      @skloit_dev3089 2 роки тому

      Could I use Arduino devices as a kid too

  • @gambu4810
    @gambu4810 6 місяців тому +2

    My Jaw dropped when I saw that someone has an academic charnel with 3.6 MILLION SUBSCRIBERS! 😱

  • @AnnieCushing
    @AnnieCushing 2 роки тому +27

    This was fantastic! I love how you simplify concepts and then build up to more complicated applications. You picked up a subscriber.

    • @Ushq_QgA
      @Ushq_QgA Рік тому

      iuijp;

    • @Believer758
      @Believer758 3 місяці тому

      Hello Dear .I have Just read your comment posted 2 years ago. Please let me know, where are you right Now as you have Watched this tutorial 2 years ago and I'm taking it today 27 February 2024

  • @TheGoktas17
    @TheGoktas17 2 роки тому +2

    It is a wonderful introduction to functions in Python, thank you very much!

  • @kostiantynkarzhanov9216
    @kostiantynkarzhanov9216 Рік тому +1

    Thank you very much for the quick and good explanation! 💛

  • @wilsonliu1716
    @wilsonliu1716 2 місяці тому

    thanks Mosh! I've being struggling with def and return function even after watching several youtube tutorial. No one could explain the details as clearly as you did.

  • @edenrenee7392
    @edenrenee7392 3 роки тому +2

    This helped me for my college class thank you!

  • @CSCrew
    @CSCrew 3 роки тому

    Thank you so much, Mosh! You are the best!

  • @SheldonYegon
    @SheldonYegon 11 місяців тому +1

    When it comes to teaching newbies skills on web development, and other tech stuff, bro, you win!!! Thank you for this. Your voice makes it even sweeter!!

  • @markmilan57
    @markmilan57 10 місяців тому +2

    Short and Sweet. Keep on making some cool tutorials. I enjoyed a lot .

  • @danielnikolov6482
    @danielnikolov6482 3 місяці тому

    Been on functions for a month. You filled my gaps in 20 mins. ❤❤❤

  • @nelsondelarosa5490
    @nelsondelarosa5490 9 місяців тому +2

    Thanks so much for taking your time and creating this fantastic video.

  • @familyguy_random
    @familyguy_random Рік тому

    i was looking for a perfect lecture on function for many month,,finlay i got it,,and i will continue your lecture,,,and this is my 1st comment in my 10 years of using youtube ,,thank you

  • @fartiamfarttt2631
    @fartiamfarttt2631 9 місяців тому +1

    Thanks so much! You explain better than my teacher!

  • @Funky_Hernandez
    @Funky_Hernandez 22 дні тому

    Thank you so much Mosh! You're the best teacher out there. Wish you could also make a tutorial on classes and objects!🙏

  • @taneemalam1135
    @taneemalam1135 3 роки тому +19

    I love you mosh !
    Been trying to search for tutorials.
    And I got hold of your content a couple months ago.
    I also watched the full python course for beginner's video.
    Just wanted to say thank you!
    And we can all agree that you are a good teacher.

    • @Ushq_QgA
      @Ushq_QgA Рік тому

      🧐🧐😏🤨

    • @Believer758
      @Believer758 3 місяці тому

      Hello Dear .I have Just read your comment posted 2 years ago. Please let me know, where are you right Now as you have Watched this tutorial 2 years ago and I'm taking it today 27 February 2024

  • @DenzelTheSecond
    @DenzelTheSecond Рік тому +1

    Very concise and useful, thank you

  • @nilusah4356
    @nilusah4356 3 роки тому

    Thank you for this video. Really helpful!!

  • @jakesnell7707
    @jakesnell7707 3 роки тому

    this is so cool mosh! thank you!

  • @francismannion7075
    @francismannion7075 4 роки тому

    That was great Mosh , thank you.

  • @Sherlock24jp
    @Sherlock24jp 3 роки тому

    men you saved my life thank you so much for this tutorial!!! greetings from Mexico

  • @CarlFritz24
    @CarlFritz24 Рік тому +1

    INDEED, you are a GENIOUS, Mosh. Lots of knowledge, Perfection in teaching, amazing videos. Thanks. I think I'll learn a lot with you.

  • @sandraoriji8351
    @sandraoriji8351 4 роки тому +1

    Thanks Mosh, this is just awesome

  • @faustobrusamolino6345
    @faustobrusamolino6345 4 роки тому +20

    Amazing tutorial, thank you so much for sharing.. This is one of the clearest tutorials on functions, I'm learning heaps

    • @DimopoulosInformaticsTutorials
      @DimopoulosInformaticsTutorials 4 роки тому

      ua-cam.com/video/rJDQeCTQDRs/v-deo.html&t=

    • @Believer758
      @Believer758 3 місяці тому

      Hello Dear .I have Just read your comment posted 4 years ago. Please let me know, where are you right Now as you have Watched this tutorial 4 years ago and I'm taking it today 27 February 2024

  • @tonytony-fc6gq
    @tonytony-fc6gq 5 років тому

    THANK YOU VERY MUCH well explained

  • @sn66410
    @sn66410 2 роки тому +6

    30 mins just awesome learning. Thank you!

    • @Believer758
      @Believer758 3 місяці тому

      Hello Dear .I have Just read your comment posted 2 years ago. Please let me know, where are you right Now as you have Watched this tutorial 2 years ago and I'm taking it today 27 February 2024

    • @user-eh8be5zk8u
      @user-eh8be5zk8u 26 днів тому

      @@Believer758 hes dead

    • @Believer758
      @Believer758 26 днів тому

      @@user-eh8be5zk8u Okay 🥲

  • @bemccune7671
    @bemccune7671 2 місяці тому

    the formatting extension for VS Code he mentioned was Autopep 8 for anyone who didn't catch it. I went to the transcript to understand what he said. I'm so excited to not have to have to google all my formatting questions! Also solid explanations, thanks Mosh!

  • @tiberiusG
    @tiberiusG 4 дні тому

    Thank you for holding my hand through this, I've been learning Python for a couple weeks now and I'm struggling with some basic concepts related to functions and statements, among other things. Before this video I probably would have had less than half the knowledge needed to complete the exercise, now I have enough to make a working FizzBuzz algorithm on my own in 10 minutes, albeit not as professional as your code.
    def fizz_buzz(input):
    if input % 15 == 0:
    return "fizzbuzz"
    elif input % 3 == 0:
    return "fizz"
    elif input % 5 == 0:
    return "buzz"
    else:
    return input
    print(fizz_buzz())
    the solution for both 3 and 5 that you came up with wasn't obvious to me, and I was unfortunately trying to make the code too terse. I did figure that the only numbers divisible by both 3 and 5 are always divisible by 15, so I chose 15 lol.

  • @marcosknez4024
    @marcosknez4024 Рік тому

    GREAT video! Thank you so much!

  • @Pravinamadoori
    @Pravinamadoori 3 роки тому

    Easy to understand by beginners too.. Thanks

  • @mansoorahmed9455
    @mansoorahmed9455 8 місяців тому

    Your videos are so good that viewers even forget to like the video and jump to watch more of your content. Guys please like these brilliant lectures after watching it.

  • @TheMasudsaedi
    @TheMasudsaedi Рік тому

    Thanks Mosh! It was very easy to understand.

  • @karasanteswebtv
    @karasanteswebtv Рік тому +1

    Great Teaching style and method and presentation !

  • @theundeadforever3300
    @theundeadforever3300 2 роки тому +3

    I'm kinda proud of myself for almost solving the fizz_buzz problem. I just couldn't finish my solution, I did the same thing that you did tho, and I'm a relatively new beginner coming from C++.

  • @kumarsonusingh5803
    @kumarsonusingh5803 3 роки тому

    Thank you this video, really helpful!!

  • @dabigweav
    @dabigweav Рік тому

    this helped me tremendously for my intro to python programming course I'm taking. I will return to your page again. Thanks.

  • @jawadtahmeed9854
    @jawadtahmeed9854 5 років тому +11

    Your videos are so helpful and precise. Can you please do a series on Tensorflow and machine learning? I am highly looking for a quality series on this topic.

  • @jasonmase8860
    @jasonmase8860 Рік тому

    I love how you teach Mosh.

  • @emmanueloseitutu7376
    @emmanueloseitutu7376 Рік тому

    By far, one of the best.

  • @Trincanacos.
    @Trincanacos. Рік тому +7

    I wasn't expecting this
    I have never seen a tutorial than explained me so well what I needed to know in my whole life, maybe it's also due to you tackling exactly the doubts I had but never have I seen a single youtube video with such information. The first 5 minutes alone helped me more than hours of python classes, an immediate subscription on my part, keep going man!

  • @juaninfante7000
    @juaninfante7000 4 роки тому +4

    Great content I was stock on this, now se everything clear thanks to you brother god bless you

    • @Believer758
      @Believer758 3 місяці тому

      Hello Dear .I have Just read your comment posted 2 years ago. Please let me know, where are you right Now as you have Watched this tutorial 2 years ago and I'm taking it today 27 February 2024

  • @shahramsultanian
    @shahramsultanian 4 роки тому

    thank you Mosh it was Wonderful .

  • @shirkhanaslanzade2406
    @shirkhanaslanzade2406 4 роки тому

    many thanks, really helpful

  • @elliotbennett1991
    @elliotbennett1991 11 місяців тому

    I found this video very useful. Thank you!!!

  • @liguow
    @liguow Рік тому

    Very in depth and concise

  • @derickmusinguzi
    @derickmusinguzi 8 місяців тому +1

    Great Lesson, I was able to learn a lot about Functions

  • @SEVEN-og1td
    @SEVEN-og1td 4 місяці тому

    Thank you so much for this videos they are perfect and free. 🎉

  • @ag36015
    @ag36015 4 роки тому +3

    You're very clear in the explaination, thanks a lot

  • @timkwok2365
    @timkwok2365 Рік тому

    I learn a lot, many thx!

  • @_mil0__
    @_mil0__ Рік тому

    Your an excellent teacher. Thank you

  • @mickaelrichard7255
    @mickaelrichard7255 3 роки тому

    if what you said is true about the exercice fizzbuzz being tricky, you just made the very tiny confidence I have in python raised a bit! thanks for that!

  • @amandal8404
    @amandal8404 3 роки тому +14

    I love how you called out using the global keyword in functions as bad practice. Your teaching/coding style is clean and minimalist, that's why we're all here!

    • @Believer758
      @Believer758 3 місяці тому

      Hello Dear .I have Just read your comment posted 3 years ago. Please let me know, where are you right Now as you have Watched this tutorial 3 years ago and I'm taking it today 27 February 2024

  • @AllAroundHnadyMan
    @AllAroundHnadyMan Рік тому

    Excellent education - thanks

  • @anurasenarathna1703
    @anurasenarathna1703 11 місяців тому

    Very well explained. Thank you

  • @saeedmohamed9480
    @saeedmohamed9480 2 роки тому

    I learnt parameters nd argument clearly thank you.

  • @ninavanleeuwen1183
    @ninavanleeuwen1183 7 місяців тому

    Thank you so much!

  • @ee07168
    @ee07168 3 місяці тому

    Excellent teaching skills and knowledge great job !!

  • @lexamitchenterprises
    @lexamitchenterprises Рік тому

    Thanks for this video, I really appreciate it

  • @iamwriting3935
    @iamwriting3935 7 місяців тому

    Superb... I love coding with Mosh...❤❤❤

  • @moliendo102
    @moliendo102 5 років тому +2

    It's your trademark to represent and explain the things in a clear concise and exact manner !! This makes learning material comprehensible easy to digest and remember. Without the burden of excessive words. Thank you very much i appreciate this !!!

    • @Believer758
      @Believer758 3 місяці тому

      Hello Dear .I have Just read your comment posted 5 years ago. Please let me know, where are you right Now as you have Watched this tutorial 5 years ago and I'm taking it today 27 February 2024

  • @kayemmanims
    @kayemmanims 7 місяців тому

    Great explanation, Mosh. Thanks a lot

  • @Shachar50
    @Shachar50 2 місяці тому

    man thank you so much for that!!

  • @alisondefreitas8625
    @alisondefreitas8625 Рік тому

    That's was really good Mosh
    Big thank you.

  • @MrDuvinci
    @MrDuvinci 3 місяці тому

    You are a good teacher

  • @spaulpaul3242
    @spaulpaul3242 3 роки тому

    Am in kenya,,,mosh thank you,,I love the way of your teaching,,I will stick on your teaching until I know programming

  • @saralshikhar2422
    @saralshikhar2422 3 роки тому

    Thank you for this amazing tutorial!!!!

    • @janusztarnowski115
      @janusztarnowski115 2 роки тому

      fajn coode is on ua-cam.com/video/CMcEw_GT82g/v-deo.html

  • @TechReptile
    @TechReptile 3 роки тому +1

    Hi Mosh, You are awesome to teach.

  • @eleanor.44
    @eleanor.44 6 місяців тому

    Thanks a lot sir!

  • @realmaureenoyakhilome
    @realmaureenoyakhilome Рік тому

    This video is gold. Thanks

  • @ecodersofficial
    @ecodersofficial 2 роки тому +1

    OMG!!! Wow! I meaned all The! You're Really a Great Coder! and You're More Intelligent then Harry! Thank you so much Other Peoples Provides Just Full course but not means about it!

  • @KA-NV
    @KA-NV 5 років тому +8

    Hi Mosh. Thank you for your fantastic videos. You certainly were born to teach. You make the material so easy to understand. I am glad I found your channel.

  • @techmedia254
    @techmedia254 5 місяців тому

    UA-cam University will never disappoint....am a member....chau

  • @kapibara2440
    @kapibara2440 5 місяців тому

    It was a very interesting tutorial, thank you ❤

  • @victoreleanya4375
    @victoreleanya4375 3 роки тому

    Thanks Mosh

  • @keenanwekesa1723
    @keenanwekesa1723 10 місяців тому

    Learnt an invaluable lesson from the "Exercise" part of the tutorial: Always test & retest your code!

  • @Joy_Boobo
    @Joy_Boobo 6 місяців тому

    #You take your time in teaching✅
    # You are audible ❤
    # and prepares very well for each class💯. THUMB UP 👍

  • @kitcat2449
    @kitcat2449 Рік тому +7

    I've started with C++ and used a few other languages, mostly static. Now that I'm learning python I'm having a hard time with those indentations :D they look and feel so unnatural
    Great tutorial as always, love that there is a variety!

    • @snatamohanty6612
      @snatamohanty6612 Рік тому +2

      me too! it feels to simple. i'm not used to not having a thousand of errors because of an extra bracket...

    • @kitcat2449
      @kitcat2449 Рік тому +1

      @@snatamohanty6612 haha yeah, like 'SOMETHING IS WRONG SINCE NOTHING IS WRONG' :D
      Indentation errors (or not necessarily even errors, but the wrong indentation) caused me little confusion though

    • @snatamohanty6612
      @snatamohanty6612 Рік тому +1

      @@kitcat2449 no because same. now whenever I get an error I just give up and shut down my whole computer, I am not patient at all lmao

    • @kitcat2449
      @kitcat2449 Рік тому

      @@snatamohanty6612 taking breaks is good for your brain at least lol. I have the exact opposite problem, I tend to obsessively focus so I forget to eat and take bathroom breaks 🗿

  • @junaidmughal3806
    @junaidmughal3806 2 роки тому

    best video on functions

  • @nol-sor1985
    @nol-sor1985 3 роки тому

    You're the best dude 🙏

  • @gfpkelly
    @gfpkelly 3 роки тому

    This is a great video!

  • @user-vc2tr3fz2p
    @user-vc2tr3fz2p 3 роки тому

    Great video it was quite helpful

  • @affanashrafi2410
    @affanashrafi2410 2 роки тому

    thank you mosh

  • @mbarkiamira7256
    @mbarkiamira7256 3 роки тому

    Thank you so much

  • @edilbertogarcia5774
    @edilbertogarcia5774 Рік тому

    to be honest there's nothing else to say than amazing. thanks.

  • @rorolabelli2823
    @rorolabelli2823 3 роки тому

    The best teacher ever😉💞

  • @priontotimam5939
    @priontotimam5939 2 роки тому

    thanl you for this wonderful help

  • @chinwachukwu2622
    @chinwachukwu2622 4 роки тому

    This is awesome lessons

  • @deniskimutai9563
    @deniskimutai9563 Рік тому +1

    My name is Denis Kimutai.
    I am a beginner in software engineering.
    Have never watched a clear and understudble tutorial like yours.
    The progress I make everyday in my software engineering cannot even be explained more than saying thank you sir.
    African normally struggle with the whites English. But you speech is clear and understudble..
    Thank you sir and God bless you.

  • @mokaddisfarazi2494
    @mokaddisfarazi2494 5 років тому

    you are great sir!

  • @droneguy69
    @droneguy69 2 роки тому

    Thanks for this Mosh

  • @mekhalakarunaratne1707
    @mekhalakarunaratne1707 3 роки тому +1

    Thank you, After a huge struggle, you helped me to clear my doubts of parameters and arguments.!!!! Thank you Sir !!!!!!!!!!!!! I will keep watching your channel... :)

  • @jmr
    @jmr 2 роки тому +12

    His multiply function reminded me of a recent security vulnerability. Anything * 0 = 0. While it was fine his function didn't check for a 0 being passed that isn't always the case. In a real world scenario someone figured out there was no check for a public key being a 0. As a result the hacker could pass a zero and bypass security because multiplication is used to verify keys.

    • @Believer758
      @Believer758 3 місяці тому

      Hello Dear .I have Just read your comment posted 1 year ago. Please let me know, where are you right Now as you have Watched this tutorial 1 year ago and I'm taking it today 27 February 2024

    • @jmr
      @jmr 3 місяці тому +1

      @@Believer758 I don't use Python daily and I was simply refreshing my knowledge on functions in Python. I'm sure you will do well as Python is one of the easier languages compared to something like C.

    • @attohval
      @attohval 13 днів тому +1

      I am currently studying Software Engineering and preparing for my Python Project presentation... It is a thing of joy to see brilliant people like you guys here

    • @jmr
      @jmr 13 днів тому +1

      @@attohval That's awesome! I'm sure you'll do great.

    • @attohval
      @attohval 12 днів тому +1

      @@jmr I am trying my best Sir... Thanks a lot. Starting my Java class next month and it continues

  • @aminekouchta9616
    @aminekouchta9616 Рік тому

    really good explanation...keep it up

  • @argjendsejfullai8304
    @argjendsejfullai8304 3 роки тому +1

    i wish you were my teacher sir, you earn my respect, sub, like and comment and i hope i pass my python exam. Mosh += love