How to DEBUG like a GOD (Python) | Lesson 1 - Zero to Software Engineer Free Coding Bootcamp Reboot!

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

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

  • @LawandAzad-m1v
    @LawandAzad-m1v Год назад +2

    def findmaxnumbers(numbers):
    print(f"calling function findmaxnumber with:{numbers}")
    print("setting currentmax to 0")
    Currentmax = 0
    print("looping through list of numbers")
    for n in numbers:
    print(f"checking the current number: {n} to see if it is greater than {currentmax}")
    if n > Currentmax:
    print(f"updating currentmax to {n}")
    Currentmax = n
    whats wrong with it when i hit run nothing pops up

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

      Please watch the next video, I point out a great debugging trick that will help you find why nothing happens. Or simply rewatch the video where I show you how to use this function.

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

    hey I keep getting this error at example 1 File "main.py", line 2 currentMax = 0
    IndentationError: expected an indented block after function definition on line 1. can someone help? thanks

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

      Please share all of your code or join the discord and share it there

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

    question. should I be following along with the video in replit. And if i didnt really understand what was going on should i keep rewatching until i grasp this content or move on to the next video where it explains this more

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

      Just move on, this video is just teaches you how to debug your code as you progress

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

    great lesson. I've tried to do the code and I ran into an issue where it doesn't loop through all the numbers. Below is my code and it is similar. Not sure why it does not check all 5 numbers:
    print("Lesson 2: Print Statements in Code Dialogue")
    def findMaxNumber(numbers):
    print (f"Calling function findMaxNumber with: {numbers}")
    print ("Setting currentMax to 0")
    currentMax=0
    print(f"Looping through the list of numbers")
    for n in numbers:
    print(f"Checking the current number: {n} to see if it is greater than {currentMax}")
    if n > currentMax:
    print(f"Updating currentMax to {n}")
    currentMax = n
    return currentMax
    print (findMaxNumber([1,2,3,4,5]))

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

    Confused with the
    if n > current max
    It always says indentation error
    Can someone help?

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

      Check your spaces, look very closely at the code

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

    Thank you for the advice bro ! It makes coding more fun and easy 🥳

  • @Kenny-o6i
    @Kenny-o6i 11 месяцев назад +2

    You deserve way more recognition.

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

      Thanks appreciate the kind words ☺️

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

    Where was "looping through the list of numbers"came from...was it "for n in numbers:"

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

      Yes, for n in numbers, is the looping logic. Don't worry if this didn't make sense, we will cover loops in a future lesson. This was just an example to help show the power of debugging

  • @audioboylanre7926
    @audioboylanre7926 11 месяцев назад

    First of all how do you get this page 1 to 9 it's my first day doing practical here

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

    Nice video! Just a little confused as to what the "f" string is used for.

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

      Think of it as a placeholder, fill in the blank kind of sentence structure. This video was made relatively new, but in the next lesson I believe strings will be covered in more detail

  • @txsy-system
    @txsy-system Год назад +1

    Great and Informative video. Time to practice and play alittle inside my code editor🚀

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

    Great Lesson, thanks for the insight on Debugging :)

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

      Hope you learned something new that will help you along your journey :)

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

    It's not running i only get a box what did i do wrong thanks

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

      I'm not sure, you didn't share enough information for me to help :/ maybe the next video in the series would help

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

      Sorry i was able to correct the syntax but still not running console is just blank and can i copy and paste what i did thank you@@CodewithVincent

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

      Drop it in the discord channel. I'm more active there

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

    Awesome Video!

  • @LawandAzad-m1v
    @LawandAzad-m1v Год назад +1

    this aint workin

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

      It works, you didn't copy all of the code

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

      @user-hhif4ur7y, I thought the same, I just didn’t realize I didn’t copy lines 12 and 14, late but hope it helps

  • @VictorEtim-f2w
    @VictorEtim-f2w Год назад

    how to start what is the website i can start from

  • @Marc-yh6dw
    @Marc-yh6dw Год назад

    Hi, I'm just starting to learn coding to get my goal as a Software Engineer. Can I get your discord link?