Learn Python • #10 User Input • 4 Ways To Get Input From Your User

Поделиться
HTML-код
  • Опубликовано: 25 июн 2024
  • If you want users to interact with your Python app, you'll need some way to get their input.
    In this video, you'll learn 4 different ways your Python app can get input from the outside world - directly from the terminal, from a command line, from a file on your computer, and over the internet.
    This video is part of a beginner tutorial series for anyone who wants to learn Python from scratch, and get to a point where you can start coding your own projects.
    🔗 Project Code (GitHub): github.com/pixegami/python-fo...
    🔗 Full Playlist: • Python For Beginners (...
    🔗 Next Chapter: Coming Soon!
    👉 Follow me on Twitter: @pixegami
    📚 Chapters
    00:00 - Different Ways to Get User Input
    02:24 - Using the input() Function
    05:25 - Getting CLI Input
    08:20 - Reading and Writing from Files
    11:35 - Rest APIs (Talking To Other Apps)
    14:20 - Coding Exercise: User Input

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

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

    Your lessons are just excellent contetnwise and teachingwise. 10/10 man. Bring us more soon please. Prayers for you.

    • @pixegami
      @pixegami  10 месяцев назад

      Thanks :) I do plan to do more tutorials and videos like this so please stay tuned!

  • @neroetal
    @neroetal 3 месяца назад

    user_name = input("Enter a name: ")
    #the above is always a string
    # to input a number wrap it into an int
    principle_amount = int(input("Enter the principle amount: "))
    interest_rate = float(input("Enter the interest rate: "))
    investment_period = int(input("Enter the period of investment: "))
    amount=principle_amount * (1+ interest_rate)** investment_period
    print(f"Hi {user_name} the amount invested over {investment_period} will be {amount}")
    excellent easy to learn

  • @neroetal
    @neroetal 3 месяца назад

    you just landed us into some complex stuff without introduction : import lol

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

    🎉wow tremendous experiences and after completed for python courses and can you please start on playwright from scratch ?

  • @neroetal
    @neroetal 3 месяца назад

    user_name = input("What is your prefered User name? ")
    age =input("What is your age: ")
    with open("user_info.txt", "w") as f:
    f.write(f"Your user name is {user_name.capitalize()} and age {age}")