From 4d5421fcbd87bb6546792cec486fdc2786e48fc5 Mon Sep 17 00:00:00 2001 From: Asabeneh Date: Thu, 21 Nov 2019 19:32:48 +0200 Subject: [PATCH] day 2 bug fixes --- .DS_Store | Bin 8196 -> 0 bytes images/.DS_Store | Bin 10244 -> 0 bytes readme.md | 24 ++++++++++++------------ 3 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 .DS_Store delete mode 100644 images/.DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index ffe763aa765dcd565a8cd775ed67c59b38daaf1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMTWl0n82|4 zAjm+Ffgl4x2L2lvpqecjD^mBRHW-5p1R3~WW^$8T}IqdRHgEh-VHM zl^Bdc27(OSoB?rmUjiDaa1P=N&hPXf;RVt*{pB^!btxE-BHKyO!P$3sxGm$jY0{Lz z5J^)c1z2En!}kF3VD6+|biYK-nfAXOe4dy#4aaS3`xZ+|%a$xHXRLx%EU!2jo3e8; zS9LQ^x0*gKR>P`0mGI{ywr$SO)x;4)&&8G69@}zN!_w29v!Ur^a$?M|G&|RAXDrR} z_K8UaW1R80Qa3Zx-qFz#Y46-N+Y*`S>}+d^Y~6Ct>?~)i8#nLnKb<;ve&+t!2VS6n zsGf-1S5A1~5uK|(YqX(s4r3Wo&>)5-S8=u4i@NB>}g)D&$?7rfZC`hG>&yftP`XXq#LqqR_2@7T5!Qa14@QK@J{= zC*VoA2$$e8yan&UC-5nJ0bjxuxCTGKPw)%;2EW4}@F$id!wRg#I$VqEumLyWHr$Ro zaTj*s0UW?V9Ksl$z>^rq(>Q@PPGcG!oWY0i0zQh5;nVmczJxF1EBGe9gYV-9_#u9T zU*XsIz5InGc`gsib$-O_G%KX6|G<`GcO&hE z^dc+5!J-U&6<&vT;bY?775E0O!;kPY{7S4V!xgxSI2Xb@FpTT537c^PwqOT#68m-# z|9Y_x_hUbCFovTzhU0h?6Q~gbCvghT5Cb!q#T?GzgT%v!@ezEAnD`7ni_Z}kFBLGa zKhHUd_(mb~vaz&f+SVk=1zW2iO{GVrGA2q;D`A>e6X3!|l4u1*=r!`Vu?X=6-ivtP z>H-g1-U_W$22m%@|9gvn|GyPN4Ppo~5M-c82C%F**4s_WeC02+6KCxR_0!Zv6LxbF qJr^3h<2a#r94DOr!;t0?G8H~iALk^JgxWv;At0##LH!TvKl}~1l57M3 diff --git a/images/.DS_Store b/images/.DS_Store deleted file mode 100644 index c85000da3baedd1e3495749dfbef91da9aaa184c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHMU279T6ur~-q4+ID(o~cceCUhck0OK;1wm9OKF4O$+G?5&*`yzDdGTNPEQr6u zXMc=8pq_JQlJ0JIX$uvE+zGpPcXsZXd(Ygt!%RfPt&KWQL?RJc#6@}I3T`EZ-+7%V zbD^dV>7XxiD5<=YEqRY8E5?8^Ui~(a{$^i32gp0Bf z#oiZBkYXPMO-5tg8Bb>sso_cuzG)4?98&ufzr+{{C8ViZ+t6mrWRWqKAwdJ7O zN570$^1{d)K;|Q+9FLr5NAMo-Xaz?r!F|Gbk?l!T?}57*tvc|!w1@c@1#d5)hyJkr zW|R&GK(5ILSU|>8c?1ShTy4BFMz&GYgiH~Q^rnw@k&Eg7ZRr03&|uSbjc{`4qlj~y zbGnpKc?FGce%2iwDF@65sm32ONA(r%$8%6 z^W=Q2Bkq1Co8ByVwTJj%oHI7cBLicZL#U%YSBajE0N0`-Pcd5Tptd4^E^wvH`gloB zo$<_;IV-N_bXvNOmDuK2=qn$&AOIC~lW55_N28;n? zV5S(D_ufW4|9@Hi|Nl&JV$K=^v&Mj1Xs$Qc;B`1#KjA;m+9O;aaj~%7*h^KxjZIju u$MJaKar|nidrZlK?~NeGUaC6kRUOiw=Ku3Q14{Q?V*7s)+yBqV{{Jt3XU6jY diff --git a/readme.md b/readme.md index a148484..b529ea4 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,7 @@ ![30DaysOfPython](./images/30DaysOfPython_banner3@2x.png) +## Table of Content - [Day 1](#day-1) - [Welcome](#welcome) - [Introduction](#introduction) @@ -139,6 +140,7 @@ The python interactive shell is good to try and test small script codes but it w If you installed visual studio code, let's see how to use it. #### How to visual studio code Open the visual studio code by double clicking the visual studio icon. When you open it you will get this kind of interface. Try to interact with the labelled icons. + ![Visual studio Code](images/vscode_ui.png) Create a folder name 30DaysOfPython on your desktop. Then open it using visual studio code. @@ -203,9 +205,9 @@ In python there are several types of data types. We will get started with the mo ```py 'Asabeneh' 'Finland' -"Python" -"I love teaching" -"I hope you are enjoying the first day" +'Python' +'I love teaching' +'I hope you are enjoying the first day' ``` #### Booleans A boolean data type is either True or False value. @@ -229,7 +231,7 @@ A python dictionary object is an unordered collection of data in a key:value pa **Example:** ```py -{"name":"Asabeneh", "country":"Finland", age:250, "is_married":True} +{'name':'Asabeneh', 'country':'Finland', age:250, 'is_married':True} ``` #### Tuple A tuple is an ordered collection of different data types like list but tuples can not be modified once they are created. They are immutable. @@ -276,10 +278,8 @@ helloworld.py print(type({'name':'Asabeneh'})) #Dictionary print(type({9.8, 3.14, 2.7})) #Tuple ``` - ![Running python script](./images/running_python_script.png) - ## Exercises - Day 1 1. Check the python version you are using 2. Open the python interactive shell and do the following operations. The operands are 3 and 4. Check the example above @@ -387,7 +387,7 @@ person_info = { ``` Let's use *print()* and *len()* built in functions. Print function will take multiple arguments. An argument is a value which we pass or put inside the function parenthesis, see the example below. - *Example:* + **Example:** ```py print('Hello, World!') print('Hello',',', 'World','!') # it can take multiple arguments @@ -396,7 +396,7 @@ person_info = { Let's print and also find the length of the variables declared at the top: - *Example:* + **Example:** ```py # Printing the values stored in the variables print('First name:', first_name) @@ -412,7 +412,7 @@ print('Person information: ', person_info) ``` Variable can also be declared in one line: - *Example:* + **Example:** ```py first_name, last_name, country, age, is_married = 'Asabeneh', 'Yetayeh', 'Helsink', 250, True print(first_name, last_name, country, age, is_married) @@ -434,7 +434,7 @@ print('Married: ', is_married) ## Data Types Different data types in python. There are different data type in python programming. To identify the data tpe we use the type method. In this section, we will see data types in detail. - *Example: * + **Example:** ```py # Different python data types # Let's declare different data types @@ -452,7 +452,7 @@ print(type(3.14)) print(type(1 + 1j)) print(type(True)) print(type([1, 2,3,4])) -print(type({"name":"Asabeneh","age":250, "is_married":250})) +print(type({'name':'Asabeneh','age':250, 'is_married':250})) print(type((1,2))) print(type(zip([1,2],[3,4]))) ``` @@ -513,7 +513,7 @@ print(weight, 'N') ## Boolean ## Exercises - Day 2 -1. Create a folder called day_2. Inside this folder create a file name called variables.py +1. Inside 30DaysOfPython create a folder called day_2. Inside this folder create a file name called variables.py 2. Writ a python comment saying 'Day 2: 30 Days of python programming' 3. Declare a first name variable and assign a value to it 4. Declare a last name variable and assign a value to it