Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
44 views

100 Days of Coding in Python - carrullo

100 Days of Coding in Python by Giuliana Carullo is a comprehensive guide designed to teach programming fundamentals, algorithms, data structures, and design patterns over a 100-day period. The book is structured to provide daily theory and practice, making it suitable for beginners in programming. It emphasizes a step-by-step approach to mastering Python and computer science concepts.

Uploaded by

titobesaleel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
44 views

100 Days of Coding in Python - carrullo

100 Days of Coding in Python by Giuliana Carullo is a comprehensive guide designed to teach programming fundamentals, algorithms, data structures, and design patterns over a 100-day period. The book is structured to provide daily theory and practice, making it suitable for beginners in programming. It emphasizes a step-by-step approach to mastering Python and computer science concepts.

Uploaded by

titobesaleel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 282
100 DAYS OF CODING GIULIANA CARULLO 100 Days of Coding In Python Giuliana Carullo This book is for sale at http://leanpub.com/100daysofcoding This version was published on 2020-03-22 Leanpub This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. © 2019 - 2020 Giuliana Carullo Also By Giuliana Carullo Code Reviews 101 Technical Leadership Identity Management 101 Stop Procrastinating pip install python Contents Why this Book?... 6... ee eee i Who This Book is Meant For... 6.2... eee ii Part 1- The Basics ........ cee Introduction «6... eee 2 The Study Plan... eee eee 2 Where it AllBegins .. 0.0... .. eee eee 2 Fundamentals ............. cee 4 The beloved hello world........ re) The command line .... 5 spycode....... Peete eee eee 5 The main... 6. eee eee 6 Coding Practice of theday ....... sees 7 Basic Input/Output... 6... ......05 ree 9 Output manipulation... 6... 66. 9 Giveittome .. cece ee 12 Basic Types... . . . I 7 Numeric Types .... see see 14 SHINES Co eee 16 Other types ©... ee ee 16 CONTENTS, Coding Practice of theday ............. Structure of a Python Program ... Statements and Expressions Functions. . Modules .. Packages ..... Modular Programming . Import .... ee... eee Absolute vs relative . Importing a package . Putting it all together . . . Coding Practice of the day . Variables ...........05 Referencing ......... Keywords .......... What To Avoid . Convensions...... Coding Practice of the day Python Objects ......... Class ....... see Initialization. ........ Attributes 6.6... 0.00. Methods oe Functions . . @properties . . . Coding Practice of the day Polymorphism . Inheritance... . This is...Super! . Overload . . 17 19 20 21 22 24 25 26 27 27 27 28 30 31 32 33 33 35 37 37 37 37 37 37 38 41 ARS 47 CONTENTS, Override 2... eee Types of Inheritance ........... Coding Practice of theday ... Composition. . . oe a oe Rule of Thumb ......... See Coding Practice of theday ...........000. Conditional Flows .......... 0.000000 ee Ifstatement 6... ee ee Multiple Checks. 6... 0. eee eee Membership ..........- vee Coding Practice of theday ............. Further Modifying the Flow ............ Break... 0.2... 000.. Continue ...... PaSS oe. eevee eee Lees Coding Practice of theday .........0 00005 Error Handling ......... .- Coding Practice of theday ............. Documentation ©... 06... eee The Syntax... 6 ee eee eee If the Code is Good I don’t need Comments Phi- losophy 6... eee Conditions and Flows»... 0. ee eee eee IO Definition 6... eee Inline Comments... 1... eee TODOs . 6... ee That’s Obvious ..............0.5 5S 49 50 50 52. 54 55 56 58 60 62 63 64 64 64 65 65 67 69 70 72 73 74 74 75 76 77 77 CONTENTS, Did you just lie to that programmer? . . Comments Driven Development (CDD) . . Coding Conventions............ Coding Practice of theday ........ Part 2 - Algorithms ..... Introduction .......... 0.000005 Recursion ...... . fee tee Coding Practice of theday ........ Iteration. 6... ee eee Coding Practice of theday ........ Greedy Agorithms ..............- Thinking Greedy ........ Coding Practice of theday ........ Dynamic Programming ..... . . wee Coding Practice of theday ........ NP-Hard problems ............... Coding Practice of theday ........ Part 3 - Data Structures 79 79 80 81 83 84 86 87 89 90 92 92 93 95 96 98 99 . 102 . 103 105 107 . 108 CONTENTS, Linked-List ......... Fenn eee eee U1 Internals ..... See se. 112 Coding Practice of the day Fe eee see 113 Doubly Linked-List . oe te cece ee ee ee 15 Internals 6... ee ee seen ee 116 Coding Practice of theday .......... see. 17 Stack eee 119 Internals 6... eee 120 Coding Practice of theday ...........000. 121 Queue Internals . Coding Practice of the day Hash Map.......... beens wees 127 Internals ..... See se. 129 Coding Practice of the day Pee eee ee 130 Binary Search Trees 131 Internals... 6... See eee ee ee 133 Coding Practice of the day beeen see 134 Takeaway... ee 136 Further Reading... 0.0... eee eee 138 Part 4 - Design Patterns ....... 139 Introduction ........ Fenn eee sess 140 Design Patterns... 2.2... 2.00004. see. 141 Creational 6.1... eee 143 Singleton... ee ee 144 CONTENTS, The code 2... 2... eee cece eee » 145 Don’ts.... cee ce 145 Coding Practice of the day Steen eee ee 146 Lazy Initialization ©... 1. eee eee 148 The Code... cece eee 149 Don'ts... eee 149 Coding Practice of theday ....... -... 150 Builder 2... eee . 152 The Code... eee eee eee 152 Don'ts... eee eee 154 Coding Practice of theday ............ 155 Abstract Factory... 6... ee eee eee . 157 The Code... 2.0.0... .0.04- 2... 157 Don'ts... eee ee eee 159 Coding Practice of theday ....... 0.005 160 Factory Method... 6... ee eee eee 162 The Code... eee eee - 162 Don’ts.... cee se. 163 Coding Practice of the day Steen ee 164 Structural . . Adapter . What .... be ee 2. 167 HOW see . 167 When... eee ee eee 168 Don'ts... eee eee 168 Coding Practice of the he day beeen ee 169 Decorator .. . . wee eee. 171 What 171 How v1 When . 173 Don'ts... beeen eee ee 173 Coding Practice of the day bees . 174 CONTENTS, Coding Practice of theday ............ 179 Composite... 2.0.0... eee eee se. 181 What 20... eee . 181 HOW ee 182 When oo. eee eee 183 Don'ts... eee 184 Coding Practice of theday .......... » 185 Behavioural . 6.1... ee eee 187 Observer... eee eee 188 What 2... ee eee 188 How... 0. ee eee . 189 When .............0 00005. -... 190 Don'ts... eee ee eee 191 Coding Practice of theday ....... 0.005 192 Publisher-Subscriber .. 6... eee 194 What 2... eee 194 How..... Fee eee see. 194 When . 6... eee . 197 Don'ts... eee ee eee 197 Coding Practice of theday ....... 0.005 198 Tterator eee 200 What .... be ee .... 200 200 202 202 Coding Practice of the day ............4 203 Visitor 2. ee » 205 CONTENTS, State Coding Practice of theday ... 213 Chain of Responsibility ........ see 215 What .... ce ee wee 215 HOW ee 215 When... eee eee 217 Don'ts... eee eee eee 217 Coding Practice of theday .......... - 218 Part 5- Solutions .............. 220 The Basics Sena Basic types... ee eee Structure of a Python Program Variables... eee Python Objects . see . Polymorphism... 6.0... e ee eee Conditional Flows ... Loops... Errors... 4... os Documentation... ... 6... 0.000000 005 Algorithms .. 0... e ee eee 241 CONTENTS, Data Structures... 0.0.0.0... 000000005 . 242 Armay so... Fees 243 Linked-List . 247 Stack .. Queue. . HashMap... 0. ee eee eee 256 Binary Search Tree... 22.02.0000. 259 Design Patterms .... 0... ee 262 Conclusions... 1... ee eee 263 About the author .................. - 264 More from Giuliana Carullo...... 0.0... .005 265 More from Giuliana Carullo ... 6... 6.0.00 265 Feedback and Errata. ............... . 267 References 6.0... eee eee 268 Preface Welcome to an intense session during which you will learn Python. This book will be your friend for the next 100 days to help you along the journey of learning the fundamentals of Computer Science and how to program them in Python. This book will provide you step by step focused daily theory and practice to help you master: 1, programming foundation in Python; 2. main algorithms concepts; 3. popular data structures that you will encounter often in your life as a programmer; 4, design patterns that will help you in writing marvelous code. Why this Book? Sure enough plenty of books have been written on Python and the official documentation [PSF] is - and always will - remain the source of knowledge. A go to for doubts. Preface ii However, this book has been specifically designed to walk you through - step by step - not only Python syntax but also fundamentals of computer science that will make you a well- rounded programmer. Who This Book is Meant For If you are new to programming - in general - this book is right for you. Indeed it walks through the core concept of program- ming as well as detailing relative Python implementations.

You might also like