Python 3 Programming Tutorial – Getting user input




In this video, we cover how to get user input. For a simple text-based GUI (graphical user interface), it can sometimes be useful to allow for a user to enter some input into the program while it runs. Using Python 3’s “input” function, we can do that.

Sample code for this basics series:

Python 3 Programming tutorial Playlist:

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6

source

47 thoughts on “Python 3 Programming Tutorial – Getting user input”

  1. I don't get it, I type
    >>>x = input('kunt ')
    kunt # asks to write here, no abilty to write print(x) as its shown everywhere on the net

  2. i love you! sentdex! you rock! best teacher ever! 1 week watching your tutorials, i learned so much! i keep making my own and your tutorials really help they really do 🙂

  3. hoursworked = int(input("Enter hours worked: "))

    rate = 25.00
    if hoursworked > 40:
    grosspay = ( 40 * rate) + ((hoursworked – 40) * (rate * 1.5))
    if hoursworksed <= 40:
    grosspay = hoursworked * rate
    print = ("gtoss pay: " + str( grosspay))

    HELP ME BRO.THANK

  4. in the above given example we can only print the input from the user………can we manipulate using the input we get from the user……?

  5. texts=input("Input the text")
    This command shoots up the error given below (in Python 3.6)
    TypeError: 'NoneType' object is not callable
    Any idea why is this happening? Am I missing importing any module?
    Solving this'd be of great help as my entire program gets stuck here because of this trivial error.
    Thanks

  6. Sir I feel dumb coz I'm still not getting it. What is a user? Please y'all don't mock me. I'm just a beginner with no previous computer experience. Somebody please help explain this.

  7. Is this accepts a string type variable beacuse when i accept two digit and add them it is the concatenation of the two difits

  8. Great video thanks, I'm just starting to learn python but when I run this I am using the IDLE app new file, in python 2.7 I got the error name not defined what am I doing wrong. can anyone help please.

  9. hey thanks for the video 🙂 im a beginner to python coding so not really sure of this. is it possible to get two words as an input? for example – Hello World? with the space?

  10. hi, i have this question. I have python 3, but when i want to put in the user input, i can't use input(). Instead, i have to use raw_input(). Any reason why?

  11. I wonder why you don't need quotes when you type your name but I do? I really wish Python would stop changing every 5 minutes. I spent an hour trying to figure that out until I read one of these posts that told me to use quotes thanks Mnkn Ricky

  12. x = input("Please enter number ")
    if (x == 10):
    print("Number is 10")
    else:
    print("number is not 10")

    I enter 10 and I get "number is not 10" what did I do wrong?

  13. Hey I am new to programming I need to create a program using Python 3 it’s similar to the program we use Phanon but I need to have user input to help me figure the volume and surface area of a cuboid can u help me with this it needs to be able to accept floats or decimal numbers

  14. Starting with Python 3. Could anyone guide me run an input number say 10 and print it in Python 3 should I go like a=int(input(10)) and then how should I print it.

  15. Hello sir….I'm dining the same thing on my terminal but its not gone happening…. It throw some error like I enter name like Bella but its says name 'bella' is not defined …..plzz help me

  16. I'm having trouble with the question not beginning after the input for example
    X=("what is your name? ") but the question is starting at the start at where what is

  17. Thanks this helped a lot! I'm just getting started with python and this is a very basic command that can be very useful!

  18. Great job you are doing! pls can you help me out with this "Write a program which repeatedly reads numbers until the

    user enters “done”. Once “done” is entered, print out the total, count,

    and average of the numbers. If the user enters anything other than a

    number, detect their mistake using try and except and print an error

    message and skip to the next number."

    kindly do me a mail via "lukefreeme@gmail.com"

Leave a Reply