This thread is dedicated to anyone who wishes to learn python. I will be posting a new lesson every week or two. Our end goal is for you to be able to write a simple program or even a game. So let's get started shall we.
NOTE: DONT POST YOUR RESULTS HERE. ONLY POST HERE IF YOU HAVE QUESTIONS ON HOW TO CODE.
Lesson 1 - Strings
Strings are easy to learn but important when learning python. We will be setting values and assigning strings to
certain variables. For this first lesson we'll start small. I want you to take a variable (we'll use "post" in this case) and assign it a string/value. Let's assign it a value of 1 in this case.
Instructions
Make a variable called "post" and assign it a value of "= 1".
Answer
Spoiler:
You're code should look like this
"post = 1"
Congratulations you just made you're first string! Strings can be made up of letters, numbers or symbols. For example let's create another string. Let's make a variable called "Steve" and assign it the string "post quality over quantity".
Instructions
Assign the string "post quality over quantity" to the variable "Steve".
HINT: Remember to use quotation marks on the string.
Answer
Spoiler:
Your code should look like this
Steve = "post quality over quantity"
Very good! We're almost done. Let's put our skills to the test shall we. Set a string for each of the variables I give you.
Instructions
Assign the string "noob" to the variable "pro"
Assign the string "707" to the variable "literacy"
Assign the string "Obama care FTW" to the variable "eggs"
Answer
Spoiler:
Your code should look like this
pro = "noob"
literacy = 707
eggs = "Obama care FTW"
Lesson 1 - Strings (Complete)
Congratulations on completing lesson 1. This was pretty simple but it is used a lot so it's good to know. Soon we'll get to the advanced lessons. Lesson 2 will be up soon hopefully.