WP Tutorials

Python for Beginners – Full Course [Programming Tutorial]

Python for Beginners – Full Course [Programming Tutorial]

Python for Beginners – Full Course [Programming Tutorial]



Learn the Python programming language in this full course for beginners! You will learn the fundamentals of Python and code two Python programs line-by-line. No previous programming experience is necessary before watching this course.

🔗 Start using Replit: https://join.replit.com/python-students

✏️ Beau Carnes developed this course. Check out one of his other channels: https://youtube.com/beau

💻 Rock, Paper, Scissors Code: https://replit.com/@BeauCarnes/rps-python
💻 Blackjack Code: https://replit.com/@BeauCarnes/blackjack-python

🏗 Replit provided a grant that made this course possible.

🔗 The Python Handbook by Flavio Copes: https://www.freecodecamp.org/news/the-python-handbook/

⭐️ Course Contents ⭐️
⌨️ (0:00:00) Introduction

Rock, Paper, Scissors Intro Project
⌨️ (0:03:11) RPS – Variables and Functions
⌨️ (0:09:07) RPS – Calling Functions
⌨️ (0:12:31) RPS – Dictionaries
⌨️ (0:15:28) RPS – User Input
⌨️ (0:16:55) RPS – Libraries, Lists, Methods
⌨️ (0:20:45) RPS – Function Arguments
⌨️ (0:22:33) RPS – If Statements
⌨️ (0:25:40) RPS – Concatenating Strings
⌨️ (0:27:13) RPS – f-strings
⌨️ (0:30:26) RPS – Else and Elif Statements
⌨️ (0:33:37) RPS – Refactoring and Nested If
⌨️ (0:38:37) RPS – Accessing Dictionary Values
⌨️ (0:41:55) RPS – Testing Game

Fundamentals of Python
⌨️ (0:43:52) Setup Python Locally
⌨️ (0:47:47) Creating New Repl
⌨️ (0:48:45) Variables
⌨️ (0:51:21) Expressions and Statements
⌨️ (0:52:38) Comments
⌨️ (0:54:23) Data Types
⌨️ (1:00:16) Operators
⌨️ (1:00:44) Arithmetic Operators
⌨️ (1:03:52) Comparison Operators
⌨️ (1:05:13) Boolean Operators
⌨️ (1:07:26) Bitwise Operators
⌨️ (1:07:42) is & in Operators
⌨️ (1:08:21) Ternary Operator
⌨️ (1:09:40) Strings
⌨️ (1:12:36) String Methods
⌨️ (1:16:41) Escaping Characters
⌨️ (1:19:23) String Characters & Slicing
⌨️ (1:21:45) Booleans
⌨️ (1:26:07) Number Data Types
⌨️ (1:28:19) Built-in Functions
⌨️ (1:29:50) Enums
⌨️ (1:32:51) User Input
⌨️ (1:34:39) Control Statements
⌨️ (1:36:48) Lists
⌨️ (1:46:21) Sorting Lists
⌨️ (1:49:57) Tuples
⌨️ (1:53:49) Dictionaries
⌨️ (2:01:45) Sets
⌨️ (2:06:10) Functions
⌨️ (2:16:57) Variable Scope
⌨️ (2:18:35) Nested Functions
⌨️ (2:21:37) Closures
⌨️ (2:22:59) Objects
⌨️ (2:26:27) Loops
⌨️ (2:32:01) Break and Continue
⌨️ (2:33:02) Classes
⌨️ (2:39:12) Modules
⌨️ (2:45:55) Arguments from Command Line
⌨️ (2:52:42) Lambda Functions
⌨️ (2:54:51) Map, Filter, Reduce
⌨️ (3:02:41) Recursion
⌨️ (3:04:42) Decorators
⌨️ (3:06:45) Docstrings
⌨️ (3:09:54) Annotations
⌨️ (3:11:30) Exceptions
⌨️ (3:17:09) With
⌨️ (3:18:26) Installing Packages with pip
⌨️ (3:21:39) List Compression
⌨️ (3:23:09) Polymorphism
⌨️ (3:24:23) Operator Overloading

