> For the complete documentation index, see [llms.txt](https://lelouvincxs-organization.gitbook.io/teaching/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lelouvincxs-organization.gitbook.io/teaching/learn-python.md).

# Learn Python

## Lesson 1

* Welcome
* Walkthrough replit
* `print()`
* Common coding errors
  * `Print('hello')`
  * `print 'hello'`
* Fix my code

<pre class="language-python"><code class="lang-python"><strong>print(hello world)
</strong><strong>Print('123')
</strong>print('hello world');
print 'abcxyz'
</code></pre>

Here's an exercise to practice the `print` statement in Python:

```python
# Exercise: Printing Messages
# Write a Python program that prints different messages to the console.

# Instructions:
# 1. Print a message that says "Hello, world!"
# 2. Print your name.
# 3. Print your favorite quote.
# 4. Print a message with a number variable.
# 5. Print the result of a calculation.

# Example:
# Hello, world!
# Your Name
# "Favorite Quote"
# Your age is: 25
# 5 + 2 = 7

print("Hello, world!")
print("Your Name")
print("\"Favorite Quote\"")
number = 25
print("Your age is:", number)
print("5 + 2 =", 5 + 2)
```

Another exercise:

```
Chinh
July 18 2023
I am signing up for Mr. Chinh's exercise of Python challenge!
I will make sure to spend some time everyday coding along, for a minimum of 10 minutes a day.
I'll be using Replit, an amazing online IDE so I can do this from my phone whenever I happen to be. No excuses for not coding from the middle of a field.
I am feeling 😁

    *
   * *
  * * *
 * * * *
* * * * *
```

## Lesson 2

* Taking user input `input('What's your name?')`
* Variables
* Printing a variable
* Common coding errors
  * `my variable = input('What is your name?')` then `print(my variable)`
  * `myDad = input('What is your dad's name?')` then `print(mydad)`
* Naming convention
  * Starts with `A-Z` or `a-z` or `_`
  * Follows by other normal characters
  * No special characters: #, @, ?, %, +
* Fix my code

```python
myLunch = input('What are you having for lunch?')
print('It sounds like you have just ordered')
print('myLunch')
print('as soon as possible!')
```

* Challenge

```
Getting to know you!

What's your name?: Chinh
What's your favorite food?: Rice
What's your fovorite music?: Jazz
Where do you live? HCM City
```

## Lesson 3

* Concatenation

```python
myName = input('What is your name?')
myLunch = input('What are you having for lunch?')
print(myName, 'is going to have ', myLunch, 'very soon!')
```

* Common coding errors
*
