6 Python Exercise Problems for Beginners - from CodingBat (Python Tutorial #14)

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 มิ.ย. 2024
  • 6 Python exercise problems for beginners. Let’s go!
    Also, Python book recommendations / what projects to work on: • Python books for begin...
    Find me on Instagram: / ykdojo
    And Twitter: / notifications
    And Facebook: / entercsdojo
    Resources I mentioned in this video:
    CodingBat: codingbat.com/python
    Python 2 vs 3: bit.ly/2vNvqQb
    Project Euler: projecteuler.net/
    Get Ready for Your Coding Interview: goo.gl/RMCaxW
    Python book recommendations / what projects to work on: • Python books for begin...

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

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

    Here’s my other video about what Python projects to work on: th-cam.com/video/-1j0_SVaAJM/w-d-xo.html
    Also, some timestamps:
    1:30: Problem 1
    4:54: Problem 2
    7:10: Problem 3
    8:36: Problem 4
    11:49: Problem 5
    16:18: Problem 6
    Oh btw, I recently set up a subreddit for you guys for asking each other any programming-related questions. Feel free to use it any way you’d like: www.reddit.com/r/csdojo/

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

      Same question

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

      plz respond to amit kalita!
      How difficult to reach that level?

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

      Very difficult, honestly. You would probably need a team of developers and designers. Say, 8 developers, 1 product manager, and 1 designer taking 6 months to make something as solid as Clash of Clans.
      So, in my opinion, I think it's more wise to start with a simpler project. For example, maybe something like Fruit Ninja or even Flappy Bird. Gain experience that way first, and either get a job at one of these companies or get VC investment to make a team :)

    • @AS-vu8cz
      @AS-vu8cz 5 ปีที่แล้ว +1

      My super star

    • @SRINU-gc9hl
      @SRINU-gc9hl 5 ปีที่แล้ว +1

      CS Dojo bro i want to create video games for android and pc please tell me how to start and where to start please reply me bro

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

    As someone with dyslexia and ADHD who didn't do well in maths at school and didn't do anything to do with programming before this I am proud to say that I have completed this series and learnt the syntax for Python. I never thought I could do something like this. It was difficult for me but I did it and so can you.

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

      I’m windering who asked mb

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

      congrats! It's pretty fun once you start getting the hang of it little by little.

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

      Well done! wish you all the best in your future endeavors.

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

      @@honueya5 Thank you!

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

      Congratulations!

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

    Mr YK , I really appriciate that u dont use music and all this unneded or annoing things in your video. thank you very much ^^

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

    You're such a good teacher and at explaining the codes and the question. I'm struggling so badly with python for one of my modules in school (and i have never done coding nor physics in my life) but i take comfort in slowly building my basics from this channel

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

    def sleep_in(weekday, vacation):
    return not weekday or vacation

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

      Why I'm having error with this

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

      @@hodl5328 try this
      def sleep_in(weekday, vacation):
      return vacation and not weekday

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

      @@monzirmusa1324 I tried your code but it didn't work. Tried this and worked:
      def sleep_in(weekday, vacation):
      return not weekday or vacation
      It says "if it's not weekday or if we are on a vacation" that's why if you put "and" instead of "or" changes the meaning of the code.
      You can even use:
      def sleep_in(weekday, vacation):
      return vacation or not weekday

    • @simontheserotonin4661
      @simontheserotonin4661 4 ปีที่แล้ว

      @@hodl5328 if you copy/ pasted it you would have error cuz the 2nd line has only 2 spaces, but it needs 4 so it can interact with the line above.

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

      @@simontheserotonin4661 Four is just convention. As long as a single space exists it'll work.

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

    Thank you for this wonderful series, it has helped so many! If you ever feel like it, please add more videos to this series, they'll really help your viewers out! Can't wait to start other tutorial playlists by you!

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

    Thank you for making these videos. I am just starting out with python and I appreciate you taking the time to make these. I have dealt with programming and programming concepts a while ago when I self-taught GWBASIC and then quickbasic. I did not progress past that point, and have found that I have a lot to learn. Your videos are great at explaining concepts to someone who has not had any proper prior training. Thank you again

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

    YK, love your approach towards making programming concepts really easy to catch, your videos are always valuable. Thanks for helping the community out.

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

    One of the most effective coding platforms to learn and practice. You make coding very easy to understand. Keep going!!

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

    I'm just waiting for JavaScript playlist. I'm a huge fan of you.
    Thanks a lot for making python series.

  • @dayolvrengzak2884
    @dayolvrengzak2884 2 ปีที่แล้ว

    I’m new to coding. It was very difficult understanding anything at first until I jumped to this video. Now I’m feeling like I should’ve started learning backwards. Thank you for making it easier 👍😀

  • @ngoctruong1409
    @ngoctruong1409 5 ปีที่แล้ว

    yayyy this is what ive been waiting for!!! thank you!!

  • @suf3117
    @suf3117 5 ปีที่แล้ว

    I don’t know one thing about coding at all but just by seeing you solve the first 2 problems I was able to pretty much solve the other problems.

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

    You are truely awesome bro.. The amount of simplicity is truely the best.
    Love from India 🤘🏻💕

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

    Thanks so much for this, I really needed these explanations :)

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

    Thank you, adding value as always!

  • @2logj
    @2logj 4 ปีที่แล้ว +1

    Amazing clarity Dojo.you are an inspiration to online coders.

  • @ahkilles
    @ahkilles 4 ปีที่แล้ว

    Extremely helpful, thank you!

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

    You rock! Thanks a lot.
    Keep posting this kind of video.

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

    Hey YK, a suggestion for your next Video, I think you should make a video on how to crack any probelm in a systematic way

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

    More videos like this would be great! Super helpful! Thank you!

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

    this is my alternative solution for exercise 2:
    def string_times(str, n):
    str = input("introduce a string: ")
    n = int(input("introduce a number: "))
    return str * n
    print(string_times(str, n))

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

    Just wanted to say thank you, your videos are amazing.

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

    You are such a great teacher. Thank you so much for all the help so far

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

    Thank you from the bottom of my heart.

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

    Please, more videos about python! thx!

  • @megaraph5551
    @megaraph5551 3 ปีที่แล้ว

    From watching your videos I got all problems right! Thank you so much!

  • @paraglide01
    @paraglide01 5 ปีที่แล้ว

    Thanks for the codingbat website. Thats great fun trying solving the problems, as a beginner that has a high learning value.

  • @shalabycode
    @shalabycode 5 ปีที่แล้ว

    you are best tutor ever I saw , keep going on :)

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

    You are awesome ! Love from India. ❤

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

    Nice :)
    CodingBat looks like an awesome place for these practices!

  • @hanssacosta1990
    @hanssacosta1990 4 ปีที่แล้ว

    just want to say thank you so much for your time man much appreciated

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

    Great video! It encouraged me to go on coding!

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

    Thank you, Sir. I really like your voices.

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

    Thanks alot man. You continue to producd quality content and help me on this journey of learning python :)

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

    my alternative solution for exercise 3:
    def hello_name(name):
    name = input("introduce your name")
    return "hello, " + name + " !"
    print(hello_name(name))

    • @NervylHraje
      @NervylHraje 3 ปีที่แล้ว

      Hi, after running the code you'd realize it doesnt work. The problem is the "name" in def hello_name(name).
      If youre gonna gather the information through input after just leave it as def hello_name()
      I'd also recommend formatting the "introduce your name" a bit (for example "Introduce your name: ") and getting rid of the space in " !" to make it "!"
      Best of luck to you :)

  • @nijin5441
    @nijin5441 2 ปีที่แล้ว

    This is a really good video sometimes you dont need the answer just the hint and him showing examples on jupyter is amazing

  • @rameshadhikari2945
    @rameshadhikari2945 3 ปีที่แล้ว

    These exercises helped me a lot for beginners like me.

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

    It would be very helpful if you upload full series of python vedios...and thank you for making such good vedios about programing 😊

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

    Thank you so much... It's very useful for me 😊

  • @chandararanget7879
    @chandararanget7879 5 ปีที่แล้ว

    I like your video tutorial about python especially for the beginner like me and
    I hope I can watch your more video about python. Thank you

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

    Great python tutorial series YK.
    Could you make video on Decorators

  • @mdc9602
    @mdc9602 5 ปีที่แล้ว

    Done with Python. Now, please upload tutorials of UI/UX Development or SEO for beginners!

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

    Hacker rank is also a great resource , problems are sorted based on difficulty levels and it wont be complicated for beginners because they have categorized problems in seperate sections such as graphs,queues,linked list and the UI is also a factor to consider , it is very beginner friendly

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

      hi i am looking for more sites to practice can you tell me more like these

  • @nalongsonedanddank7521
    @nalongsonedanddank7521 5 ปีที่แล้ว

    Thanks for sharing the website.

  • @viggorasmussen4913
    @viggorasmussen4913 5 ปีที่แล้ว

    Nice video. Do you think you could make one with focus on the use of algorithms in Python?

  • @Fqdunjy
    @Fqdunjy 4 ปีที่แล้ว

    It's the best video for beginers I have ever seen.

  • @user-mo5pe2me6r
    @user-mo5pe2me6r 5 หลายเดือนก่อน

    You are so good teacher and i never been a single teacher like you in my college...I did mca but I feel coding so difficult but as I saw your python series..it feel interest in programming. Thank you so much😊

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

    Thanks for the videos! They are very inspiring!
    Question:
    Do you think Discrete Structures/Discrete Math is important when learning Algorithms?

  • @dubeme.3014
    @dubeme.3014 3 ปีที่แล้ว

    Thank you CS Dojo!

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

    Thanks!
    It's really very helpful :)

  • @mohamedwafy1948
    @mohamedwafy1948 5 ปีที่แล้ว

    I was looking for a website like codingbat .thank you very much.

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

    Oppa, your codes are very different from what my teacher teach in school. This one is quite simple and easy to understand.

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

      He's Japanese 😁 Great teacher, nonetheless!

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

      Oppa is Korean word

    • @okiriotaa4664
      @okiriotaa4664 3 ปีที่แล้ว

      Is this boris reference?

  • @semrasanlioglu
    @semrasanlioglu 5 ปีที่แล้ว

    Thank you very much , you should make more videos like this :D

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

    Thanks for the video. Codingbat is currently down so i can use these exercises :)

  • @skhasiburrahaman684
    @skhasiburrahaman684 4 ปีที่แล้ว

    If possible solve this
    Magic constant generator:
    Write the function definition for the generator named 'generator_Magic', which takes a single parameter 'n1'.
    Define the above Generator such that it should yield the Magic constant (s) for the values starting from 3 to 'n1'.

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

    GJ on the fact that out of all your viewers, only 50 people disliked it. Keep up the good work :)

  • @DineshKumar-lb4ph
    @DineshKumar-lb4ph 5 ปีที่แล้ว

    Great job man 🙂 continues it 👍👍

  • @ash_177
    @ash_177 3 ปีที่แล้ว

    Hello! bro YK, Can you do Java tutorial like these Python Tutorials? These tutorials really helps me to understand Python from the scratch. I really appreciate your effort and time. Thank you sir.

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

    I'd suggest beginners also learn Python's list comprehensions. Many things could be done with less steps using them. For example, last exercise could be solved like this:
    def count_evens(nums):
    return len([x for x in nums if not x%2])

    • @mrmoinn
      @mrmoinn 5 ปีที่แล้ว

      How does that work

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

    Yay... today I finish all of phyton codingbat except list 2. I'll finish them tonight. The hardest is Logic 2. It takes a long time but I did it without help.

    • @abdallahsiyabi4784
      @abdallahsiyabi4784 3 ปีที่แล้ว

      Hey bro, I am struggling with this one:
      codingbat.com/prob/p116620
      please email me:
      abdallah.alsiyabi@gmail.com
      Thank you

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

    Could you make a tutorial about how to build some small python project from scratch?

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

      @@rdangdev from scratch != in scratch .... If you arent trolling

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

      @sajid chowdhury from scratch means from nothing, in scratch means written in a super basic child programming language

    • @dileepkushwaha7015
      @dileepkushwaha7015 4 ปีที่แล้ว

      already from scratch

    • @letsthink8245
      @letsthink8245 3 ปีที่แล้ว

      Just make a fun idea and try to do it and make a plan on paper and work on it

    • @arno_bhai
      @arno_bhai 3 ปีที่แล้ว

      @@frechlachs7205 4 year old kid used js and python to work with game devs

  • @mikezhao7648
    @mikezhao7648 5 ปีที่แล้ว

    Love your video. Keep it up!

  • @notpipa_
    @notpipa_ 5 ปีที่แล้ว

    Thanks for the video!
    You should do some codewars exercises for intermediate problem solving video.

  • @VyNguyen-xy3il
    @VyNguyen-xy3il ปีที่แล้ว

    i loveeeee your videos, extremely helpful!!!

  • @Tony_Ruiz95
    @Tony_Ruiz95 2 ปีที่แล้ว

    I appreciate you ! Much Love ✌🏾

  • @Drbhawana77
    @Drbhawana77 4 ปีที่แล้ว

    hello cs dojo
    i appreciate your work a lot!
    i am dr.i never did coding in life and not much good in using my mac with its option!
    i have started learning python as my intrest towards its..
    thank u to make it simple..
    infact extremely easy to learn..
    for now i like to request u to make some short video on
    use of macbook air in general its all option apps with uses!
    hope i will get it soon!
    thank u so much for your efforts!

  • @stefantodorovikj6165
    @stefantodorovikj6165 4 ปีที่แล้ว

    Thanks mate , appreciate it.
    Big Salute

  • @biswaranjanbiswal1806
    @biswaranjanbiswal1806 5 ปีที่แล้ว

    My lord,I am a big fan of ur,I am from India, hopefully make more advanced videos about python.thank u so much.

  • @mymothermylife4033
    @mymothermylife4033 2 ปีที่แล้ว

    Keep it up such a clear explanation 👌

  • @mohammedsohail5224
    @mohammedsohail5224 3 ปีที่แล้ว

    bro you look like Alex from startup, keep the good work!

  • @yergali
    @yergali 5 ปีที่แล้ว

    Well done! Just in case, can you provide as video lesson for kaggle problems? Thanks in advance!

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

    You are so incredible I wish I had time for every video of yours, btw, do you teach online or any other way to guide and motivate us?

  • @kartheekchinthada1733
    @kartheekchinthada1733 3 ปีที่แล้ว

    best experience ever felt.

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

    Another difference between python 2 and 3 is the way of getting input (raw_input vs input) :)

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

    I did so bad on all these I have to rewatch all ur python videos now

  • @shashiparashar1278
    @shashiparashar1278 5 ปีที่แล้ว

    Thanks for lecture..............................

  • @japoneon8915
    @japoneon8915 5 ปีที่แล้ว

    From Argentina.

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

    Awesome! Thank you (:

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

    Hi Yk can you please make more videos of codingbat?
    Because i understand ur explanation better.
    Thank you and best regards Abdul

  • @w.abdalaziz
    @w.abdalaziz 5 ปีที่แล้ว

    You are awesome my friend :).. Thanks a lot ;)

  • @danimallegs1450
    @danimallegs1450 4 ปีที่แล้ว

    thanks good to know about this site...i've tried some others like checkio which are wayyyy too hard

  • @nawaliqbal3358
    @nawaliqbal3358 5 ปีที่แล้ว

    please put a video on the function of static.how static works and he relation between this and static.

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

    Boss you are very brilliant.... Next time more video...

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

    At 12.30
    Is this is correct
    a="abc"
    for i in a:
    print(i*2)

  • @quotesforyou9998
    @quotesforyou9998 2 ปีที่แล้ว

    Best coding teacher 🔥🔥🔥👍👍👍

  • @noopurberge6686
    @noopurberge6686 5 ปีที่แล้ว

    nice video.. I love the way you teach

  • @ashishmishra7214
    @ashishmishra7214 4 ปีที่แล้ว

    Too good resources for beginners✌🏽

  • @gajendrasinghmewada
    @gajendrasinghmewada 5 ปีที่แล้ว

    thanks for the video

  • @love64high56
    @love64high56 4 ปีที่แล้ว

    Thank you 🙏🏼❤️

  • @ririraman7
    @ririraman7 5 ปีที่แล้ว

    Thank you YK.

  • @user-gw2vz5gh2n
    @user-gw2vz5gh2n 10 หลายเดือนก่อน

    thank you very much for introducing me to that website its very helpful

  • @s.m.ehsanulamin7235
    @s.m.ehsanulamin7235 5 ปีที่แล้ว

    Hello Sir,
    can you share the python coding for importing multiple CSV files in mysql from a directory by using python while using ''load infile'' command ?

  • @youneselhachi9221
    @youneselhachi9221 4 ปีที่แล้ว

    #For the last exercise:
    def even_count(nums):
    return len(nums) - sum([x%2 for x in nums])

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

    Please do a video for intermidiate programmers exercise.

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

    could u make a series of r programming...

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

    Thanks for sharing

  • @TechSpot56
    @TechSpot56 5 ปีที่แล้ว

    Sir!
    Can you please make a video on Python libraries for machine learning & platforms to learn machine learning???

    • @kriszenn1125
      @kriszenn1125 3 ปีที่แล้ว

      Do you know calculus and linear algebra?

  • @Unique_remix12
    @Unique_remix12 4 ปีที่แล้ว

    Your explanation is good sir thank you so much

  • @jk3089
    @jk3089 4 ปีที่แล้ว

    So nice of you.