Blackjack Card Game Project
⌨️ (3:26:58) Blackjack – Beginning
⌨️ (3:50:13) Blackjack – Deck Class
⌨️ (3:58:45) Blackjack – Card Class
⌨️ (4:03:25) Blackjack – Hand Class
⌨️ (4:21:13) Blackjack – Game Class
⌨️ (4:37:04) Blackjack – Testing

⌨️ (4:39:36) Conclusion

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://freecodecamp.org/news

source

Comments (42)

  1. If you just want a summary, learn all Python syntax in 25 minutes: https://youtu.be/PNSIWjWAA7o

  2. Python is a versatile language used in various fields like web development, data analysis, and machine learning.

    – Python is popular for shell scripting, task automation, and web development while also being preferred for data analysis and machine learning.

    – It can also be used for creating games, working with embedded devices, and offers a wide range of applications.

    Setting up Python environment in Replit

    – Replit allows creating and selecting various programming languages, but we focus on Python for this tutorial.

    – Features of Replit include code editor, output display, file management, version control, debugger, and console for Python programming.

    Creating and indenting a function in Python

    – The function is defined using 'def' keyword and indented code within the function.

    – Squiggly lines may indicate variables assigned but not used, which is not a program-stopping error.

    Using blank lines and consistent indentation in Python code.

    – Adding blank lines between code sections for better organization.

    – Explaining the significance of indentation in Python code.

    Dictionaries in Python are used to store data values in key-value pairs.

    – A dictionary in Python is represented by curly braces and contains key-value pairs separated by commas.

    – The key or value in a dictionary can be a variable, and it can be accessed using the variable name.

    Using the input function to get user's choice

    – Explaining how to use the input function to get player's choice as rock, paper, or scissors

    – Cleaning up the unnecessary code in the program

    Implementing random choice in Python for computer selection

    – Define a list of possible options: rock, paper, scissors

    – Generate a random choice from the options list for the computer's selection

    Creating and using arguments in Python functions.

    – Functions can receive data called arguments.

    – Arguments specified inside parentheses when creating a function.

    Explaining the return statement in Python functions

    – Return statement only returns if condition is true, otherwise returns nothing.

    – Can concatenate strings to display player and computer choices in a program.

    F string is a simpler way to combine strings and variables

    – F strings allow making strings with variables and other Python code by putting an 'f' at the beginning of a string.

    – Using curly braces within the F string allows inserting variables or any kind of Python code within the string.

    Understanding elif statements in Python

    – elif statements allow checking multiple conditions in Python

    – Each elif statement is evaluated only if the previous conditions are false

    Refactoring is the process of restructuring code while maintaining functionality.

    – Refactoring is common to simplify or make code more understandable.

    – Using a nested if statement can improve code readability and organization.

    Summarizes the game rules and function completion.

    – Explains the game rules with examples of paper, rock, scissors.

    – Describes the function completion for checking wins and getting choices.

    Accessing specific elements within a dictionary

    – Using brackets to specify the key to get the value of a player's choice from the dictionary

    – Similarly, accessing the computer's choice by changing the key to 'computer'

    Created a Python game to understand programming basics

    – Explained basic concepts of Python

    – Upcoming sections will cover common and additional Python features, as well as a more complex game – blackjack

    Introduction to Python basics and running Python code in different environments

    – Python can be run in an interactive prompt for quick coding

    – Alternatively, Python can also be run in Visual Studio Code with the necessary Python extension installed

    Variables in Python

    – Variables are created by assigning a value to a label using the equal sign

    – Variable names can include characters, numbers, and underscores but cannot start with a number or be a Python keyword

    Python keywords have specific meanings and cannot be used as variable names.

    – Examples of keywords in Python include 'for', 'if', 'while', and 'import'.

    – The Python editor alerts you if you use a keyword as a variable and turns the keyword blue to indicate its status.

    Python has different data types like string, int, float

    – Strings are denoted by quotation marks and can be checked with 'type' and 'equals' operators.

    – Integers are represented using 'int' class and floating point numbers using 'float' class.

    Python automatically detects variable type from value

    – Python can also create a variable of a specific type using the class constructor

    – Conversion from one data type to another is possible using the class constructor

    Arithmetic operators in Python and their functionalities

    – Arithmetic operators include plus, minus, multiplication, division, remainder, exponents.

    – Operators can also be used for floor division, making a number negative, concatenating strings, and combined with the assignment operator.

    Explanation of Arithmetic and Comparison Operators

    – Arithmetic operators perform basic mathematical operations on variables like addition and multiplication

    – Comparison operators compare variables to check for equality, inequality, greater than, less than, etc.

    Explanation of bitwise, is, in, and ternary operators

    – Bitwise operators are rarely used and are important to know for specific situations.

    – The 'is' operator compares two objects and returns true if they are the same. It will be discussed further in the section on objects.

    – The 'in' operator is used to check if a value is in a list or another sequence. More on this will be discussed in the section on lists and sequences.

    – Ternary operator allows quick definition of conditional statements in Python.

    Strings in Python are series of characters enclosed in either double or single quotes

    – You can assign a string to a variable

    – Strings can be concatenated using the plus operator or the plus equal operator to append

    Common string operations in Python

    – Operations include checking for characters or digits, changing case, checking start/end substrings, replacing parts, splitting, stripping whitespace, appending letters, finding positions of substrings.

    – These operations return a new modified string without altering the original string. Global functions like len() and in operator can also be used.

    Using in operator to check for substrings and escaping special characters in strings

    – Use 'in' operator to check if a substring is present in a string

    – Escape special characters in strings by using backslash before the character

    Python allows counting from the end using negative indexing and slicing.

    – Negative indexing starts from -1, and slicing can be used to extract specific parts of a string.

    – Boolean in Python has two values – true or false, with a capital T or F.

  3. Mine didn't like not putting "_choice" after most of the player, computer
    import random

    def get_choices():
    player_choice = input("Enter a choice (rock, paper, scissors): ")
    options = ["rock", "paper", "scissors"]
    computer_choice = random.choice(options)
    choices = {"player": player_choice, "computer": computer_choice}
    return choices

    def check_win(player_choice, computer_choice):
    print(f"You chose {player_choice}, computer chose {computer_choice}")
    if player_choice == computer_choice:
    return "It's A Tie!"
    elif player_choice == "rock":
    if computer_choice == "scissors":
    return "Rock smashes scissors! You win!"
    else:
    return "Paper covers rock! You lose!"
    elif player_choice == "paper":
    if computer_choice == "rock":
    return "Paper covers rock! You win!"
    else:
    return "Scissors cut paper! You lose!"

    elif player_choice == "scissors":
    if computer_choice == "paper":
    return "Scissors cure paper! You win!"
    else:
    return "Rock smashes scissors! You lose!"

    choices = get_choices()
    result = check_win(choices["player"], choices["computer"])
    print(result)

  4. Followed exactly as told, and by the time my RPS game was complete and I tested it, I ran it 17 times without a loss, which is slightly more than a tenth of a percent chance of happening. Thought I messed up, but was actually just incredibly lucky lol

  5. Comments like 'Annotations are ignored by python; mypy is tool that will do type checking' are invaluable to a newbie like me. Thank you so much. Thank you also for the great lambda examples. NOTE: A few of your lambda expressions do not work in replit's 3.10.4 python. They do work fine with 3.12 called by VS 2022.

  6. nice copy paste tutorial broski

  7. The first 12 minutes and you're already talking about dictionaries? You must be trying to weed out the serious from non, right off the bat . That's what I wanted- no filler and web combing for answers like in the Udemy courses in python. The best things in life are free.

  8. map – filter – reduce

  9. I love coding❤❤❤❤❤❤❤❤❤🎉🎉🎉🎉🎉🎉🎉🎉😊😊😊😊😊😊😊😊

  10. mine printed rock, does that matter?

  11. coding

  12. I did some C up to structures and some embedded C , did some C++…. let me try some Python ….

  13. start from 58:00

  14. 1:25:36 I entered the code exactly as Beau had it and didn't get anything when I tried running it. Why would that be?

    book_1_read = True
    book_2_read = False

    read_any_book = any([book_1_read, book_2_read])

  15. Loving this

  16. why replit looks different from the one you have ?

  17. The blackjack is very complicated I wish someone could explain it a bit

  18. This was awesome!

  19. Hey, thanks for this. I'm 15 years old (nearly 16) and I'm still on programming. Maybe there should be any python lessons online?

  20. Hello, thanks for this. I'm 37 years old and have an mathematics bachlor first degree. teaches mathematics for 12 years. Anyway I recently got anather bachlor degreee land adminstration and landed on computer scinces .

  21. thx only problem is that replit already proposes the exact lines u are writing making it hard for me to learn

  22. 2:18:37 Quick question, about Scopes…
    Can you use a variable declared inside a block, in another block with the same indentation?

  23. He really thought he was slick and we wouldn't notice at 1:28:47 smh (absolutely made me laugh out loud)

  24. how does the implementation of AI change the need from complete coding to programming?

  25. 👇who are watching this in 2 😀24

  26. 0:02 Who is he at left corner? 😂😂

  27. i can't believe i just finished 43 minutes on the rock and paper… !!!

  28. At 2:27:22 you mentioned that while loop repeat their blocks until the condition is evaluated as false. I think there was a slip of tongue and you want to say that "While loop repeat their blocks until the condition is evaluated as True "

  29. 1.12.46

  30. Print("Hello World")….

  31. Thankyou universe…..

  32. Great language for AI….

  33. Its taking me years to learn python because i give up and cant remmeber anything 😢😢 i know i should give up but then thats another failiure added to my long list. Any idea what i can do to help rememver stuff so im not restarting again and again

  34. After you say to remove and modify almost everything, I no longer want to continue. What was the point on writing it from the beginning? Cant you teach a normal project from a beginning and not a bootleg with mods? I could go with it for now, but will there be more "well lets delete all of it and start all over" ? There is 1 hour of video left.

  35. Not bad. Did not like that you type 2 lanes of code in one second and modify or remove code in a split second. Ppl cant keep up while typing their own code. The second part is not cool to write a code and then remove it because its useless or we don't need that anymore because whatever reason. You mix ppl understanding of process by doing something useless, or practising unrelated thing in a middle of game code. If u up to teach something, give ppl a reason to do it. I know its for practice, bud you can make a practice lesson different from "lets write a game".

  36. Excellent!

  37. First time i'm learning Python. Also i don't know ABCD of Python. Is this ok to start how to learn Python for me. As i am jobless

  38. I doubt I’ll get an answer since video is somewhat old, but how do you make it for the value in the list in the rock paper scissors example to be always capitalized?

    Like for example, If I type “rock” the rock in “You chose rock. Computer chose paper.” will be lower. But if I type Rock, it’ll be show as “Rock” with capital R. How do I make it so no matter how it’s put in from the user, it will come back as “You chose Rock.”

    Sorry if doesn’t make sense or hard to understand, but would love help. Thank you! 😀

  39. like the java course with visualisation in data structures and algorithm a complete tutorial make one video for python

  40. Big DISLIKE ! I find this video very disorganized and uneasy to follow. Not suitable for a beginner or even a person who has learned some basic stuff and is looking for some beginner level projects (me!). The key takeaway for me here is I can also do this if he's programming! No offence! but I felt I might lack an organized and clear mind to be a programmer and I realize I could be better than some current professional programmers (I kind of feel irritated by seeing this video first on my youtube which is so messy and is taken without any real cuts, any real plan)

  41. can anyone tell me if there are other free courses on youtube for python

Leave your thought here

Your email address will not be published. Required fields are marked *

Enable Notifications OK No thanks