Lesson 3 - Python Programming (Automate the Boring Stuff with Python)

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024

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

  • @kutekii
    @kutekii 5 ปีที่แล้ว +63

    "Press F5 to run your program"
    *Presses F5 and accidentally refreshes youtube video*

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

      I did same thing...
      When to press is important.

  • @Lorendrawn
    @Lorendrawn 9 หลายเดือนก่อน +4

    Don't worry about being 44 now Al. You're making life worth living for a lot of people with menial data entry jobs!

  • @tcbarrett3rd
    @tcbarrett3rd 6 ปีที่แล้ว +25

    This is the best code tutorial I've ever watched. I love the interactive nature of it. I'm learning way more than I did with codecademy.

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

      Agreed!

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

    Complex, but very clearly explained. A sign of a world class teacher.

  • @seanhub2243
    @seanhub2243 5 ปีที่แล้ว +85

    Chris : "My name is Chris Hansen, please, have a seat"
    "how old are you?"
    Al : "I'm thirt- uhh... 15... yeah..."

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

    I've had the hardest time understanding the equations of things and I absolutely love how you broke it down and replaced it, that made it click in my brain so much more than I've ever found anyone explaining it I couldn't understand! Def gonna subscribe and keep watching thanks 🙏

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

    Al, thank you so much for pulling all this together and giving us free access to it! I’m understanding concepts better the way you deliver and break things down. Best wishes from Canada

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

    By far the best lessons out there! Thank you so much Al!

  • @santoshpokhrel8357
    @santoshpokhrel8357 6 ปีที่แล้ว +6

    i think, u r the best teacher i found on internet to teach python so simply. Appreciated yours effort. :)

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

    Your teaching style is amazing. I have 23 years experience of teaching in academia, so I must admit that your style is a shortcut to success. Wishing your further prosperity.

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

    Hey Al I bought one of your books (Inventing games in python) for my son and he's having a lot of fun with it. I am too! Good work mate.

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

      TadRaunch Thanks! Feel free to post questions at www.reddit.com/r/inventwithpython

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

    I read quite a good bit of your book before watching these videos. Hearing you explain it and watching along is very helpful. Thanks for making all of this content.

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

      # This program saya hello and asks for my name
      print("hello world")
      print("what is your name?") # ask for their name
      myname = input()
      print("is good to meeet u, " + myname)
      print("the length of your name is:")
      print(len(myName))
      print("what is your age?") # ask for there age
      myAge = input()
      print ( "You will be " + str(int(myAge) + 1) " in a year.")

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

    The Udemy course is really really really great! I appreciate that you made these videos and most of all I like your principle of making it available for free on online reading. I was once an aspiring programmer in my college days but was unable to continue doing it for years and now I'm back and choose python language to be my primary coding language. I can see how powerful this is.
    A huge thank you for these videos, books and your time pouring in this knowledge and wisdom about python and coding.
    God Bless.

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

    I think that it's wonderful that you still respond to questions. A lot don't, so keep up good work, I plan on buying a few of your books.

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

    I'm enjoying the tutorials, Al. Thanks and good job!

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

    Thank You much Al. I sincerely appreciate what you're doing. I'm new to programming so I have no idea what I'm doing but I like the way you're teaching so far. bless you!

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

    Thank you for the book and these videos

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

    you are an amazing teacher im 13 (dont make fun of me) and im really into computer science and you are being such a big help to me thank you so much

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

      Why do you say "dont make fun of me"? You think you are the only/one of few person(s) 13 or under that is learning programming lol?

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

      The earlier the better. Find a problem and solve it =)

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

    This is an *excellent* course. Very well thought out, thank you.

  • @ShinyTheSyncopator
    @ShinyTheSyncopator 10 หลายเดือนก่อน

    Thank you for this Al - your teaching method is very good. It's very easy to take clear, well organized notes from your lessons and the pace and progression are perfect. Cheers.

  • @kemmybelleuwu
    @kemmybelleuwu 2 หลายเดือนก่อน

    im trying to learn programming as a skill thank u for making this learn experience not overwhelming!

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

    I am learning so much with your video. Thank you. I only still a bit confused with the string thing, the float and int I have understood pretty well. Looking forward to the next tutorial.

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

    I used this to make my own weight converter from kilograms to pounds :)
    print("Hello there Sir/Madam.")
    print("What is your name?")
    myName = input()
    print("Hi " + myName + ", please tell me how much you weigh in Kg so I can convert it to Pounds.")
    myWeight = input()
    print("I will now convert your weight into pounds")
    print ("Your weight is " + str(float(myWeight)*2.25)+ " in Pounds.")
    #Made on the 5th of March 2019 by A.M

  • @dineshsharma-yy4xz
    @dineshsharma-yy4xz 8 ปีที่แล้ว +3

    Just read your book(Automate the boring stuff with python) and really enjoyed. You are doing a great job here. Finally I found what I had been looking for, since long time to learn Python. This is my last year of M.Sc in Computer Science, I am passionate about Cyber Security. That's why I am learning this course, but there's lot left to learn. Do you have any suggestions or recommendations?...Keep doing great work!!

  • @erikslapins9227
    @erikslapins9227 5 ปีที่แล้ว +7

    "Your finger is called "The execution"". That's metal.

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

    Thank you Al Sweigart, for this great presentation.

  • @Josh0238
    @Josh0238 8 ปีที่แล้ว +66

    26 yea lol :p

  • @Sara-ey7or
    @Sara-ey7or 6 ปีที่แล้ว +1

    I did everything like you did yourself but i get a 'invalid syntax' error for literally nothing. I'm about to set my computer on fire. please someone help

  • @tonyparka78
    @tonyparka78 8 ปีที่แล้ว

    BEST PYTHON TUTORIALS SO FAR !!!!

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

    Hi, you don't need to write separate statement to enter data from keyboard. like
    print(" What's your name ?"
    name=input()
    this is not pythonic. You can write one single statement like name=input('What's your name ? ')

    • @filmanimephilosophers6801
      @filmanimephilosophers6801 8 ปีที่แล้ว

      You're right

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

      And if you still want it on a new line you can just type myName = input('What is your name?
      ')

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

    Excellent video! thank you! Your video makes it so much easier to learn the book, thank you.

  • @cruz4932
    @cruz4932 7 ปีที่แล้ว +14

    Look what I made :3 print("Hello who may I say I'm speaking with?")
    text = input()
    if text == "AmberAge21" :
    print("Welcome Amber!")
    print("Do you need me to post something")
    print("Do you need me to calculate any numbers for you?")
    text2 = input()
    if text2 == "Can you post something on my facebook?" :
    print("Sure thing what do you need me to post?")

    • @prathammalhotra8437
      @prathammalhotra8437 6 ปีที่แล้ว

      It will not work as you are working with 'if' then you need to give it two conditions

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

      you don't have to but 'else:' could be used to run different code when 'text' doesn't equal 'AmberAge21'. using the original code the program will end when 'AmberAge21' isn't entered.

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

    Great video, thank you Sir. Wonder if anyone else had the same issue running the code, since I downloaded the online interpreter version in Python 3, in which "input" behaves like Python 2's "raw_input" to which I had to use to make it work. I finally got it though

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

    I added one more line to count the characters of myName.
    print ('Hello World!')
    print ('What is your name?')
    myName = input ()
    print ('Your name is ' + str(len(myName)) + ' characters long')
    print ('what is your age')
    myAge = input()
    print ('You will be ' + str(int(myAge)+ 1 ) + ' in a year')

  • @HeartzHugzKissez
    @HeartzHugzKissez 7 ปีที่แล้ว +5

    Thanks for the amazing, easy-to-follow demonstrations! I just have a few questions... Did you go to school to become a programmer? What are the odds of becoming a software engineer/programmer without a degree?

    • @jakewfurlong
      @jakewfurlong 5 ปีที่แล้ว +24

      Very good. Most of the people I work with don't have a degree. Learn the code, acquire the skills, get some experience and you're off! As for the experience part, you can always create apps or scripts in AWS or GCP and post them in Github or TH-cam to build a resume unti you get work experience. In fact, I put my resume online using a serverless architecture to prove I knew how to use serverless architecture and it worked perfectly. I converted the resume to a QR code and when people asked me for my resume and I showed them the QR code, they asked what it did and I was able to explain it to them. Most of them didn't even need the resume after that.

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

      @@jakewfurlong This is seriously the coolest method I've read/seen for standing out in the crowd, and I've been a tech recruiter for almost 6 years now. Mind if I pass this insight along to folks I meet?

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

      @@jakewfurlong shit I am copying it thanks

  • @tushar12345
    @tushar12345 7 ปีที่แล้ว +4

    does it work on python 2.7.13?
    it says:
    Hello world!
    What is your name?
    Tushar
    Traceback (most recent call last):
    File "C:/Users/Tushar/Desktop/hello.py", line 5, in
    myName = input()
    File "", line 1, in
    NameError: name 'Tushar' is not defined
    >>>
    does the function input() work on python 2.7? or not?
    UPDATE: I fixed it with the function raw_input() instead of input()...
    why does this happen? anyone...

    • @belindamydogsteppedonabee2445
      @belindamydogsteppedonabee2445 6 ปีที่แล้ว

      Tushar Punjabi different versions have different syntax.

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

      He is using python 3.x.x
      You are using 2.x.x
      In the first video and also on the book he mentions that you should be using python version 3.x.x in order to follow these tutorials.
      Each version has different syntaxes

  • @IQ88612
    @IQ88612 9 หลายเดือนก่อน

    Hi, I like the HTML presentation that you made can you make a simple video showing that please?

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

    Great job Al!

  • @ScreenPrintR
    @ScreenPrintR 6 ปีที่แล้ว

    Python is really sensitive. I indented myName and myAge and it prompted me for a invalid indent. Also added a Print (capital P) for print and I got a NameError Print '. I changed the capital P for lowercase an it worked. Nice. Always feels better when it works.

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

    ah, I like your sense of humor.

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

    Hey that was cool!!
    Can I know how can we create our own flow in internet in the html link as u did?

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

    whenever ur dealing with numbers do you always have to put str(int('then the number')?

  • @path6641
    @path6641 4 หลายเดือนก่อน

    I'd really like to know what program is being run at 8:23 to break down functional priority. I know this video is 8 years old but "Alms for the noobs" would be appreciated. It seems invaluable to me.
    Either way, fantastic series so far. I bought the book and it's great! Thanks

  • @swenyko5863
    @swenyko5863 7 ปีที่แล้ว

    I try to put myAge value to 11.4, but it is not work, why
    and show below
    ValueError: invalid literal for int() with base 10: '11.4'

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

    Love your sense of humour Al. haha 26 years old :)

  • @israelrogeriopereiradetole9148
    @israelrogeriopereiradetole9148 7 ปีที่แล้ว +4

    Bom dia, sou brasileiro e estou entendendo muito bem suas aulas, na verdade estou iniciando em Python justamente com suas aulas.... Não falo Inglês, mas o tradutor tem me ajuda muito... Obrigado e continue disseminando conhecimento pelo mundo, e um dia vou estar perto do seu nível de conhecimento e com a graça de Deus, vou poder ensinar as crianças pobres do meu país......

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

    Hello my names Thomas Wozniak this was a great video taught me a good amount

  • @Wilson-br5fq
    @Wilson-br5fq 6 ปีที่แล้ว

    can I code python on atom? but when I try to run the code it cannot be run and gave error code
    'python' is not recognized as an internal or external command,
    operable program or batch file.
    [Finished in 0.081s]

  • @Mr.deez62
    @Mr.deez62 7 ปีที่แล้ว

    i keep getting error code invalid syntax i tried using == instead of = just to see if that works but same error
    # this program says hello and ask for my name
    print('hello world')
    print('what is your name?')
    myname = input()
    print('it is good to meet you, ' + myname)
    print('the lenghth of your name is:')
    print(len(myname))
    print('what is your age')
    myage = input()
    print('you will be' + str(int(myage) + 1 'in a year.')

    • @tejhandiallo2768
      @tejhandiallo2768 7 ปีที่แล้ว

      On the last line where it says
      print('you will be' + str(int(myage) + 1 'in a year.')
      You have an integer in the parentheses and you just put the string beside it, you need to add them, and convert the myage variable to a string first.
      Try changing your last line to:
      print("You will be" + (str(int(myage + 1)) + "in a year"))
      Ps: You might have figured this out already lol

  • @geraldleesesideburnsg3382
    @geraldleesesideburnsg3382 7 ปีที่แล้ว

    Great videos! I tried reading off your website but couldn't focus due to eye strain, had to buy the paperback on amazon thanks m8 keep it up :)

  • @mateoichijo3408
    @mateoichijo3408 7 ปีที่แล้ว

    This is the greatest tutorial of python!!!

  • @lenitux5582
    @lenitux5582 6 ปีที่แล้ว

    Need help it says error syntax. Here is my code:
    print('Hello world')
    print('What is your name?')
    myName = input
    print('It is good to meet you' + myName)
    print('The length of your name is: ')
    print(len(myName))
    print('What is your age?') #asks for my age
    myAge = input
    print('You will be ' str(int(myAge) + 1) + ' in a year.'
    It appears that there's an error in str. Any suggestions would be appreciated

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

      Change to...
      myName = input()
      myAge = input()
      you are missing the parantheses.

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

    I followed along my didn’t save and I don’t know how to make a blank space to go to the line after next

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

    Damn... python syntax violates all my programming knowledge I always expect the semicolon at the end...

  • @mohamedaneizi3769
    @mohamedaneizi3769 7 ปีที่แล้ว

    In Sublime text 3, it only shows myName 's result, but doesn't show myAge or any other variables, please help ;(

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

    Is it necessary in that particular program to do str(int(age))? Couldn't you just use the input itsself? Worked for me. Good video! Really enjoying these.

  • @pradeepsssss
    @pradeepsssss 7 ปีที่แล้ว

    I'm getting Invalid syntax error. Unable to figure out what's wrong. Please help. Ty.
    print('Hello world!')
    print('What is your name?')
    myName = input()
    print('It is good to meet you, ' + myName)
    print('The length of your name is:')
    print(len(myName))
    print('What is your age?')
    myAge = input()
    print('You will be '+(str(int(myAge + 1)) ' in a year.'))

    • @twiks3905
      @twiks3905 7 ปีที่แล้ว

      Missing a ) in last line

  • @XandorSi
    @XandorSi 8 ปีที่แล้ว

    Beginner question over here. How do you make that helpful yellow box come out that displays what you're supposed to type in between the parenthesis. When I was trying to type those lines out it would sometimes appear and sometimes it doesn't. How do you make python display the yellow box all the time?
    Im using windows 10, python 3.5 if it helps

  • @jeff4877
    @jeff4877 7 ปีที่แล้ว

    what if you want to start the execution somewhere else? Or want to pick which lines one want to run first. So instead of reading lines 1, 2, 3, 4, 5 it would read lines 3, 1, 2, 4, 5.

  • @niueanlaho
    @niueanlaho 6 ปีที่แล้ว

    1:51 after in a year.') i get a invalid syntax error ......
    print ('You will be ' 'next year' + str(int(myAge) + 1)) and when i ran it in idle it worked? for some strange reason the the string 'in a year.') was the invalid syntax error.....

  • @Seikenguy
    @Seikenguy 6 ปีที่แล้ว

    Is there a way for the program to keep asking input (age) until it's an integer? Something like if the user input is an integer, it goes on to the last line everything's fine, but if it's a written word, like "twenty" is asks the user to type a number, and if the user then types a non-integer, like "20.5" it asks them to type in a whole number.
    I could only do it this way, having to allow for non-integer numbers, but I'd like to know if it's possible to do the way I said above:
    print('Hello world!')
    print('What is your name?') # ask for their name
    myName = input()
    print('It is good to meet you, ' + myName)
    if len(myName) < 10:
    print('The length of your name is ' + str(len(myName)) + '.')
    else:
    print('The length of your name is TOO DAMN LONG')
    print('What is your age?') # ask for their age
    myAge = input()
    while True: # make sure they type in a number
    try:
    myAge = float(myAge)
    break
    except ValueError:
    print('Please, type a number.')
    myAge = input()
    print('You will be ' + str(float(myAge) + 1) + ' in a year.')

  • @santoshpaul6443
    @santoshpaul6443 7 ปีที่แล้ว

    print('hello world')
    name= input('what is your name??')print('nice to meet you ,'+ name)
    print ('the length of you name is:')
    print(len(name))
    age =int(input('how old are you??'))print( 'you will be',(age+1), 'in a year')

  • @richardwinters7839
    @richardwinters7839 7 ปีที่แล้ว

    wow,thanks a lot ,your lesson is quite easy to understand.

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

    >>> print('spam')
    spam
    >>> print(spam)
    3
    please explain !

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

      print('spam') prints the STRING 'spam', in this case the word "spam".
      print(spam) prints the value associated with the VARIABLE "spam", in this case the number 3.
      Hope that helps!

  • @emmaliu5329
    @emmaliu5329 6 ปีที่แล้ว

    Hi ! I just want to say thank you! I really like your video about python!! easy to understand!!

  • @catleysama
    @catleysama 9 ปีที่แล้ว

    Dude Thank You So Much!!!!! I Will Read Your Books Aswell!! My Brother Got Me Into This!

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

    Thank you very much, You really helped me understand this a lot better because I was completely lost haha.

  • @rrvh93
    @rrvh93 9 ปีที่แล้ว

    On my IDLE interface it will only accept my name if i type it as a string. So i have to type 'Richard' and cant just type Richard with no quotes. Any reason why?

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

      +Richard Van Horne You are using Python 2 instead of Python 3. On Python 2, input() does something slightly different. You can have multiple versions of Python isntalled at the same time, it's fine. If you continue to use Python 2, you'll have to use raw_input() instead.

  • @prettyfuncomputing
    @prettyfuncomputing 9 ปีที่แล้ว

    Doing useful things right away--great idea! Nice videos, too.

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

    Hello - i followed exactly what you did, but when i pressed 'Run', i got the following message 'invalid synatx'. This related to third line: myName = input ()

  • @weuvos1412
    @weuvos1412 7 ปีที่แล้ว

    Where do I find IDLE? Nowhere in the python folder i have is there anything that says IDLE. There's python.exe and a pythonw.exe that doesnt work, but when I pull up python.exe I'm getting something completely different than what you're showing

  • @Deathly66
    @Deathly66 7 ปีที่แล้ว

    I made a program where it's like talking to a person just by using this
    Kitchen = 'Where the food is!' and so on and so on!

  • @jeirs4231
    @jeirs4231 8 ปีที่แล้ว

    thank you for the videos ,I just started learning Python

    • @josh27ofto
      @josh27ofto 8 ปีที่แล้ว

      You should really make a codecademy (free) account. It's a great resource for beginners. It even has a forum

  • @shouryadubey1117
    @shouryadubey1117 7 ปีที่แล้ว

    In the line of 'len' ,when i m trying to add something after it, it is not working.Why?

  • @michaelrubin9964
    @michaelrubin9964 9 ปีที่แล้ว

    You are amazing !!!!!!!!!! I was jumping up and down !!!

  • @ez_mod
    @ez_mod 7 ปีที่แล้ว

    now am getting it

  • @pwrovr9k731
    @pwrovr9k731 7 ปีที่แล้ว

    DUDE already love doing it but I will continue on your vid tommorow

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

    So why do you have to convert numbers?
    Is it because Python will treat it like a word if its in ()?

  • @pabitrabhattarai4893
    @pabitrabhattarai4893 7 ปีที่แล้ว

    Please help me:
    My problem is i wrote the program which looks like this:
    # This program says hello and asks for my name
    print('Hello world!')
    print('What is your name?') # ask for their name
    myName = input()
    print('It is good to meet you, ' + myName)
    print('The length of your name is:')
    print(len(myName))
    print('What is your age?') # ask for their age
    myAge = input()
    print('You will be ' + str(int(myAge) + 1) + ' in a year.')
    and when I ran the program, I encountered this error:
    Hello world!
    What is your name?
    Pabitra
    Traceback (most recent call last):
    File "/Users/Leela/Desktop/HelloYourName.py", line 5, in
    myName = input()
    File "", line 1, in
    NameError: name 'Pabitra' is not defined
    >>>
    If anybody could help me that would be great. It is simple issues like this that discourage me from learning to code.

    • @mrakasuryakusuma551
      @mrakasuryakusuma551 6 ปีที่แล้ว

      print('Hello world!')
      print('What is your name?') # ask for their name
      myName = input()
      print('It is good to meet you, ' + myName)
      print('The length of your name is:')
      print(len(myName))
      print('What is your age?') # ask for their age
      myAge = input()
      print('You will be ' + str(int(myAge) + 1) + ' in a year.')
      and when I ran the program, I encountered this error:
      Hello world!
      What is your name?
      Pabitra
      Traceback (most recent call last):
      File "/Users/Leela/Desktop/HelloYourName.py", line 5, in
      myName = input()
      File "", line 1, in
      NameError: name 'Pabitra' is not defined
      >>>
      are you sure you are using Python 3?

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

      go to cmd and type the word 'python' and see what version you have. If you are on 2.7 then you need to use raw_input() instead of input()

  • @unlike_common9425
    @unlike_common9425 6 ปีที่แล้ว

    this piece of code doesn't work with Ubuntu:
    hello world!
    what is your name?
    Traceback (most recent call last):
    File "hoi.py", line 5, in
    myName = imput ()
    NameERROR: name 'imput' is not defined
    I don't understand, please somebody help

    • @ob3mk29a9
      @ob3mk29a9 6 ปีที่แล้ว

      First of all, you have to read and type very carefully. Its iNput not iMput (without capitals obviously. It's just to highlight what is wrong). And if that doesn't work then type raw_input()

    • @sebastianwyszynski9592
      @sebastianwyszynski9592 6 ปีที่แล้ว

      you misspelled 'input' - in your code it says 'imput' instead. Python does not understand the function.

  • @masteringthunder2861
    @masteringthunder2861 6 ปีที่แล้ว

    What about import? Please help by giving me answers thank you

  • @bashubiswas4495
    @bashubiswas4495 7 ปีที่แล้ว

    Hi, I'm new at learning python or any programming language, please help me with this. When I code this=
    print('Hello World!')
    print('What is your name?')
    myName=input()
    prrint('It is good to meet you, ' +myName)
    Gives this result=
    Hello World!
    What is your name?
    Bashu
    Traceback (most recent call last):
    File "C:/Python27/Test3.py", line 3, in
    myName=input()
    File "", line 1, in
    NameError: name 'Bashu' is not defined
    >>>
    What did I do wrong?

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

      prrint('It is good to meet you, ' +myName) #typo in print

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

      Thank you.

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

      Don Juan *print not prrint

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

      Shiyon Perera Thank you too.

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

    So for some reason no matter which editor I use, it only runs the code up print('What is your name?')
    It doesn't print or run the rest of the code. Can anybody help me with this because I'm so confused at lack of error message.

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

      Could you show me what you have typed in the file?

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

      @@wissejong I appreciate the response, I figured it out though. It was an input command I had to enter my name for the rest of the code to appear. Thanks for the reply though!

  • @Ana-vs2pw
    @Ana-vs2pw 2 ปีที่แล้ว

    Hello, i don't have the "run" on my python IDLE. I looked up for a solution online but i don't know how to fix the problem. Help !!!!
    PS : Thank you for your great videos !!

    • @leaht-pu1tm
      @leaht-pu1tm 2 ปีที่แล้ว

      In idle there isn't a run, when he wrote this code he went to File>New File which creates a new file, Go back to the beginning at 0:04 and follow the steps from there and you should be set.

  • @KOUSTAVGUHA
    @KOUSTAVGUHA 8 ปีที่แล้ว

    Nice video. Cleared my doubts. But can you please give the html files where you were showing the steps!! Please?

  • @dmging
    @dmging 7 ปีที่แล้ว

    Thanks for this Al.

  • @maogr
    @maogr 6 ปีที่แล้ว

    For the same example If I use Python 2.7.10, i get:
    Traceback (most recent call last):
    File "1.py", line 4, in
    myName = input()
    File "", line 1, in
    NameError: name 'mao' is not defined
    If I use Python 3.6.5 it works.
    Any ideas?

    • @Kharaen
      @Kharaen 6 ปีที่แล้ว

      I think in Python 2, you need to use raw_input() instead of input().

  • @qaisee
    @qaisee 8 ปีที่แล้ว

    Can I follow along on my chromebook??? In other words, since I am unable to download python 3.5 on the laptop, is there a cloud alternative that I can follow along your outstanding lectures????

  • @weiyiding286
    @weiyiding286 8 ปีที่แล้ว

    Great lesson! Better to have practices with it.

  • @waltersenglish5778
    @waltersenglish5778 6 ปีที่แล้ว

    great videos, however the on-screen links are pretty annoying and could easily be left in the description.

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

    Great job! Thanks to you for your amazing skill.

  • @semeradstephan
    @semeradstephan 8 ปีที่แล้ว

    Please help... I am entering the exact things... and its giving me the following:
    Traceback (most recent call last):
    File "", line 1, in
    Myname = input()
    File "", line 1, in
    NameError: name 'Stephan' is not defined

    • @stellarwinda
      @stellarwinda 8 ปีที่แล้ว

      +Stephan Semerad You are most likely using python2, not python3 like in the video.
      You'd probably want to install python3 or you'll end up with many of this small changes from python 2 to 3.
      Even 22/7 result would be different.

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

    thanks for the help!

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

    Gonna keep watching this series but my first question is: so you have this code that asks questions, what do you do with the code to make others use it? Offhand I'm kinda thinking you add it to a website code to display it, but on the other hand I'm imagining the code to be able to be sent where ever and it be automated. Kinda like texting this code to someone and having their responses cause replies - which seems unlikely.
    But yeah, where do you put the code and when you have lots of codes written how do you make them execute / or copy them to whatever.

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

      The easiest way is to get a free GitHub account and learn how to use git to post it there. It's great because GitHub also has several nice features like bug tracking and a wiki and code review, so it's easy for others to contribute changes to your code. (You can decide whether you accept them or not.)

    • @ram42
      @ram42 6 ปีที่แล้ว

      Blank Editor cab you use github as part of resume? I was thinking of learning to use it and save projects I do there.. im new so I'm thinking of simple games tutorials

  • @harrisonmugo3008
    @harrisonmugo3008 8 ปีที่แล้ว

    Mine didn't run, what could be the problem
    1 # This program says hello and asks for my name.
    2 print('Hello world!')
    print('What is your name?') # ask for their name
    3 myName = input()
    4 print('It is good to meet you, ' + myName)
    5 print('The length of your name is:')
    print(len(myName))
    6 print('What is your age?') # ask for their age
    myAge = input()
    print('You will be ' + str(int(myAge) + 1) + ' in a year.')

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

      +Harry Mogs you dont write numbers before the functions, just delete the 1,2,3,,4,5,6, and it will work

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

    hello, when i run the code it shows me this error: invalid synthax, maybe you forgot a comma? but i did it the same as the video, is it because of the python version?

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

      I get the same error message.
      Python 3.11.8 64 bit on Windows 10 on a 10 year old laptop (Intel Core i5-4200 CPU.)

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

      I noticed that the windows installer .exe file Python (3.11.8) contained AMD64 in the name, so un-installed it & loaded the 32 bit Windows installer. Same error message.

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

      I went to Bing & pasted in the code, & it suggested alternate syntax.
      Using a comma ( , ) in place of the plus sign ( + ) .
      That code ran without the syntax error message. And displayed properly on the screen.
      Through more trial & error, I was able to get the original syntax to work. I am not dyslexic, but I have a hatd time seeing typos...

  • @ehudnold9
    @ehudnold9 7 ปีที่แล้ว

    hey its write Traceback (most recent call last):
    File "C:/Python27/hellop.py", line 5, in
    myname = input()
    File "", line 1, in
    NameError: name 'al
    ' is not defined

  • @echnaton4989
    @echnaton4989 6 ปีที่แล้ว

    Hi, I use Anaconda and Spyder for using Python. I'm used to C++ and using Spyder is a pain in the ass... Can I change settings, or do you recommend to use the same settup you do?
    Thanks

  • @GeniusSays
    @GeniusSays 6 ปีที่แล้ว

    This is really good man,
    Thank you so much

  • @mileslee4266
    @mileslee4266 7 ปีที่แล้ว

    I am new to python and have done a little bit of code academy and watched these videos up to lesson 3. I was just messing around with what I have learned and I was trying to write a program where it asks for your favorite color and then depending on what you input, It has a different answer.
    Was wondering if anyone could help me out with this, I'm new to this so it's probably something obvious, thanks :)
    # The program says hello and asks what favorite color is
    print('Type in lower case letters or AI may not function properly')
    print('Hello there!')
    print('What is your favorite color?') # Asks what favorite color is
    myColor = input()
    if myColor = blue
    then print('That is my favorite color too!') # Response
    else print('I guess we do not have the same taste.')

    • @mileslee4266
      @mileslee4266 7 ปีที่แล้ว

      Never mind, I fixed it.
      # The program says hello and asks what favorite color is
      print('Type in lower case letters or AI may not function properly')
      print('Hello there!')
      print('What is your favorite color?') # Asks what favorite color is
      myColor = input()
      if myColor == "blue":
      print('That is my favorite color too!') # Response
      elif input() != "blue":
      print('I guess we do not have the same taste.')