diff --git a/docs/day1.md b/docs/day1.md index a977d49..9623056 100644 --- a/docs/day1.md +++ b/docs/day1.md @@ -24,9 +24,9 @@ Before we can dive into our web project we have to cover some Python basics. Let 8. Type `x="hello"` and press enter. Nothing should return. -9. Type `x` and press etner. You should see `hello` printed to the screen. Variables in python do not have a "type" - they can be integers, strings, floats, etc and can switch between them at will. +9. Type `x` and press enter. You should see `hello` printed to the screen. Variables in python do not have a "type" - they can be integers, strings, floats, etc and can switch between them at will. -10. Type `my_name = "\"` and press enter. Nothing should return +10. Type `my_name = ""` and press enter. Nothing should return 11. Type `my_name` and press enter. You should see your name printed to your terminal. `my_name` is a much better variable name than `x`. It describes the thing it stores. Please use variable names that are descriptive. @@ -40,15 +40,15 @@ Before we can dive into our web project we have to cover some Python basics. Let 16. Type `len(address)` and press enter. You should see `5` printed to the terminal. There are 5 "things" in the tuple: - `123 ` (1) - - `"lane ave"` (2) - - `"Columbus"` (3) - - `"OH"` (4) - - `43212` (5) + (1) `123 ` + + (2) `"lane ave"` + + (3) `**"Columbus"` + + (4) `"OH"` + + (5) `43212` 17. Type `address[0]` and press enter. You should see `123` printed to the terminal. You just accessed the first item in the tuple. Tuples and other collections start at 0 and count up. @@ -64,7 +64,7 @@ Before we can dive into our web project we have to cover some Python basics. Let ## A Python Program -1. Create a new file called `myprogram.py` by clicking the "add file" icon in the top left of VSCode. +1. Create a new file called `my_program.py` by clicking the "add file" icon in the top left of VSCode. ![add_file](img/day1/add_file.png) @@ -99,7 +99,7 @@ Before we can dive into our web project we have to cover some Python basics. Let ![type_more_code](img/day1/type_more_code.png) -1. In your terminal type `python myprogram.py` and press enter. You should see +1. Save the file with ctrl+S. In your terminal type `python myprogram.py` and press enter. You should see ```bash hello, world! @@ -130,6 +130,8 @@ Before we can dive into our web project we have to cover some Python basics. Let 1. Now type `python my_program.py` in the terminal and press enter. Nothing will return. + ![functions_in_order](img/day1/functions_in_order.png) + 1. We've given our snippets of code "names" by adding a "def" above them. These are called functions. We can call them in any order we want. Let's call them in the correct order by using their names. Add the following to the bottom of my_program.py ```python @@ -138,6 +140,6 @@ Before we can dive into our web project we have to cover some Python basics. Let print_goodbye() ``` - ![functions_in_order](img/day1/functions_in_order.png) +3. Type `python my_program.py` in the terminal and press enter. Now everything prints in order! -1. Type `python my_program.py` in the terminal and press enter. Now everything prints in order! \ No newline at end of file + ![in_order](img/day1/in_order.png) \ No newline at end of file diff --git a/docs/img/day1/in_order.png b/docs/img/day1/in_order.png new file mode 100644 index 0000000..56259bf Binary files /dev/null and b/docs/img/day1/in_order.png differ