├── .gitignore ├── images ├── logo.png └── certifi.png ├── ENG Version ├── Introduction to Python.pptx ├── Module_3_Introduction_to_Python.ipynb └── Module_2_Introduction_to_Python.ipynb ├── TR Version ├── Module 0 - Introduction to Python.pdf ├── Module_2_Introduction_to_Python.ipynb ├── Module_3_Introduction_to_Python.ipynb └── Module 1 - Introduction to Python.ipynb └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .ipynb_checkpoints 2 | -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaih/introduction-to-python/HEAD/images/logo.png -------------------------------------------------------------------------------- /images/certifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaih/introduction-to-python/HEAD/images/certifi.png -------------------------------------------------------------------------------- /ENG Version/Introduction to Python.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaih/introduction-to-python/HEAD/ENG Version/Introduction to Python.pptx -------------------------------------------------------------------------------- /TR Version/Module 0 - Introduction to Python.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaih/introduction-to-python/HEAD/TR Version/Module 0 - Introduction to Python.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | # Introduction to Python Programming 6 | 7 | You can find more information about our Introduction to Python Programming Course by visiting [Course Website](https://globalaihub.com/courses/introduction-to-python-turkish/) 8 | 9 | --- 10 | 11 | Would you like to take your place in the age of Artificial Intelligence with Python Programming language, one of the most valuable and popular software languages of the Engineering world? 12 | 13 | Python is a general-purpose programming language that helps non-technical people complete daily tasks with little effort, which can be considered automation. 14 | 15 | Python plays a crucial role in the entire data science process because concepts such as Data Visualization, Machine Learning, and Deep Learning that you will learn in this field can be easily implemented with the Python Language. With this course, you will have a great introduction to sought-after and the most required programming language in the business world. 16 | 17 | We support your development process by giving assignments so that you do not force yourself to leave the topics covered only in theory but also give you lots of practice. In this way, you can learn new programming skills by gathering experience in both theory and practice. 18 | 19 | ## List of Contents 20 | 21 | ### Prologue 22 | - Welcome to Python Course 23 | - What is Python? 24 | - Why Python is The First Step of AI? 25 | - Why Python is Preferred? 26 | - Why Do We Need Python? 27 | 28 | ### Module 1 29 | - Data Types: Numbers, Strings and Boolean 30 | - Arithmetical & Logical Operators 31 | - Containers: Lists, Dictionaries 32 | - Project #1: Body Mass Index Application 33 | 34 | ### Module 2 35 | - Logical Operators cont’d 36 | - Conditional Statements 37 | - Loops: For, While 38 | - Project #2: Social Media Account Application 39 | 40 | ### Module 3 41 | - Functions 42 | - Modules 43 | - Methods 44 | - Exception Handling 45 | - Project #3: Telephone Book Application 46 | 47 | ### Epilogue 48 | - Practical Use of What has been learned 49 | - Further Projects 50 | - What’s Next 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /TR Version/Module_2_Introduction_to_Python.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "Module 2- Introduction to Python.ipynb", 7 | "provenance": [], 8 | "collapsed_sections": [ 9 | "5tasFpjzCLhW", 10 | "dvM-V2jmCLhW" 11 | ] 12 | }, 13 | "kernelspec": { 14 | "display_name": "Python 3", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.9.5" 29 | } 30 | }, 31 | "cells": [ 32 | { 33 | "cell_type": "markdown", 34 | "metadata": { 35 | "id": "UW-bYpQ3CLhW" 36 | }, 37 | "source": [ 38 | "# 2. Koşullar" 39 | ] 40 | }, 41 | { 42 | "cell_type": "markdown", 43 | "metadata": { 44 | "id": "5tasFpjzCLhW" 45 | }, 46 | "source": [ 47 | "## 2.1 Operatörler\n", 48 | "\n", 49 | "Python'da ve dışında mantıksal operatörler çok azdır, örneğin \n", 50 | "`not, >, <, ==, >=, <=, !=`" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "metadata": { 56 | "id": "iHtD9TRzCLhW" 57 | }, 58 | "source": [ 59 | "print(10 > 100) # False\n", 60 | "print(10 < 100) # True\n", 61 | "print(10 == 10) # True\n", 62 | "print(10 != 50) # True\n", 63 | "print(2 > 1 and 2 > 0) # True\n", 64 | "print(not True) # False\n", 65 | "print(not False) # True" 66 | ], 67 | "execution_count": null, 68 | "outputs": [] 69 | }, 70 | { 71 | "cell_type": "markdown", 72 | "metadata": { 73 | "id": "dvM-V2jmCLhW" 74 | }, 75 | "source": [ 76 | "## 2.2 Koşul Durumlar\n", 77 | "\n", 78 | "Aşağıdakiler, Python'daki if-else koşullu ifadesinin bir örneğidir. Bazı koşullara göre mantık yürütmek için kullanılır. Koşul yerine getirilmezse, else bloğundaki kod çalıştırılır. Koşullu bir ifadenin içindeki blok da girintilidir." 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "metadata": { 84 | "id": "waXmNuX4CLhW" 85 | }, 86 | "source": [ 87 | "age = input('Yaşınızı girin: ')\n", 88 | "\n", 89 | "if (int(age) >= 18):\n", 90 | " print('Kulübe girebilirsiniz.')\n", 91 | "\n", 92 | "else:\n", 93 | " print('Özür dileriz, kulübe giremezsiniz!')" 94 | ], 95 | "execution_count": null, 96 | "outputs": [] 97 | }, 98 | { 99 | "cell_type": "code", 100 | "metadata": { 101 | "id": "30g7Xpc2CLhW" 102 | }, 103 | "source": [ 104 | "exam_score = input('Sınav notunuzu girin: ')\n", 105 | "\n", 106 | "if (int(exam_score) > 90):\n", 107 | " print('Aldığınız not A+, tebrikler!')\n", 108 | "\n", 109 | "elif (int(exam_score) > 80):\n", 110 | " print('Aldığınız not A')\n", 111 | "\n", 112 | "else:\n", 113 | " print('Aldığınız not B')" 114 | ], 115 | "execution_count": null, 116 | "outputs": [] 117 | }, 118 | { 119 | "cell_type": "code", 120 | "metadata": { 121 | "id": "YmBdAXFICLhX" 122 | }, 123 | "source": [ 124 | "is_adult = True\n", 125 | "is_licensed = True\n", 126 | "\n", 127 | "if (is_adult and is_licensed):\n", 128 | " print('Araba kullanmaya izniniz var!')\n", 129 | "\n", 130 | "else:\n", 131 | " print('Araba kullanmaya izniniz yok!')" 132 | ], 133 | "execution_count": null, 134 | "outputs": [] 135 | }, 136 | { 137 | "cell_type": "markdown", 138 | "metadata": { 139 | "id": "XC2WdG0BCv3m" 140 | }, 141 | "source": [ 142 | "### Ornek Calisma" 143 | ] 144 | }, 145 | { 146 | "cell_type": "code", 147 | "metadata": { 148 | "id": "r7zQczqGCzE6" 149 | }, 150 | "source": [ 151 | "print(\"**************ATM Giriş Paneli**************\")\n", 152 | "\n", 153 | "# Database'de Kayitli Kullanici Adi ve Sifre\n", 154 | "db_kullanici_adi = \"Omer\"\n", 155 | "db_parola = \"hello\"\n", 156 | "\n", 157 | "# Kullanicidan Sorgulanacak Kullanici Adi ve Sifre\n", 158 | "kullanici_adi = input(\"Lütfen kullanıcı adınızı giriniz\")\n", 159 | "parola = input(\"Lütfen Parolanızı giriniz.\")\n", 160 | "\n", 161 | "# Program\n", 162 | "if (kullanici_adi != db_kullanici_adi and parola == db_parola):\n", 163 | " print(\"Kullanıcı adınız hatalı\")\n", 164 | "\n", 165 | "elif (kullanici_adi == db_kullanici_adi and parola != db_parola):\n", 166 | " print(\"Parolanız hatalı\")\n", 167 | "\n", 168 | "elif (kullanici_adi != db_kullanici_adi and parola != db_parola):\n", 169 | " print(\"Kullanıcı adınız ve parolanız hatalıdır.\")\n", 170 | "\n", 171 | "else:\n", 172 | " print(\"Tebrikler, Başarıyla giriş yaptınız\")" 173 | ], 174 | "execution_count": null, 175 | "outputs": [] 176 | }, 177 | { 178 | "cell_type": "markdown", 179 | "metadata": { 180 | "id": "gmvgEgynDgfR" 181 | }, 182 | "source": [ 183 | "### Ic Ice Kosullar" 184 | ] 185 | }, 186 | { 187 | "cell_type": "code", 188 | "metadata": { 189 | "id": "tE_u8zCHDg29" 190 | }, 191 | "source": [ 192 | "x = 10\n", 193 | "\n", 194 | "if x > 5:\n", 195 | " if x >7:\n", 196 | " print(\"İlker and Eylül\")" 197 | ], 198 | "execution_count": null, 199 | "outputs": [] 200 | }, 201 | { 202 | "cell_type": "markdown", 203 | "metadata": { 204 | "id": "gDwccPO2_c0R" 205 | }, 206 | "source": [ 207 | "### Question\n", 208 | "\n", 209 | "At a particular company, employees’ salaries are raised progressively, calculated using the following formula:\n", 210 | "\n", 211 | "salary = salary + salary x (raise percentage) \n", 212 | "\n", 213 | "Raises are predefined as given below, according to the current salary of the worker. For instance, if the worker’s current salary is less than or equal to 1000 TL, then its salary is increased 15%.\n", 214 | "\n", 215 | "\n", 216 | "Range | Percentage\n", 217 | "--- | ---\n", 218 | "0 < salary ≤ 1000 | 15%\n", 219 | "1000 < salary ≤ 2000 |10%\n", 220 | "2000 < salary ≤ 3000| 5%\n", 221 | "3000 < salary | 2.5%\n", 222 | "\n", 223 | "\n", 224 | "Write a program that asks the user to enter his/her salary. Then your program should calculate and print the raised salary of the user.\n", 225 | "\n", 226 | "Some example program runs:\n", 227 | "\n", 228 | "Please enter your salary: 1000\n", 229 | "\n", 230 | "Your raised salary is 1150.0.\n", 231 | "\n", 232 | "Please enter your salary: 2500\n", 233 | "\n", 234 | "Your raised salary is 2625.0." 235 | ] 236 | }, 237 | { 238 | "cell_type": "markdown", 239 | "metadata": { 240 | "id": "ZfMXLFHyFkDT" 241 | }, 242 | "source": [ 243 | "### Answer" 244 | ] 245 | }, 246 | { 247 | "cell_type": "code", 248 | "metadata": { 249 | "id": "iXxyMx5KFj89" 250 | }, 251 | "source": [ 252 | "salary = float(input(\"Please enter your salary: \"))\n", 253 | "\n", 254 | "if salary < 0:\n", 255 | " print(\"Invalid value\")\n", 256 | "else:\n", 257 | "\n", 258 | " if 0 < salary <= 1000:\n", 259 | " salary = salary + salary * 0.15\n", 260 | " elif salary <= 2000:\n", 261 | " salary = salary + salary * 0.1\n", 262 | " elif salary <= 3000:\n", 263 | " salary = salary + salary * 0.05\n", 264 | " else:\n", 265 | " salary = salary + salary * 0.025\n", 266 | "\n", 267 | " print(\"Your raised salary is\", salary)" 268 | ], 269 | "execution_count": null, 270 | "outputs": [] 271 | }, 272 | { 273 | "cell_type": "markdown", 274 | "metadata": { 275 | "id": "GWhbQW7aFy1h" 276 | }, 277 | "source": [ 278 | "# 3. Döngüler\n", 279 | "\n", 280 | "Döngüler, bir kod bloğunun birkaç kez çalıştırılmasına izin verir." 281 | ] 282 | }, 283 | { 284 | "cell_type": "markdown", 285 | "metadata": { 286 | "id": "4svV-k30Fy1k" 287 | }, 288 | "source": [ 289 | "## 3.1 For Döngüsü (For Loop)\n", 290 | "\n", 291 | "Python'da, temel döngü biçimi, yinelenebilir bir döngü üzerinde döngü yapabilen bir for döngüsüdür." 292 | ] 293 | }, 294 | { 295 | "cell_type": "code", 296 | "metadata": { 297 | "id": "4x4YfPKnFy1k" 298 | }, 299 | "source": [ 300 | "for item in 'Python': # Stringler üzerinde gezilebilir\n", 301 | " print(item) # Verilen stringdeki tüm harflerin üzerin geçer" 302 | ], 303 | "execution_count": null, 304 | "outputs": [] 305 | }, 306 | { 307 | "cell_type": "code", 308 | "metadata": { 309 | "id": "pqLJHaSJFy1m" 310 | }, 311 | "source": [ 312 | "for item in [1,2,3,4,5]: # Listeler üzerinde gezilebilir\n", 313 | " print(item) # Verilen listedeki tüm harflerin üzerin geçer" 314 | ], 315 | "execution_count": null, 316 | "outputs": [] 317 | }, 318 | { 319 | "cell_type": "markdown", 320 | "metadata": { 321 | "id": "p4ZXgtwLFy1m" 322 | }, 323 | "source": [ 324 | "### Iterable" 325 | ] 326 | }, 327 | { 328 | "cell_type": "markdown", 329 | "metadata": { 330 | "id": "eRk0df8gFy1m" 331 | }, 332 | "source": [ 333 | "Itareble, yinelenebilen bir veri koleksiyonudur. Koleksiyondaki parçaların tek tek işlenebileceği anlamına gelir. \n", 334 | "\n", 335 | "Listeler, dizeler, tuple'lar, kümeler ve sözlüklerin hepsi itarebledir. Yinelenebilir üzerinde gerçekleştirilen eyleme iterasyon denir." 336 | ] 337 | }, 338 | { 339 | "cell_type": "code", 340 | "metadata": { 341 | "id": "JgRFb0NvFy1n" 342 | }, 343 | "source": [ 344 | "player = {\n", 345 | " 'firstname': 'Mert',\n", 346 | " 'lastname': 'Cobanov',\n", 347 | " 'role': 'captain'\n", 348 | "}" 349 | ], 350 | "execution_count": null, 351 | "outputs": [] 352 | }, 353 | { 354 | "cell_type": "code", 355 | "metadata": { 356 | "id": "28qQNr0xFy1n" 357 | }, 358 | "source": [ 359 | "for item in player: # iterates over the keys of player\n", 360 | " print(item) # prints all keys" 361 | ], 362 | "execution_count": null, 363 | "outputs": [] 364 | }, 365 | { 366 | "cell_type": "code", 367 | "metadata": { 368 | "id": "5S4aBBa4Fy1n" 369 | }, 370 | "source": [ 371 | "for item in player.keys(): \n", 372 | " print(item) # prints all keys" 373 | ], 374 | "execution_count": null, 375 | "outputs": [] 376 | }, 377 | { 378 | "cell_type": "code", 379 | "metadata": { 380 | "id": "9mblj3EbFy1o" 381 | }, 382 | "source": [ 383 | "for item in player.values():\n", 384 | " print(item) # prints all values" 385 | ], 386 | "execution_count": null, 387 | "outputs": [] 388 | }, 389 | { 390 | "cell_type": "code", 391 | "metadata": { 392 | "id": "t_bBC76uFy1o" 393 | }, 394 | "source": [ 395 | "for item in player.items():\n", 396 | " print(item) # prints key and value as tuple" 397 | ], 398 | "execution_count": null, 399 | "outputs": [] 400 | }, 401 | { 402 | "cell_type": "code", 403 | "metadata": { 404 | "id": "ChgPmKhWFy1o" 405 | }, 406 | "source": [ 407 | "for key, value in player.items():\n", 408 | " print(key, value) # prints key and value using unpacking" 409 | ], 410 | "execution_count": null, 411 | "outputs": [] 412 | }, 413 | { 414 | "cell_type": "markdown", 415 | "metadata": { 416 | "id": "5iyBPxjxFy1p" 417 | }, 418 | "source": [ 419 | "### range\n", 420 | "\n", 421 | "range, Python'da bir dizi sayı oluşturmak için kullanılan yinelenebilir bir nesnedir. Genellikle döngülerde ve bir liste oluşturmak için kullanılır." 422 | ] 423 | }, 424 | { 425 | "cell_type": "code", 426 | "metadata": { 427 | "id": "LJ0jZ5dEFy1p", 428 | "scrolled": true 429 | }, 430 | "source": [ 431 | "for item in range(10):\n", 432 | " print('python') # prints python 10 times" 433 | ], 434 | "execution_count": null, 435 | "outputs": [] 436 | }, 437 | { 438 | "cell_type": "code", 439 | "metadata": { 440 | "id": "VWx3nv5sFy1p" 441 | }, 442 | "source": [ 443 | "for item in range(0,10,1):\n", 444 | " print('hello') # prints hello 10 times" 445 | ], 446 | "execution_count": null, 447 | "outputs": [] 448 | }, 449 | { 450 | "cell_type": "code", 451 | "metadata": { 452 | "id": "0dJCTxBNFy1q" 453 | }, 454 | "source": [ 455 | "for item in range(0, 10, 2):\n", 456 | " print('hii') # prints hii 5 times " 457 | ], 458 | "execution_count": null, 459 | "outputs": [] 460 | }, 461 | { 462 | "cell_type": "code", 463 | "metadata": { 464 | "id": "fq9R9fSWFy1q" 465 | }, 466 | "source": [ 467 | "for item in range(10, 0, -1):\n", 468 | " print(item) # prints in reverse order" 469 | ], 470 | "execution_count": null, 471 | "outputs": [] 472 | }, 473 | { 474 | "cell_type": "code", 475 | "metadata": { 476 | "id": "p3ZtMH61Fy1q" 477 | }, 478 | "source": [ 479 | "print(list(range(10))) # generates a list of 10 items" 480 | ], 481 | "execution_count": null, 482 | "outputs": [] 483 | }, 484 | { 485 | "cell_type": "markdown", 486 | "metadata": { 487 | "id": "DA-U5yc4Fy1q" 488 | }, 489 | "source": [ 490 | "### enumerate\n", 491 | "\n", 492 | "enumerate, döngü sırasında yineleyicinin dizinine ihtiyacımız olduğunda kullanışlıdır." 493 | ] 494 | }, 495 | { 496 | "cell_type": "code", 497 | "metadata": { 498 | "id": "_dooUfDxFy1r", 499 | "scrolled": true 500 | }, 501 | "source": [ 502 | "for key, value in enumerate(range(10)): # using unpacking techique \n", 503 | " print(f'key is {key} and value is {value}') # prints key and value at the same time" 504 | ], 505 | "execution_count": null, 506 | "outputs": [] 507 | }, 508 | { 509 | "cell_type": "markdown", 510 | "metadata": { 511 | "id": "5zdhALFLFy1r" 512 | }, 513 | "source": [ 514 | "## 3.2 While Döngüsü (While Loop)\n", 515 | "\n", 516 | "Döngüler, belirli bir koşula bağlı olarak bir kod bloğunu birkaç kez çalıştırmanın başka bir yoludur. Yanlışlıkla sistemlerimizi çökertene kadar çalışmaya devam edecek sonsuz bir döngü oluşturmamak için while döngüleriyle uğraşırken biraz dikkatli olmalıyız!" 517 | ] 518 | }, 519 | { 520 | "cell_type": "markdown", 521 | "metadata": { 522 | "id": "y7wGmxjLHIM0" 523 | }, 524 | "source": [ 525 | "```python\n", 526 | "hungry = True\n", 527 | "\n", 528 | "while(hungry): # Bu her zaman doğrudur, bu nedenle sistem çökene kadar yazdırmaya devam eder!\n", 529 | " print('Bana yiyecek bir şeyler ver!')\n", 530 | "```" 531 | ] 532 | }, 533 | { 534 | "cell_type": "markdown", 535 | "metadata": { 536 | "id": "J1RLzVoqFy1r" 537 | }, 538 | "source": [ 539 | "Ancak döngüler kullanışlıdır. Yazması basit ve okuması kolaydır. Sadece döngüyü ne zaman durduracağını söylememiz gerekiyor. Döngü yürütmeyi durduran ve döngüden çıkan bir `break` deyimi kullanılarak yapılabilir. Başka bir yol da, yürütmeyi durdurmak için koşulu `False`'a çevirmektir." 540 | ] 541 | }, 542 | { 543 | "cell_type": "code", 544 | "metadata": { 545 | "id": "PrOp3JnfFy1s", 546 | "scrolled": true 547 | }, 548 | "source": [ 549 | "hungry = True\n", 550 | "satisfaction = 0\n", 551 | "\n", 552 | "while (satisfaction < 10):\n", 553 | " satisfaction += 1\n", 554 | " print('Bana yiyecek bir şeyler ver!') # on kere yazar" 555 | ], 556 | "execution_count": null, 557 | "outputs": [] 558 | }, 559 | { 560 | "cell_type": "markdown", 561 | "metadata": { 562 | "id": "sVfaEEqDFy1s" 563 | }, 564 | "source": [ 565 | "## 3.3 Kısa bir egsersiz\n", 566 | "\n", 567 | "Yinelenen e-postaları bir e-posta listesinde bulalım ve yazdıralım." 568 | ] 569 | }, 570 | { 571 | "cell_type": "code", 572 | "metadata": { 573 | "id": "qcFKc_pRFy1s", 574 | "scrolled": true 575 | }, 576 | "source": [ 577 | "email_list = ['roger@hey.com','michael@hey.com','roger@hey.com','prince@gmail.com']\n", 578 | "duplicate_emails = []\n", 579 | "\n", 580 | "for email in email_list:\n", 581 | " if email_list.count(email) > 1 and email not in duplicate_emails:\n", 582 | " duplicate_emails.append(email)\n", 583 | " \n", 584 | "print(duplicate_emails)" 585 | ], 586 | "execution_count": null, 587 | "outputs": [] 588 | }, 589 | { 590 | "cell_type": "markdown", 591 | "metadata": { 592 | "id": "FVF48defGC69" 593 | }, 594 | "source": [ 595 | "### Proje: Sosyal Medya Hesap İşlemleri\n", 596 | "\n", 597 | "Giris_bilgileri adında Anahtar değeri = kullanıcı adı, Değeri = şifre olan bir sözlük oluşturun.\n", 598 | "\n", 599 | "Kullanıcıdan isim için bir girdi isteyin. Eğer sözlükte böyle bir isim varsa şifre isteyin yoksa \"Böyle bir kullanıcı bulunamadı yazdırın\". Girilen şifre ve isim doğruysa bir while döngü başlatın ve kullanıcıya bir menü yazdırın. \n", 600 | "\n", 601 | "menü = '''\n", 602 | " 1: Şifre Değiştir\n", 603 | " 2: Kullanıcı Adı Değiştir\n", 604 | " 3: Hesabı Sil\n", 605 | " q: Çıkış Yap\n", 606 | " '''\n", 607 | "while döngüsünde ilk olarak kullanıcıdan menüden bir seçim yapmasını isteyin.\n", 608 | "- Seçim 1 ise, kullanıcıdan girdi olarak 8 haneden uzun yeni bir şifre talep edin. Giriş bilgileri isimli sözlükte şifre(value) değerini yeni şifre ile değiştirin\n", 609 | "- Seçim 2 ise, kullanıcıdan girdi olarak yeni bir isim talep edin. Giriş bilgileri isimli sözlükte isim(key) değerini yeni isim ile değiştirin\n", 610 | "- Seçim 3 ise, giriş bilgileri isimli sözlükten giriş yapmış olan kullanıcıyı siliniz\n", 611 | "- Seçim q ise, while döngüsünü bitirip uygulamayı sonlandırınız" 612 | ] 613 | }, 614 | { 615 | "cell_type": "code", 616 | "metadata": { 617 | "id": "Bwc0GLZH_962" 618 | }, 619 | "source": [ 620 | "giris_bilgileri = {\"GlobalAIHub\":\"Global123\"}\n", 621 | "kullanici_adi = input(\"Kullanıcı Adı: \")\n", 622 | "girildi_mi = False\n", 623 | "if kullanici_adi in giris_bilgileri.keys():\n", 624 | " sifre = input(\"Şifre: \")\n", 625 | " if giris_bilgileri[kullanici_adi] == sifre:\n", 626 | " print(\"Giriş Başarılı\")\n", 627 | " girildi_mi = True\n", 628 | " else: print(\"Şifre Yanlış\")\n", 629 | "else:\n", 630 | " print(\"Böyle bir kullanıcı bulunamadı\")\n", 631 | "\n", 632 | "menu = '''\n", 633 | "1: Şifre Değiştir\n", 634 | "2: Kullanıcı Adı Değiştir\n", 635 | "3: Hesabı Sil\n", 636 | "q: Çıkış Yap\n", 637 | "'''\n", 638 | "while girildi_mi:\n", 639 | " print(menu)\n", 640 | " secim = input(\"Lütfen seçim yapınız: \")\n", 641 | " print(\"*\"*50)\n", 642 | "\n", 643 | " if secim == \"1\":\n", 644 | " yeni_sifre = input(\"\\nLütfen yeni şifrenizi giriniz: \")\n", 645 | " if len(yeni_sifre) >= 8:\n", 646 | " giris_bilgileri[kullanici_adi] = yeni_sifre\n", 647 | " print(f\"\\nYeni şifreniz {yeni_sifre} olarak değiştirildi!\")\n", 648 | " else: print(\"Şifre en az 8 haneli olmalıdır\")\n", 649 | "\n", 650 | " elif secim == \"2\":\n", 651 | " yeni_isim = input(\"\\nLütfen yeni kullanıcı adınızı giriniz: \")\n", 652 | " giris_bilgileri[yeni_isim] = giris_bilgileri[kullanici_adi]\n", 653 | " del giris_bilgileri[kullanici_adi]\n", 654 | " kullanici_adi = yeni_isim\n", 655 | " print(f\"\\nKullanıcı adınız {yeni_isim} olarak değiştirildi!\")\n", 656 | "\n", 657 | " elif secim == \"3\":\n", 658 | " del giris_bilgileri[silinecek_isim]\n", 659 | " print(\"Hesabınız başarılı bir şekilde silindi\")\n", 660 | "\n", 661 | " elif secim == \"q\":\n", 662 | " print(\"Görüşmek üzere...\")\n", 663 | " break # girildi_mi = False\n", 664 | "\n", 665 | " else:\n", 666 | " print(\"Hatalı bir seçim yaptınız. Lütfen tekrar deneyin\")" 667 | ], 668 | "execution_count": null, 669 | "outputs": [] 670 | } 671 | ] 672 | } -------------------------------------------------------------------------------- /ENG Version/Module_3_Introduction_to_Python.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "Module_3_Introduction_to_Python.ipynb", 7 | "provenance": [], 8 | "collapsed_sections": [] 9 | }, 10 | "kernelspec": { 11 | "display_name": "Python 3", 12 | "language": "python", 13 | "name": "python3" 14 | }, 15 | "language_info": { 16 | "codemirror_mode": { 17 | "name": "ipython", 18 | "version": 3 19 | }, 20 | "file_extension": ".py", 21 | "mimetype": "text/x-python", 22 | "name": "python", 23 | "nbconvert_exporter": "python", 24 | "pygments_lexer": "ipython3", 25 | "version": "3.9.5" 26 | } 27 | }, 28 | "cells": [ 29 | { 30 | "cell_type": "markdown", 31 | "metadata": { 32 | "id": "q7dhkh67Fy1s" 33 | }, 34 | "source": [ 35 | "# Functions\n", 36 | "\n", 37 | "Functions are a very important concept and they are available in all programming languages. Functions allow us to define an action (code block). So far, Python-provided print, input, len, etc. We were using some built-in functions like Now it's time to create one." 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "metadata": { 43 | "id": "2ZOXnE2aFy1s", 44 | "scrolled": true, 45 | "outputId": "a9117738-a8ea-416e-eee8-30a3e7a562d2" 46 | }, 47 | "source": [ 48 | "def blow_fire(): # We are defining our function\n", 49 | " print('fire 🔥 🔥 🔥')\n", 50 | "\n", 51 | "blow_fire() # We are calling the function\n", 52 | "blow_fire() # We can call functions as much as we want\n" 53 | ], 54 | "execution_count": null, 55 | "outputs": [ 56 | { 57 | "output_type": "stream", 58 | "text": [ 59 | "fire 🔥 🔥 🔥\n", 60 | "fire 🔥 🔥 🔥\n" 61 | ], 62 | "name": "stdout" 63 | } 64 | ] 65 | }, 66 | { 67 | "cell_type": "markdown", 68 | "metadata": { 69 | "id": "_tiM_9YmFy1t" 70 | }, 71 | "source": [ 72 | "## 4.1 Arguments and Parameters\n", 73 | "\n", 74 | "The above function was a bit cool, but it has some limitations as well. It can only perform the same action. Let's make it more extensible and pass some data to it so it can perform actions as it wants" 75 | ] 76 | }, 77 | { 78 | "cell_type": "code", 79 | "metadata": { 80 | "id": "e7t4WvcqFy1t", 81 | "outputId": "633cabc9-8e73-4fe3-917e-832f31ef99a7" 82 | }, 83 | "source": [ 84 | "def blower(name, emoji): # parameters\n", 85 | " print(f'{name} {emoji} {emoji} {emoji}')\n", 86 | "\n", 87 | "blower('fire', '🔥') # arguments\n", 88 | "blower('water', '🌊')" 89 | ], 90 | "execution_count": null, 91 | "outputs": [ 92 | { 93 | "output_type": "stream", 94 | "text": [ 95 | "fire 🔥 🔥 🔥\n", 96 | "water 🌊 🌊 🌊\n" 97 | ], 98 | "name": "stdout" 99 | } 100 | ] 101 | }, 102 | { 103 | "cell_type": "markdown", 104 | "metadata": { 105 | "id": "8hchECTmFy1t" 106 | }, 107 | "source": [ 108 | "## 4.2 return\n", 109 | "\n", 110 | "return is a keyword used in Python to return a value from a function. To make functions more useful, they should return a value based on evaluating an expression. If no return statement is specified, or if the expression of the return statement is not treated as a data type, the function returns None.\n", 111 | "\n", 112 | "The return statement terminates and exits the function." 113 | ] 114 | }, 115 | { 116 | "cell_type": "code", 117 | "metadata": { 118 | "id": "yqgevVejFy1t", 119 | "outputId": "2cffb420-a2f6-4e44-a7a8-d65bef711d40" 120 | }, 121 | "source": [ 122 | "def multiplier(num1, num2):\n", 123 | " return num1 * num2\n", 124 | "\n", 125 | "result = multiplier(2,3)\n", 126 | "print(result) # 6" 127 | ], 128 | "execution_count": null, 129 | "outputs": [ 130 | { 131 | "output_type": "stream", 132 | "text": [ 133 | "6\n" 134 | ], 135 | "name": "stdout" 136 | } 137 | ] 138 | }, 139 | { 140 | "cell_type": "code", 141 | "metadata": { 142 | "id": "WMJNdqRZFy1u", 143 | "scrolled": true 144 | }, 145 | "source": [ 146 | "def sum(num1):\n", 147 | " def child(num2):\n", 148 | " return num1 + num2\n", 149 | " return child" 150 | ], 151 | "execution_count": null, 152 | "outputs": [] 153 | }, 154 | { 155 | "cell_type": "code", 156 | "metadata": { 157 | "id": "xgm7Qnz5Fy1u" 158 | }, 159 | "source": [ 160 | "add_10 = sum(10)" 161 | ], 162 | "execution_count": null, 163 | "outputs": [] 164 | }, 165 | { 166 | "cell_type": "code", 167 | "metadata": { 168 | "id": "apd521hBFy1u", 169 | "outputId": "4290ebb0-876c-4ced-e52e-32af29505407" 170 | }, 171 | "source": [ 172 | "print(add_10(20)) # 30 (Closure!!!)\n", 173 | "print(add_10(50)) # 60\n", 174 | "print(add_10(100)) # 110" 175 | ], 176 | "execution_count": null, 177 | "outputs": [ 178 | { 179 | "output_type": "stream", 180 | "text": [ 181 | "30\n", 182 | "60\n", 183 | "110\n" 184 | ], 185 | "name": "stdout" 186 | } 187 | ] 188 | }, 189 | { 190 | "cell_type": "markdown", 191 | "metadata": { 192 | "id": "qDFq1N_9Pr3R" 193 | }, 194 | "source": [ 195 | "### Examples" 196 | ] 197 | }, 198 | { 199 | "cell_type": "markdown", 200 | "metadata": { 201 | "id": "pqogNsBfP_g1" 202 | }, 203 | "source": [ 204 | "Function example that has single return" 205 | ] 206 | }, 207 | { 208 | "cell_type": "code", 209 | "metadata": { 210 | "id": "NqTXF_8kPrsR" 211 | }, 212 | "source": [ 213 | "def summ(a, b):\n", 214 | " value = a + b\n", 215 | " return value" 216 | ], 217 | "execution_count": null, 218 | "outputs": [] 219 | }, 220 | { 221 | "cell_type": "code", 222 | "metadata": { 223 | "colab": { 224 | "base_uri": "https://localhost:8080/" 225 | }, 226 | "id": "_CAsffx0P1TI", 227 | "outputId": "6b277115-fa17-41a2-b43d-d359da22a440" 228 | }, 229 | "source": [ 230 | "sonuc = summ(6.0,7.5)\n", 231 | "print(sonuc)" 232 | ], 233 | "execution_count": null, 234 | "outputs": [ 235 | { 236 | "output_type": "stream", 237 | "text": [ 238 | "13.5\n" 239 | ], 240 | "name": "stdout" 241 | } 242 | ] 243 | }, 244 | { 245 | "cell_type": "markdown", 246 | "metadata": { 247 | "id": "qXT-QjaFQDFA" 248 | }, 249 | "source": [ 250 | "Functions can return multiple values" 251 | ] 252 | }, 253 | { 254 | "cell_type": "code", 255 | "metadata": { 256 | "id": "2k7Fj3wDQGS9" 257 | }, 258 | "source": [ 259 | "def func(x,y):\n", 260 | " summ = x + y\n", 261 | " multip = x * y\n", 262 | " return (summ, multip)" 263 | ], 264 | "execution_count": null, 265 | "outputs": [] 266 | }, 267 | { 268 | "cell_type": "code", 269 | "metadata": { 270 | "colab": { 271 | "base_uri": "https://localhost:8080/" 272 | }, 273 | "id": "HMWmEGW2QJZq", 274 | "outputId": "e506f795-3bfa-4a6d-8d41-1bc83906a152" 275 | }, 276 | "source": [ 277 | "summation, multiplication = func(23,45)\n", 278 | "\n", 279 | "print(summation, multiplication)" 280 | ], 281 | "execution_count": null, 282 | "outputs": [ 283 | { 284 | "output_type": "stream", 285 | "text": [ 286 | "68 1035\n" 287 | ], 288 | "name": "stdout" 289 | } 290 | ] 291 | }, 292 | { 293 | "cell_type": "markdown", 294 | "metadata": { 295 | "id": "U1Ifuv5lQRTj" 296 | }, 297 | "source": [ 298 | "Functions can be combined with conditional statements and loops" 299 | ] 300 | }, 301 | { 302 | "cell_type": "code", 303 | "metadata": { 304 | "id": "1poo3uyCQUds" 305 | }, 306 | "source": [ 307 | "def func(x):\n", 308 | " if x > 0:\n", 309 | " return (\"Positive\")\n", 310 | "\n", 311 | " elif x < 0:\n", 312 | " return (\"Negative\")\n", 313 | " \n", 314 | " else:\n", 315 | " return (\"Zero\")" 316 | ], 317 | "execution_count": null, 318 | "outputs": [] 319 | }, 320 | { 321 | "cell_type": "code", 322 | "metadata": { 323 | "colab": { 324 | "base_uri": "https://localhost:8080/" 325 | }, 326 | "id": "vcqhsM0bQXtc", 327 | "outputId": "c2335250-f0fb-4970-eff8-61fd0c4b3a63" 328 | }, 329 | "source": [ 330 | "for i in [-2, 5, 6, 0, -4, -7]:\n", 331 | " print(func(i))" 332 | ], 333 | "execution_count": null, 334 | "outputs": [ 335 | { 336 | "output_type": "stream", 337 | "text": [ 338 | "Negative\n", 339 | "Positive\n", 340 | "Positive\n", 341 | "Zero\n", 342 | "Negative\n", 343 | "Negative\n" 344 | ], 345 | "name": "stdout" 346 | } 347 | ] 348 | }, 349 | { 350 | "cell_type": "markdown", 351 | "metadata": { 352 | "id": "BAEcEf-CQe3n" 353 | }, 354 | "source": [ 355 | "### Factorial Calculation Example" 356 | ] 357 | }, 358 | { 359 | "cell_type": "code", 360 | "metadata": { 361 | "id": "1M6-P8KFQiJZ" 362 | }, 363 | "source": [ 364 | "#factorial calculation\n", 365 | "#0! = 1\n", 366 | "#1!= 1\n", 367 | "#2!= 2 * 1 =2\n", 368 | "#6! = 6 * 5* 4 *3 * 2 *1 = 720\n", 369 | "\n", 370 | "def factorial(num):\n", 371 | " \n", 372 | " factorial = 1\n", 373 | " if (num == 0 or num == 1):\n", 374 | " print(\"Factorial: \", factorial)\n", 375 | " \n", 376 | " else:\n", 377 | " while (num >= 1):\n", 378 | " factorial = factorial * num\n", 379 | " num -= 1\n", 380 | " \n", 381 | " print(\"Factorial: \", factorial)" 382 | ], 383 | "execution_count": null, 384 | "outputs": [] 385 | }, 386 | { 387 | "cell_type": "code", 388 | "metadata": { 389 | "colab": { 390 | "base_uri": "https://localhost:8080/" 391 | }, 392 | "id": "hyzTQkqrQmZR", 393 | "outputId": "e7bcefe7-910a-497c-9a02-55c31a4e73ab" 394 | }, 395 | "source": [ 396 | "factorial(5)" 397 | ], 398 | "execution_count": null, 399 | "outputs": [ 400 | { 401 | "output_type": "stream", 402 | "text": [ 403 | "Factorial: 120\n" 404 | ], 405 | "name": "stdout" 406 | } 407 | ] 408 | }, 409 | { 410 | "cell_type": "markdown", 411 | "metadata": { 412 | "id": "qyuq5dSOQsrR" 413 | }, 414 | "source": [ 415 | "Other methods can be used in functions" 416 | ] 417 | }, 418 | { 419 | "cell_type": "code", 420 | "metadata": { 421 | "id": "erNMKGGKQvwj" 422 | }, 423 | "source": [ 424 | "def hello2(name, capLetter = False):\n", 425 | "\n", 426 | " if capLetter:\n", 427 | " print(\"Hello \" + name.upper())\n", 428 | " \n", 429 | " else:\n", 430 | " print(\"Hello \" + name)" 431 | ], 432 | "execution_count": null, 433 | "outputs": [] 434 | }, 435 | { 436 | "cell_type": "code", 437 | "metadata": { 438 | "colab": { 439 | "base_uri": "https://localhost:8080/" 440 | }, 441 | "id": "XmpF-rGuQzOn", 442 | "outputId": "5fe32b9e-003a-4c89-9748-5e104a5e0730" 443 | }, 444 | "source": [ 445 | "hello2(\"asli\")" 446 | ], 447 | "execution_count": null, 448 | "outputs": [ 449 | { 450 | "output_type": "stream", 451 | "text": [ 452 | "Hello asli\n" 453 | ], 454 | "name": "stdout" 455 | } 456 | ] 457 | }, 458 | { 459 | "cell_type": "code", 460 | "metadata": { 461 | "colab": { 462 | "base_uri": "https://localhost:8080/" 463 | }, 464 | "id": "6iONCcj3Q1Wb", 465 | "outputId": "d9b7b1d4-79bd-4d26-dcd3-0485254d119d" 466 | }, 467 | "source": [ 468 | "hello2(\"Asli\", capLetter= True)" 469 | ], 470 | "execution_count": null, 471 | "outputs": [ 472 | { 473 | "output_type": "stream", 474 | "text": [ 475 | "Hello ASLI\n" 476 | ], 477 | "name": "stdout" 478 | } 479 | ] 480 | }, 481 | { 482 | "cell_type": "markdown", 483 | "metadata": { 484 | "id": "sw36UHJtFy1u" 485 | }, 486 | "source": [ 487 | "## 4.3 Scope\n", 488 | "\n", 489 | "Simply put, it means **\"Which variables do I have access to?\"**. This is the kind of question the interpreter asks when reading code to find the scope of variables. Variables in Python have function scope, which means that variables defined inside a function cannot be accessed from outside the function." 490 | ] 491 | }, 492 | { 493 | "cell_type": "code", 494 | "metadata": { 495 | "id": "ZslCONDuFy1u", 496 | "scrolled": true 497 | }, 498 | "source": [ 499 | "num = 1\n", 500 | "\n", 501 | "def confusing_function():\n", 502 | " \n", 503 | " num = 10\n", 504 | " return num" 505 | ], 506 | "execution_count": null, 507 | "outputs": [] 508 | }, 509 | { 510 | "cell_type": "code", 511 | "metadata": { 512 | "id": "x-QTA3lbFy1v", 513 | "outputId": "582fac13-906b-4356-d7a2-9c8a22d76b2f" 514 | }, 515 | "source": [ 516 | "print(num) # 1 => Global Scope\n", 517 | "print(confusing_function()) # 10 => Local Scope" 518 | ], 519 | "execution_count": null, 520 | "outputs": [ 521 | { 522 | "output_type": "stream", 523 | "text": [ 524 | "1\n", 525 | "10\n" 526 | ], 527 | "name": "stdout" 528 | } 529 | ] 530 | }, 531 | { 532 | "cell_type": "markdown", 533 | "metadata": { 534 | "id": "CWf35HmwFy1v" 535 | }, 536 | "source": [ 537 | "**The scope rules that the Python interpreter follows are:**\n", 538 | "\n", 539 | "- Start with local. Is the variable available? Then get the value. If not, continue\n", 540 | "- Is the variable defined in the local scope of the main function? Return the value if any, otherwise continue\n", 541 | "- Does the variable exist in the global scope? Return the value if any, otherwise continue\n", 542 | "- Is the variable a built-in function? Return the value, otherwise the output" 543 | ] 544 | }, 545 | { 546 | "cell_type": "markdown", 547 | "metadata": { 548 | "id": "hqiueftBQ9Z_" 549 | }, 550 | "source": [ 551 | "### Lambda Fonksiyonlar" 552 | ] 553 | }, 554 | { 555 | "cell_type": "code", 556 | "metadata": { 557 | "colab": { 558 | "base_uri": "https://localhost:8080/" 559 | }, 560 | "id": "6TkphRWBQ-8M", 561 | "outputId": "52111f9f-951f-4a6d-913f-5473f29ded9b" 562 | }, 563 | "source": [ 564 | "#lambda function\n", 565 | "(lambda x: x + 1)(2)" 566 | ], 567 | "execution_count": null, 568 | "outputs": [ 569 | { 570 | "output_type": "execute_result", 571 | "data": { 572 | "text/plain": [ 573 | "3" 574 | ] 575 | }, 576 | "metadata": { 577 | "tags": [] 578 | }, 579 | "execution_count": 15 580 | } 581 | ] 582 | }, 583 | { 584 | "cell_type": "code", 585 | "metadata": { 586 | "colab": { 587 | "base_uri": "https://localhost:8080/", 588 | "height": 35 589 | }, 590 | "id": "L2x_LKm5RAMy", 591 | "outputId": "a5f8cf71-df93-4b8b-cda1-9bb2cc5fddaa" 592 | }, 593 | "source": [ 594 | "full_name = lambda first, last: f'Full name: {first.title()} {last.title()}'\n", 595 | "full_name('guido', 'van rossum')" 596 | ], 597 | "execution_count": null, 598 | "outputs": [ 599 | { 600 | "output_type": "execute_result", 601 | "data": { 602 | "application/vnd.google.colaboratory.intrinsic+json": { 603 | "type": "string" 604 | }, 605 | "text/plain": [ 606 | "'Full name: Guido Van Rossum'" 607 | ] 608 | }, 609 | "metadata": { 610 | "tags": [] 611 | }, 612 | "execution_count": 16 613 | } 614 | ] 615 | }, 616 | { 617 | "cell_type": "markdown", 618 | "metadata": { 619 | "id": "Hgq6Gt61Y-b4" 620 | }, 621 | "source": [ 622 | "## 4.4 Moduller" 623 | ] 624 | }, 625 | { 626 | "cell_type": "code", 627 | "metadata": { 628 | "id": "ZwhwBEdLY_HR" 629 | }, 630 | "source": [ 631 | "words = [\"artificial\",\"intelligence\",\"machine\",\"learning\",\"python\",\"programming\"]\n", 632 | "\n", 633 | "\n", 634 | "#from random import *\n", 635 | "import random as rnd\n", 636 | "\n", 637 | "def randomWord(words):\n", 638 | " index = rnd.randint(0, len(words)-1)\n", 639 | " return words[index]\n", 640 | " " 641 | ], 642 | "execution_count": null, 643 | "outputs": [] 644 | }, 645 | { 646 | "cell_type": "code", 647 | "metadata": { 648 | "id": "rg4WG8obZJAE" 649 | }, 650 | "source": [ 651 | "len(words)" 652 | ], 653 | "execution_count": null, 654 | "outputs": [] 655 | }, 656 | { 657 | "cell_type": "code", 658 | "metadata": { 659 | "id": "TSYLKfr3ZMEP" 660 | }, 661 | "source": [ 662 | "word = randomWord(words)\n", 663 | "print(word)" 664 | ], 665 | "execution_count": null, 666 | "outputs": [] 667 | }, 668 | { 669 | "cell_type": "markdown", 670 | "metadata": { 671 | "id": "3uarilP0ZOdQ" 672 | }, 673 | "source": [ 674 | "## 4.5 Methods" 675 | ] 676 | }, 677 | { 678 | "cell_type": "markdown", 679 | "metadata": { 680 | "id": "4JzGqpMwZT6n" 681 | }, 682 | "source": [ 683 | "## Metodlar\n", 684 | "\n", 685 | "Functions are called by name, can be enclosed in parameters, and optionally the resulting value can be used outside the function.\n", 686 | "Methods are also named by name, similar to functions in many ways, but the call is performed through an object such as a String or list.\n", 687 | "\n", 688 | "object.methodName(parameter)" 689 | ] 690 | }, 691 | { 692 | "cell_type": "code", 693 | "metadata": { 694 | "id": "sUnXe_GVZeBx" 695 | }, 696 | "source": [ 697 | "s = input(\"Please enter a name: \")\n", 698 | "\n", 699 | "print(s.upper())" 700 | ], 701 | "execution_count": null, 702 | "outputs": [] 703 | }, 704 | { 705 | "cell_type": "markdown", 706 | "metadata": { 707 | "id": "jQJEl4kcZn1n" 708 | }, 709 | "source": [ 710 | "# Exceptions \n", 711 | "\n", 712 | "* Programmer Errors \n", 713 | "* Program Bugs \n", 714 | "* Exceptions" 715 | ] 716 | }, 717 | { 718 | "cell_type": "code", 719 | "metadata": { 720 | "id": "5d2l2YVgZoD4" 721 | }, 722 | "source": [ 723 | "# error example,SyntaxError.\n", 724 | "\n", 725 | "print \"Hello World!\" " 726 | ], 727 | "execution_count": null, 728 | "outputs": [] 729 | }, 730 | { 731 | "cell_type": "code", 732 | "metadata": { 733 | "id": "qnXbYAmjZreT" 734 | }, 735 | "source": [ 736 | "#bug example.\n", 737 | "\n", 738 | "num1 = input(\"Enter the first integer: \")\n", 739 | "num2 = input(\"Enter the second integer: \")\n", 740 | "\n", 741 | "print(num1, \"+\", num2, \"=\", num1 + num2)\n" 742 | ], 743 | "execution_count": null, 744 | "outputs": [] 745 | }, 746 | { 747 | "cell_type": "code", 748 | "metadata": { 749 | "id": "L2m33VggZtWn" 750 | }, 751 | "source": [ 752 | "# ZeroDivisionError.\n", 753 | "\n", 754 | "\n", 755 | "num3 = int(input(\"First integer: \"))\n", 756 | "num4 = int(input(\"Second integer: \"))\n", 757 | "\n", 758 | "print(num3, \"/\",num4, \"=\", num3/num4)" 759 | ], 760 | "execution_count": null, 761 | "outputs": [] 762 | }, 763 | { 764 | "cell_type": "markdown", 765 | "metadata": { 766 | "id": "Stcay0lvZtQL" 767 | }, 768 | "source": [ 769 | "## Exception Handling\n", 770 | "\n", 771 | "\n", 772 | "try:\n", 773 | "\n", 774 | "\n", 775 | "> the situations where we can get exceptions\n", 776 | "\n", 777 | "except \"Exception Name\":\n", 778 | "\n", 779 | "\n", 780 | "> the operations in case of exceptions\n", 781 | "\n", 782 | "\n", 783 | "\n" 784 | ] 785 | }, 786 | { 787 | "cell_type": "code", 788 | "metadata": { 789 | "id": "iWaawuLrZx74" 790 | }, 791 | "source": [ 792 | "x = \"Alan Turing\"\n", 793 | "\n", 794 | "int(x)" 795 | ], 796 | "execution_count": null, 797 | "outputs": [] 798 | }, 799 | { 800 | "cell_type": "code", 801 | "metadata": { 802 | "id": "MNQaIOpvZ2YM" 803 | }, 804 | "source": [ 805 | "try:\n", 806 | " int(x)\n", 807 | "\n", 808 | "except ValueError:\n", 809 | " print(\"Please enter an integer value!!!\")" 810 | ], 811 | "execution_count": null, 812 | "outputs": [] 813 | }, 814 | { 815 | "cell_type": "code", 816 | "metadata": { 817 | "id": "MM66D0IHZ2PJ" 818 | }, 819 | "source": [ 820 | "num3 = input(\"First integer: \")\n", 821 | "num4 = input(\"Second integer: \")\n", 822 | "\n", 823 | "try:\n", 824 | " num3_int = int(num3)\n", 825 | " num4_int = int(num4)\n", 826 | "\n", 827 | " print(num3_int, \"/\",num4_int, \"=\", num3_int/num4_int)\n", 828 | "\n", 829 | "except ValueError:\n", 830 | " print(\"Please enter an integer value!!!\")" 831 | ], 832 | "execution_count": null, 833 | "outputs": [] 834 | }, 835 | { 836 | "cell_type": "code", 837 | "metadata": { 838 | "id": "f4BaeeS1Z6r1" 839 | }, 840 | "source": [ 841 | "#exception handling in loop structure\n", 842 | "\n", 843 | "\n", 844 | "while True:\n", 845 | " num1 = input(\"First number: (Press q for quit the program): \")\n", 846 | "\n", 847 | " if num1 == \"q\":\n", 848 | " break\n", 849 | "\n", 850 | " num2 = input(\"Second number: \")\n", 851 | "\n", 852 | " try:\n", 853 | " num1_int = int(num1)\n", 854 | " num2_int = int(num2)\n", 855 | " print(num1_int, \"/\", num2_int, \"=\", num1_int / num2_int)\n", 856 | " except (ValueError, ZeroDivisionError):\n", 857 | " print(\"Error!\")\n", 858 | " print(\"Please try again!\")" 859 | ], 860 | "execution_count": null, 861 | "outputs": [] 862 | }, 863 | { 864 | "cell_type": "markdown", 865 | "metadata": { 866 | "id": "spdXO3A_AZQO" 867 | }, 868 | "source": [ 869 | "### Project: Contacts App\n", 870 | "Create a global variable named Contacts.\n", 871 | "Define 7 functions: add contact, delete contact, update name, update number, choose random contact, view contacts and main.\n", 872 | "- Add contact: take name and number as parameters and if the given name is not in the contacts, add a value in the form of key = name, value = number\n", 873 | "- Delete contact: take a name as a parameter and delete it with exception handling. If the name is in the contacts, delete it otherwise print an output to the user that it could not be found\n", 874 | "- Update name: take two parameters, old and new name, give an error if the old name is not in the contacts or if the new name is in the contacts, if there is no problem, update the old name in the contacts with the new name\n", 875 | "- Update number: take two parameters, name and new number, check if the given name is in the contacts and update the number with the new number, if any\n", 876 | "- Choose a random contact: choose a name from the contacts using the random.choice function and **return** the selected name and its corresponding number.\n", 877 | "- View contacts: print the names and numbers of all contacts, one after the other, with indexes at the beginning.\n", 878 | "- Main: create a while loop in it and print the menu at each round\n", 879 | "menu = ''''\n", 880 | " ________________________\n", 881 | " | 1: Add contact |\n", 882 | "\n", 883 | " | 2: Delete Contact |\n", 884 | "\n", 885 | " | 3: Update Name |\n", 886 | "\n", 887 | " | 4: Update Number |\n", 888 | "\n", 889 | " | 5: Pick Random Person |\n", 890 | "\n", 891 | " | 6: View Contacts |\n", 892 | " \n", 893 | " | q: Sign Out |\n", 894 | " _________________________\n", 895 | " ''''\n", 896 | "then ask the user to select an action as input. According to the selected operation, if necessary, take the function parameters as input from the user and call the necessary functions. If the user enters the value \"q\", end the loop.\n", 897 | "\n", 898 | "You can provide the interaction with the user as you want while taking inputs or outputs, and you can add as many different options as you want to the menu.\n", 899 | "\n", 900 | "Finally, start and test the application by calling the main function." 901 | ] 902 | }, 903 | { 904 | "cell_type": "code", 905 | "metadata": { 906 | "id": "Gs7hMdvtAB8c" 907 | }, 908 | "source": [ 909 | "import random\n", 910 | "\n", 911 | "contacts = {}\n", 912 | "\n", 913 | "def add_contact(name, number):\n", 914 | " global contacts\n", 915 | " if not name in contacts.keys():\n", 916 | " contacts[name] = number\n", 917 | " print(\"New person has been added\")\n", 918 | " else: print(\"There is such a person!\")\n", 919 | "\n", 920 | "def delete_contact(name):\n", 921 | " global contacts\n", 922 | " try:\n", 923 | " del contacts[name]\n", 924 | " print(\"Person has been deleted!\")\n", 925 | " except KeyError:\n", 926 | " print(\"There is such a person!\")\n", 927 | "\n", 928 | "def edit_contact(name, new_name):\n", 929 | " global contacts\n", 930 | " if name in contacts.keys():\n", 931 | " if not new_name in contacts.keys():\n", 932 | " contacts[new_name] = contacts[name]\n", 933 | " del contacts[name]\n", 934 | " print(\"Name has been updated\")\n", 935 | " else: print(f\"There is such a user named {new_user}\")\n", 936 | " else: print(\"There is such a person!\")\n", 937 | "\n", 938 | "def edit_number(name, new_number):\n", 939 | " global contacts\n", 940 | " if name in contacts.keys():\n", 941 | " contacts[name] = new_number\n", 942 | " print(\"Number has been updated!\")\n", 943 | " else: print(\"There is such a person!\")\n", 944 | "\n", 945 | "def pick_random_person():\n", 946 | " name = random.choice(list(contacts.keys()))\n", 947 | " return name, contacts[name]\n", 948 | "\n", 949 | "def view_contacts():\n", 950 | " global contacts\n", 951 | " if not len(contacts) == 0:\n", 952 | " print(\"Contacts:\\n\")\n", 953 | " i = 1\n", 954 | " for key,value in contacts.items():\n", 955 | " print(f\"{i})\\n\\tName: {key}\\n\\tNumber: {value}\")\n", 956 | " i += 1\n", 957 | " return\n", 958 | " print(\"Contacts are empty\")\n", 959 | "\n", 960 | "def main():\n", 961 | " global contacts\n", 962 | " menu = '''\n", 963 | " _________________________\n", 964 | " | 1: Add Contact |\n", 965 | " | 2: Delete Contact |\n", 966 | " | 3: Edit Contact |\n", 967 | " | 4: Edit Number |\n", 968 | " | 5: Pick Random Person | \n", 969 | " | 6: View Contacts |\n", 970 | " | q: Sign Out |\n", 971 | " _________________________\n", 972 | " '''\n", 973 | " print(menu)\n", 974 | " while True:\n", 975 | " choice = input(\"Please choose: \")\n", 976 | " print(\"*\"*50+\"\\n\")\n", 977 | " if choice == \"1\":\n", 978 | " name = input(\"Enter new name: \")\n", 979 | " number = input(\"Enter number: \")\n", 980 | " add_contact(name, number)\n", 981 | "\n", 982 | " elif choice == \"2\":\n", 983 | " name = input(\"Enter the name you want to delete: \")\n", 984 | " delete_contact(name)\n", 985 | "\n", 986 | " elif choice == \"3\":\n", 987 | " name = input(\"Enter the name you want to change: \")\n", 988 | " new_name = input(\"Enter new name: \")\n", 989 | " edit_contact(name, new_name)\n", 990 | "\n", 991 | " elif choice == \"4\":\n", 992 | " name = input(\"Enter the name that you want to change its number: \")\n", 993 | " new_number = input(\"Enter new number: \")\n", 994 | " edit_number(name, new_number)\n", 995 | " \n", 996 | " elif choice == \"5\":\n", 997 | " name, number = pick_random_person()\n", 998 | " print(f\"\\n\\tName: {name}\\n\\tNumber: {number}\")\n", 999 | " \n", 1000 | " elif choice == \"6\":\n", 1001 | " view_contacts()\n", 1002 | " \n", 1003 | " elif choice == \"q\":\n", 1004 | " break\n", 1005 | " \n", 1006 | " else: print(\"You have made an invalid choice. Please try again!\")\n", 1007 | " print(menu)\n", 1008 | "\n", 1009 | "main()" 1010 | ], 1011 | "execution_count": null, 1012 | "outputs": [] 1013 | } 1014 | ] 1015 | } -------------------------------------------------------------------------------- /TR Version/Module_3_Introduction_to_Python.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "Module 3 - Introduction to Python.ipynb", 7 | "provenance": [], 8 | "collapsed_sections": [] 9 | }, 10 | "kernelspec": { 11 | "display_name": "Python 3", 12 | "language": "python", 13 | "name": "python3" 14 | }, 15 | "language_info": { 16 | "codemirror_mode": { 17 | "name": "ipython", 18 | "version": 3 19 | }, 20 | "file_extension": ".py", 21 | "mimetype": "text/x-python", 22 | "name": "python", 23 | "nbconvert_exporter": "python", 24 | "pygments_lexer": "ipython3", 25 | "version": "3.9.5" 26 | } 27 | }, 28 | "cells": [ 29 | { 30 | "cell_type": "markdown", 31 | "metadata": { 32 | "id": "q7dhkh67Fy1s" 33 | }, 34 | "source": [ 35 | "# 4. Fonksiyonlar\n", 36 | "\n", 37 | "Fonksiyonlar çok önemli bir kavramdır ve tüm programlama dillerinde mevcutturlar. Fonksiyonlar, bir eylemi (kod bloğu) tanımlamamıza izin verir. Şimdiye kadar, Python tarafından sağlanan print, input, len vb. Gibi bazı yerleşik işlevleri kullanıyorduk. Şimdi bir tane oluşturma zamanı." 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "metadata": { 43 | "id": "2ZOXnE2aFy1s", 44 | "scrolled": true, 45 | "outputId": "a9117738-a8ea-416e-eee8-30a3e7a562d2" 46 | }, 47 | "source": [ 48 | "def blow_fire(): # Burası fonksiyonu tanımladığımız yer\n", 49 | " print('fire 🔥 🔥 🔥')\n", 50 | "\n", 51 | "blow_fire() # Burada fonksiyonu çağırmak için çağırıyoruz\n", 52 | "blow_fire() # İstediğimiz kadar çağırabiliriz\n" 53 | ], 54 | "execution_count": null, 55 | "outputs": [ 56 | { 57 | "output_type": "stream", 58 | "text": [ 59 | "fire 🔥 🔥 🔥\n", 60 | "fire 🔥 🔥 🔥\n" 61 | ], 62 | "name": "stdout" 63 | } 64 | ] 65 | }, 66 | { 67 | "cell_type": "markdown", 68 | "metadata": { 69 | "id": "_tiM_9YmFy1t" 70 | }, 71 | "source": [ 72 | "## 4.1 Argümanlar ve Parametreler (Arguments and Parameters)\n", 73 | "\n", 74 | "Yukarıdaki işlev biraz havalıydı, ancak bazı sınırlamaları da var. Yalnızca aynı eylemi gerçekleştirebilir. Daha genişletilebilir hale getirelim ve ona bazı veriler aktararak istediği gibi eylemler gerçekleştirmesini sağlayalım" 75 | ] 76 | }, 77 | { 78 | "cell_type": "code", 79 | "metadata": { 80 | "id": "e7t4WvcqFy1t", 81 | "outputId": "633cabc9-8e73-4fe3-917e-832f31ef99a7" 82 | }, 83 | "source": [ 84 | "def blower(name, emoji): # parameterler\n", 85 | " print(f'{name} {emoji} {emoji} {emoji}')\n", 86 | "\n", 87 | "blower('fire', '🔥') # argümanlar\n", 88 | "blower('water', '🌊')" 89 | ], 90 | "execution_count": null, 91 | "outputs": [ 92 | { 93 | "output_type": "stream", 94 | "text": [ 95 | "fire 🔥 🔥 🔥\n", 96 | "water 🌊 🌊 🌊\n" 97 | ], 98 | "name": "stdout" 99 | } 100 | ] 101 | }, 102 | { 103 | "cell_type": "markdown", 104 | "metadata": { 105 | "id": "8hchECTmFy1t" 106 | }, 107 | "source": [ 108 | "## 4.2 return\n", 109 | "\n", 110 | "return, Python'da bir işlevden bir değer döndürmek için kullanılan bir anahtar sözcüktür. İşlevleri daha kullanışlı hale getirmek için, bir ifadeyi değerlendirmeye dayalı olarak bir değer döndürmesi gerekir. Herhangi bir return ifadesi belirtilmezse veya return ifadesinin ifadesi bir veri türü olarak değerlendirilmezse, işlev None döndürür. \n", 111 | "\n", 112 | "return ifadesi işlevi sonlandırır ve işlevden çıkar." 113 | ] 114 | }, 115 | { 116 | "cell_type": "code", 117 | "metadata": { 118 | "id": "yqgevVejFy1t", 119 | "outputId": "2cffb420-a2f6-4e44-a7a8-d65bef711d40" 120 | }, 121 | "source": [ 122 | "def multiplier(num1, num2):\n", 123 | " return num1 * num2\n", 124 | "\n", 125 | "result = multiplier(2,3)\n", 126 | "print(result) # 6" 127 | ], 128 | "execution_count": null, 129 | "outputs": [ 130 | { 131 | "output_type": "stream", 132 | "text": [ 133 | "6\n" 134 | ], 135 | "name": "stdout" 136 | } 137 | ] 138 | }, 139 | { 140 | "cell_type": "markdown", 141 | "metadata": { 142 | "id": "BzOFS4ZJFy1u" 143 | }, 144 | "source": [ 145 | "Return ifadesini kullanarak havalı bir şeyler yapma zamanı." 146 | ] 147 | }, 148 | { 149 | "cell_type": "code", 150 | "metadata": { 151 | "id": "WMJNdqRZFy1u", 152 | "scrolled": true 153 | }, 154 | "source": [ 155 | "def sum(num1):\n", 156 | " def child(num2):\n", 157 | " return num1 + num2\n", 158 | " return child" 159 | ], 160 | "execution_count": null, 161 | "outputs": [] 162 | }, 163 | { 164 | "cell_type": "code", 165 | "metadata": { 166 | "id": "xgm7Qnz5Fy1u" 167 | }, 168 | "source": [ 169 | "add_10 = sum(10)" 170 | ], 171 | "execution_count": null, 172 | "outputs": [] 173 | }, 174 | { 175 | "cell_type": "code", 176 | "metadata": { 177 | "id": "apd521hBFy1u", 178 | "outputId": "4290ebb0-876c-4ced-e52e-32af29505407" 179 | }, 180 | "source": [ 181 | "print(add_10(20)) # 30 (Closure!!!)\n", 182 | "print(add_10(50)) # 60\n", 183 | "print(add_10(100)) # 110" 184 | ], 185 | "execution_count": null, 186 | "outputs": [ 187 | { 188 | "output_type": "stream", 189 | "text": [ 190 | "30\n", 191 | "60\n", 192 | "110\n" 193 | ], 194 | "name": "stdout" 195 | } 196 | ] 197 | }, 198 | { 199 | "cell_type": "markdown", 200 | "metadata": { 201 | "id": "qDFq1N_9Pr3R" 202 | }, 203 | "source": [ 204 | "### Ornekler" 205 | ] 206 | }, 207 | { 208 | "cell_type": "markdown", 209 | "metadata": { 210 | "id": "pqogNsBfP_g1" 211 | }, 212 | "source": [ 213 | "Tek return olan bir fonksiyon ornegi" 214 | ] 215 | }, 216 | { 217 | "cell_type": "code", 218 | "metadata": { 219 | "id": "NqTXF_8kPrsR" 220 | }, 221 | "source": [ 222 | "def summ(a, b):\n", 223 | " value = a + b\n", 224 | " return value" 225 | ], 226 | "execution_count": null, 227 | "outputs": [] 228 | }, 229 | { 230 | "cell_type": "code", 231 | "metadata": { 232 | "colab": { 233 | "base_uri": "https://localhost:8080/" 234 | }, 235 | "id": "_CAsffx0P1TI", 236 | "outputId": "6b277115-fa17-41a2-b43d-d359da22a440" 237 | }, 238 | "source": [ 239 | "sonuc = summ(6.0,7.5)\n", 240 | "print(sonuc)" 241 | ], 242 | "execution_count": null, 243 | "outputs": [ 244 | { 245 | "output_type": "stream", 246 | "text": [ 247 | "13.5\n" 248 | ], 249 | "name": "stdout" 250 | } 251 | ] 252 | }, 253 | { 254 | "cell_type": "markdown", 255 | "metadata": { 256 | "id": "qXT-QjaFQDFA" 257 | }, 258 | "source": [ 259 | "Fonksiyonlar birden fazla deger de dondurebilirler" 260 | ] 261 | }, 262 | { 263 | "cell_type": "code", 264 | "metadata": { 265 | "id": "2k7Fj3wDQGS9" 266 | }, 267 | "source": [ 268 | "def func(x,y):\n", 269 | " summ = x + y\n", 270 | " multip = x * y\n", 271 | " return (summ, multip)" 272 | ], 273 | "execution_count": null, 274 | "outputs": [] 275 | }, 276 | { 277 | "cell_type": "code", 278 | "metadata": { 279 | "colab": { 280 | "base_uri": "https://localhost:8080/" 281 | }, 282 | "id": "HMWmEGW2QJZq", 283 | "outputId": "e506f795-3bfa-4a6d-8d41-1bc83906a152" 284 | }, 285 | "source": [ 286 | "toplam, carpim = func(23,45)\n", 287 | "\n", 288 | "print(toplam, carpim)" 289 | ], 290 | "execution_count": null, 291 | "outputs": [ 292 | { 293 | "output_type": "stream", 294 | "text": [ 295 | "68 1035\n" 296 | ], 297 | "name": "stdout" 298 | } 299 | ] 300 | }, 301 | { 302 | "cell_type": "markdown", 303 | "metadata": { 304 | "id": "U1Ifuv5lQRTj" 305 | }, 306 | "source": [ 307 | "Fonksiyonlar kosullu ifadeler veya donguler ile de birlestirilebilir" 308 | ] 309 | }, 310 | { 311 | "cell_type": "code", 312 | "metadata": { 313 | "id": "1poo3uyCQUds" 314 | }, 315 | "source": [ 316 | "def func(x):\n", 317 | " if x > 0:\n", 318 | " return (\"Positive\")\n", 319 | "\n", 320 | " elif x < 0:\n", 321 | " return (\"Negative\")\n", 322 | " \n", 323 | " else:\n", 324 | " return (\"Zero\")" 325 | ], 326 | "execution_count": null, 327 | "outputs": [] 328 | }, 329 | { 330 | "cell_type": "code", 331 | "metadata": { 332 | "colab": { 333 | "base_uri": "https://localhost:8080/" 334 | }, 335 | "id": "vcqhsM0bQXtc", 336 | "outputId": "c2335250-f0fb-4970-eff8-61fd0c4b3a63" 337 | }, 338 | "source": [ 339 | "for i in [-2, 5, 6, 0, -4, -7]:\n", 340 | " print(func(i))\n" 341 | ], 342 | "execution_count": null, 343 | "outputs": [ 344 | { 345 | "output_type": "stream", 346 | "text": [ 347 | "Negative\n", 348 | "Positive\n", 349 | "Positive\n", 350 | "Zero\n", 351 | "Negative\n", 352 | "Negative\n" 353 | ], 354 | "name": "stdout" 355 | } 356 | ] 357 | }, 358 | { 359 | "cell_type": "markdown", 360 | "metadata": { 361 | "id": "BAEcEf-CQe3n" 362 | }, 363 | "source": [ 364 | "### Ornek Faktoriyel Hesaplama" 365 | ] 366 | }, 367 | { 368 | "cell_type": "code", 369 | "metadata": { 370 | "id": "1M6-P8KFQiJZ" 371 | }, 372 | "source": [ 373 | "#factorial calculation\n", 374 | "#0! = 1\n", 375 | "#1!= 1\n", 376 | "#2!= 2 * 1 =2\n", 377 | "#6! = 6 * 5* 4 *3 * 2 *1 = 720\n", 378 | "\n", 379 | "def factorial(num):\n", 380 | " \n", 381 | " factorial = 1\n", 382 | " if (num == 0 or num == 1):\n", 383 | " print(\"Factorial: \", factorial)\n", 384 | " \n", 385 | " else:\n", 386 | " while (num >= 1):\n", 387 | " factorial = factorial * num\n", 388 | " num -= 1\n", 389 | " \n", 390 | " print(\"Factorial: \", factorial)" 391 | ], 392 | "execution_count": null, 393 | "outputs": [] 394 | }, 395 | { 396 | "cell_type": "code", 397 | "metadata": { 398 | "colab": { 399 | "base_uri": "https://localhost:8080/" 400 | }, 401 | "id": "hyzTQkqrQmZR", 402 | "outputId": "e7bcefe7-910a-497c-9a02-55c31a4e73ab" 403 | }, 404 | "source": [ 405 | "factorial(5)" 406 | ], 407 | "execution_count": null, 408 | "outputs": [ 409 | { 410 | "output_type": "stream", 411 | "text": [ 412 | "Factorial: 120\n" 413 | ], 414 | "name": "stdout" 415 | } 416 | ] 417 | }, 418 | { 419 | "cell_type": "markdown", 420 | "metadata": { 421 | "id": "qyuq5dSOQsrR" 422 | }, 423 | "source": [ 424 | "Fonkisyonlarin icerisinde diger metodlar da kullanilabilir" 425 | ] 426 | }, 427 | { 428 | "cell_type": "code", 429 | "metadata": { 430 | "id": "erNMKGGKQvwj" 431 | }, 432 | "source": [ 433 | "def hello2(name, capLetter = False):\n", 434 | "\n", 435 | " if capLetter:\n", 436 | " print(\"Hello \" + name.upper())\n", 437 | " \n", 438 | " else:\n", 439 | " print(\"Hello \" + name)" 440 | ], 441 | "execution_count": null, 442 | "outputs": [] 443 | }, 444 | { 445 | "cell_type": "code", 446 | "metadata": { 447 | "colab": { 448 | "base_uri": "https://localhost:8080/" 449 | }, 450 | "id": "XmpF-rGuQzOn", 451 | "outputId": "5fe32b9e-003a-4c89-9748-5e104a5e0730" 452 | }, 453 | "source": [ 454 | "hello2(\"asli\")" 455 | ], 456 | "execution_count": null, 457 | "outputs": [ 458 | { 459 | "output_type": "stream", 460 | "text": [ 461 | "Hello asli\n" 462 | ], 463 | "name": "stdout" 464 | } 465 | ] 466 | }, 467 | { 468 | "cell_type": "code", 469 | "metadata": { 470 | "colab": { 471 | "base_uri": "https://localhost:8080/" 472 | }, 473 | "id": "6iONCcj3Q1Wb", 474 | "outputId": "d9b7b1d4-79bd-4d26-dcd3-0485254d119d" 475 | }, 476 | "source": [ 477 | "hello2(\"Asli\", capLetter= True)" 478 | ], 479 | "execution_count": null, 480 | "outputs": [ 481 | { 482 | "output_type": "stream", 483 | "text": [ 484 | "Hello ASLI\n" 485 | ], 486 | "name": "stdout" 487 | } 488 | ] 489 | }, 490 | { 491 | "cell_type": "markdown", 492 | "metadata": { 493 | "id": "sw36UHJtFy1u" 494 | }, 495 | "source": [ 496 | "## 4.3 Scope\n", 497 | "\n", 498 | "Basitçe anlatmak gerekirse **\"Hangi değişkenlere erişimim var?\"** Anlamına gelir. Bu, yorumlayıcının değişkenlerin kapsamını bulmak için kodu okurken sorduğu türden bir sorudur. Python'da değişkenlerin işlev kapsamı vardır, bu da bir işlev içinde tanımlanan değişkenlere işlevin dışından erişilemeyeceği anlamına gelir." 499 | ] 500 | }, 501 | { 502 | "cell_type": "code", 503 | "metadata": { 504 | "id": "ZslCONDuFy1u", 505 | "scrolled": true 506 | }, 507 | "source": [ 508 | "num = 1\n", 509 | "\n", 510 | "def confusing_function():\n", 511 | " \n", 512 | " num = 10\n", 513 | " return num" 514 | ], 515 | "execution_count": null, 516 | "outputs": [] 517 | }, 518 | { 519 | "cell_type": "code", 520 | "metadata": { 521 | "id": "x-QTA3lbFy1v", 522 | "outputId": "582fac13-906b-4356-d7a2-9c8a22d76b2f" 523 | }, 524 | "source": [ 525 | "print(num) # 1 => Global Scope\n", 526 | "print(confusing_function()) # 10 => Local Scope" 527 | ], 528 | "execution_count": null, 529 | "outputs": [ 530 | { 531 | "output_type": "stream", 532 | "text": [ 533 | "1\n", 534 | "10\n" 535 | ], 536 | "name": "stdout" 537 | } 538 | ] 539 | }, 540 | { 541 | "cell_type": "markdown", 542 | "metadata": { 543 | "id": "CWf35HmwFy1v" 544 | }, 545 | "source": [ 546 | "**Python yorumlayıcısının izlediği kapsam kuralları şunlardır:**\n", 547 | "\n", 548 | "- Yerel ile başlayın. Değişken mevcut mu? Ardından değeri alın. Değilse devam edin\n", 549 | "- Değişken, ana işlevin yerel kapsamında tanımlanmış mı? Varsa değeri getir, yoksa devam et\n", 550 | "- Değişken genel kapsamda mevcut mu? Varsa değeri getir, yoksa devam et\n", 551 | "- Değişken yerleşik bir işlev mi? Değeri getir, yoksa çıkışı" 552 | ] 553 | }, 554 | { 555 | "cell_type": "markdown", 556 | "metadata": { 557 | "id": "hqiueftBQ9Z_" 558 | }, 559 | "source": [ 560 | "### Lambda Fonksiyonlar" 561 | ] 562 | }, 563 | { 564 | "cell_type": "code", 565 | "metadata": { 566 | "colab": { 567 | "base_uri": "https://localhost:8080/" 568 | }, 569 | "id": "6TkphRWBQ-8M", 570 | "outputId": "52111f9f-951f-4a6d-913f-5473f29ded9b" 571 | }, 572 | "source": [ 573 | "#lambda function\n", 574 | "(lambda x: x + 1)(2)" 575 | ], 576 | "execution_count": null, 577 | "outputs": [ 578 | { 579 | "output_type": "execute_result", 580 | "data": { 581 | "text/plain": [ 582 | "3" 583 | ] 584 | }, 585 | "metadata": { 586 | "tags": [] 587 | }, 588 | "execution_count": 15 589 | } 590 | ] 591 | }, 592 | { 593 | "cell_type": "code", 594 | "metadata": { 595 | "colab": { 596 | "base_uri": "https://localhost:8080/", 597 | "height": 35 598 | }, 599 | "id": "L2x_LKm5RAMy", 600 | "outputId": "a5f8cf71-df93-4b8b-cda1-9bb2cc5fddaa" 601 | }, 602 | "source": [ 603 | "full_name = lambda first, last: f'Full name: {first.title()} {last.title()}'\n", 604 | "full_name('guido', 'van rossum')" 605 | ], 606 | "execution_count": null, 607 | "outputs": [ 608 | { 609 | "output_type": "execute_result", 610 | "data": { 611 | "application/vnd.google.colaboratory.intrinsic+json": { 612 | "type": "string" 613 | }, 614 | "text/plain": [ 615 | "'Full name: Guido Van Rossum'" 616 | ] 617 | }, 618 | "metadata": { 619 | "tags": [] 620 | }, 621 | "execution_count": 16 622 | } 623 | ] 624 | }, 625 | { 626 | "cell_type": "markdown", 627 | "metadata": { 628 | "id": "Hgq6Gt61Y-b4" 629 | }, 630 | "source": [ 631 | "## 4.4 Moduller" 632 | ] 633 | }, 634 | { 635 | "cell_type": "code", 636 | "metadata": { 637 | "id": "ZwhwBEdLY_HR" 638 | }, 639 | "source": [ 640 | "words = [\"artificial\",\"intelligence\",\"machine\",\"learning\",\"python\",\"programming\"]\n", 641 | "\n", 642 | "\n", 643 | "#from random import *\n", 644 | "import random as rnd\n", 645 | "\n", 646 | "def randomWord(words):\n", 647 | " index = rnd.randint(0, len(words)-1)\n", 648 | " return words[index]\n", 649 | " " 650 | ], 651 | "execution_count": null, 652 | "outputs": [] 653 | }, 654 | { 655 | "cell_type": "code", 656 | "metadata": { 657 | "id": "rg4WG8obZJAE" 658 | }, 659 | "source": [ 660 | "len(words)" 661 | ], 662 | "execution_count": null, 663 | "outputs": [] 664 | }, 665 | { 666 | "cell_type": "code", 667 | "metadata": { 668 | "id": "TSYLKfr3ZMEP" 669 | }, 670 | "source": [ 671 | "word = randomWord(words)\n", 672 | "print(word)" 673 | ], 674 | "execution_count": null, 675 | "outputs": [] 676 | }, 677 | { 678 | "cell_type": "markdown", 679 | "metadata": { 680 | "id": "3uarilP0ZOdQ" 681 | }, 682 | "source": [ 683 | "## 4.5 Metodlar" 684 | ] 685 | }, 686 | { 687 | "cell_type": "markdown", 688 | "metadata": { 689 | "id": "4JzGqpMwZT6n" 690 | }, 691 | "source": [ 692 | "## Metodlar\n", 693 | "\n", 694 | "Fonksiyonlar isimleri ile çağrılır, parametre içine alınabilir ve isteğe bağlı olarak elde edilen değer fonksiyonun dışında kullanılabilir.\n", 695 | "Yöntemler ayrıca adlarıyla da adlandırılırlar, birçok yönden işlevlere benzerler, ancak çağrı, bir String veya liste gibi bir nesne aracılığıyla gerçekleştirilir.\n", 696 | "\n", 697 | "object.methodName(parameter)" 698 | ] 699 | }, 700 | { 701 | "cell_type": "code", 702 | "metadata": { 703 | "id": "sUnXe_GVZeBx" 704 | }, 705 | "source": [ 706 | "s = input(\"Please enter a name: \")\n", 707 | "\n", 708 | "print(s.upper())" 709 | ], 710 | "execution_count": null, 711 | "outputs": [] 712 | }, 713 | { 714 | "cell_type": "markdown", 715 | "metadata": { 716 | "id": "jQJEl4kcZn1n" 717 | }, 718 | "source": [ 719 | "# Exceptions \n", 720 | "\n", 721 | "* Programmer Errors \n", 722 | "* Program Bugs \n", 723 | "* Exceptions" 724 | ] 725 | }, 726 | { 727 | "cell_type": "code", 728 | "metadata": { 729 | "id": "5d2l2YVgZoD4" 730 | }, 731 | "source": [ 732 | "# error example,SyntaxError.\n", 733 | "\n", 734 | "print \"Hello World!\" " 735 | ], 736 | "execution_count": null, 737 | "outputs": [] 738 | }, 739 | { 740 | "cell_type": "code", 741 | "metadata": { 742 | "id": "qnXbYAmjZreT" 743 | }, 744 | "source": [ 745 | "#bug example.\n", 746 | "\n", 747 | "num1 = input(\"Enter the first integer: \")\n", 748 | "num2 = input(\"Enter the second integer: \")\n", 749 | "\n", 750 | "print(num1, \"+\", num2, \"=\", num1 + num2)\n" 751 | ], 752 | "execution_count": null, 753 | "outputs": [] 754 | }, 755 | { 756 | "cell_type": "code", 757 | "metadata": { 758 | "id": "L2m33VggZtWn" 759 | }, 760 | "source": [ 761 | "# ZeroDivisionError.\n", 762 | "\n", 763 | "\n", 764 | "num3 = int(input(\"First integer: \"))\n", 765 | "num4 = int(input(\"Second integer: \"))\n", 766 | "\n", 767 | "print(num3, \"/\",num4, \"=\", num3/num4)" 768 | ], 769 | "execution_count": null, 770 | "outputs": [] 771 | }, 772 | { 773 | "cell_type": "markdown", 774 | "metadata": { 775 | "id": "Stcay0lvZtQL" 776 | }, 777 | "source": [ 778 | "## Exception Handling\n", 779 | "\n", 780 | "\n", 781 | "try:\n", 782 | "\n", 783 | "\n", 784 | "> the situations where we can get exceptions\n", 785 | "\n", 786 | "except \"Exception Name\":\n", 787 | "\n", 788 | "\n", 789 | "> the operations in case of exceptions\n", 790 | "\n", 791 | "\n", 792 | "\n" 793 | ] 794 | }, 795 | { 796 | "cell_type": "code", 797 | "metadata": { 798 | "id": "iWaawuLrZx74" 799 | }, 800 | "source": [ 801 | "x = \"Alan Turing\"\n", 802 | "\n", 803 | "int(x)" 804 | ], 805 | "execution_count": null, 806 | "outputs": [] 807 | }, 808 | { 809 | "cell_type": "code", 810 | "metadata": { 811 | "id": "MNQaIOpvZ2YM" 812 | }, 813 | "source": [ 814 | "try:\n", 815 | " int(x)\n", 816 | "\n", 817 | "except ValueError:\n", 818 | " print(\"Please enter an integer value!!!\")" 819 | ], 820 | "execution_count": null, 821 | "outputs": [] 822 | }, 823 | { 824 | "cell_type": "code", 825 | "metadata": { 826 | "id": "MM66D0IHZ2PJ" 827 | }, 828 | "source": [ 829 | "num3 = input(\"First integer: \")\n", 830 | "num4 = input(\"Second integer: \")\n", 831 | "\n", 832 | "try:\n", 833 | " num3_int = int(num3)\n", 834 | " num4_int = int(num4)\n", 835 | "\n", 836 | " print(num3_int, \"/\",num4_int, \"=\", num3_int/num4_int)\n", 837 | "\n", 838 | "except ValueError:\n", 839 | " print(\"Please enter an integer value!!!\")" 840 | ], 841 | "execution_count": null, 842 | "outputs": [] 843 | }, 844 | { 845 | "cell_type": "code", 846 | "metadata": { 847 | "id": "f4BaeeS1Z6r1" 848 | }, 849 | "source": [ 850 | "#exception handling in loop structure\n", 851 | "\n", 852 | "\n", 853 | "while True:\n", 854 | " num1 = input(\"First number: (Press q for quit the program): \")\n", 855 | "\n", 856 | " if num1 == \"q\":\n", 857 | " break\n", 858 | "\n", 859 | " num2 = input(\"Second number: \")\n", 860 | "\n", 861 | " try:\n", 862 | " num1_int = int(num1)\n", 863 | " num2_int = int(num2)\n", 864 | " print(num1_int, \"/\", num2_int, \"=\", num1_int / num2_int)\n", 865 | " except (ValueError, ZeroDivisionError):\n", 866 | " print(\"Error!\")\n", 867 | " print(\"Please try again!\")" 868 | ], 869 | "execution_count": null, 870 | "outputs": [] 871 | }, 872 | { 873 | "cell_type": "markdown", 874 | "metadata": { 875 | "id": "FVF48defGC69" 876 | }, 877 | "source": [ 878 | "### Proje: Sosyal Medya Hesap İşlemleri\n", 879 | "\n", 880 | "Giris_bilgileri adında Anahtar değeri = kullanıcı adı, Değeri = şifre olan bir sözlük oluşturun.\n", 881 | "\n", 882 | "Kullanıcıdan isim için bir girdi isteyin. Eğer sözlükte böyle bir isim varsa şifre isteyin yoksa \"Böyle bir kullanıcı bulunamadı yazdırın\". Girilen şifre ve isim doğruysa bir while döngü başlatın ve kullanıcıya bir menü yazdırın. \n", 883 | "\n", 884 | "menü = '''\n", 885 | " 1: Şifre Değiştir\n", 886 | " 2: Kullanıcı Adı Değiştir\n", 887 | " 3: Hesabı Sil\n", 888 | " q: Çıkış Yap\n", 889 | " '''\n", 890 | "while döngüsünde ilk olarak kullanıcıdan menüden bir seçim yapmasını isteyin.\n", 891 | "- Seçim 1 ise, kullanıcıdan girdi olarak 8 haneden uzun yeni bir şifre talep edin. Giriş bilgileri isimli sözlükte şifre(value) değerini yeni şifre ile değiştirin\n", 892 | "- Seçim 2 ise, kullanıcıdan girdi olarak yeni bir isim talep edin. Giriş bilgileri isimli sözlükte isim(key) değerini yeni isim ile değiştirin\n", 893 | "- Seçim 3 ise, giriş bilgileri isimli sözlükten giriş yapmış olan kullanıcıyı siliniz\n", 894 | "- Seçim q ise, while döngüsünü bitirip uygulamayı sonlandırınız" 895 | ] 896 | }, 897 | { 898 | "cell_type": "code", 899 | "metadata": { 900 | "id": "Bwc0GLZH_962" 901 | }, 902 | "source": [ 903 | "giris_bilgileri = {\"GlobalAIHub\":\"Global123\"}\n", 904 | "kullanici_adi = input(\"Kullanıcı Adı: \")\n", 905 | "girildi_mi = False\n", 906 | "if kullanici_adi in giris_bilgileri.keys():\n", 907 | " sifre = input(\"Şifre: \")\n", 908 | " if giris_bilgileri[kullanici_adi] == sifre:\n", 909 | " print(\"Giriş Başarılı\")\n", 910 | " girildi_mi = True\n", 911 | " else: print(\"Şifre Yanlış\")\n", 912 | "else:\n", 913 | " print(\"Böyle bir kullanıcı bulunamadı\")\n", 914 | "\n", 915 | "menu = '''\n", 916 | "1: Şifre Değiştir\n", 917 | "2: Kullanıcı Adı Değiştir\n", 918 | "3: Hesabı Sil\n", 919 | "q: Çıkış Yap\n", 920 | "'''\n", 921 | "while girildi_mi:\n", 922 | " print(menu)\n", 923 | " secim = input(\"Lütfen seçim yapınız: \")\n", 924 | " print(\"*\"*50)\n", 925 | "\n", 926 | " if secim == \"1\":\n", 927 | " yeni_sifre = input(\"\\nLütfen yeni şifrenizi giriniz: \")\n", 928 | " if len(yeni_sifre) >= 8:\n", 929 | " giris_bilgileri[kullanici_adi] = yeni_sifre\n", 930 | " print(f\"\\nYeni şifreniz {yeni_sifre} olarak değiştirildi!\")\n", 931 | " else: print(\"Şifre en az 8 haneli olmalıdır\")\n", 932 | "\n", 933 | " elif secim == \"2\":\n", 934 | " yeni_isim = input(\"\\nLütfen yeni kullanıcı adınızı giriniz: \")\n", 935 | " giris_bilgileri[yeni_isim] = giris_bilgileri[kullanici_adi]\n", 936 | " del giris_bilgileri[kullanici_adi]\n", 937 | " kullanici_adi = yeni_isim\n", 938 | " print(f\"\\nKullanıcı adınız {yeni_isim} olarak değiştirildi!\")\n", 939 | "\n", 940 | " elif secim == \"3\":\n", 941 | " del giris_bilgileri[silinecek_isim]\n", 942 | " print(\"Hesabınız başarılı bir şekilde silindi\")\n", 943 | "\n", 944 | " elif secim == \"q\":\n", 945 | " print(\"Görüşmek üzere...\")\n", 946 | " break # girildi_mi = False\n", 947 | "\n", 948 | " else:\n", 949 | " print(\"Hatalı bir seçim yaptınız. Lütfen tekrar deneyin\")" 950 | ], 951 | "execution_count": null, 952 | "outputs": [] 953 | }, 954 | { 955 | "cell_type": "markdown", 956 | "metadata": { 957 | "id": "spdXO3A_AZQO" 958 | }, 959 | "source": [ 960 | "### Proje: Rehber Uygulaması\n", 961 | "Rehber isimli bir global değişken oluşturun. \n", 962 | "Kişi ekle, kişi sil, isim güncelle, numara güncelle, rastgele kişi seç, kişileri görüntüle ve main olmak üzere 7 tane fonksiyon tanımlayın.\n", 963 | "- Kişi ekle: parametre olarak isim ve numara alsın ve eğer verilen isim rehberde yoksa anahtar = isim, değer = numara şeklinde bir değer eklesin eklesin\n", 964 | "- Kişi sil: parametre olarak bir isim alsın ve exception handling ile eğer isim rehberde varsa silsin, yoksa kullanıcıya bulanamadığına dair bir çıktı yazdırsın\n", 965 | "- İsim güncelle: eksi ve yeni isim olmak üzere iki tane parametre alsın eğer eski isim rehberde yoksa veya yeni isim rehberde varsa hata versin, eğer bir problem yoksa rehberdeki eski ismi yeni isim ile güncellesin \n", 966 | "- Numara güncelle: isim ve yeni numara olmak üzere iki tane parametre alsın, verilen ismin rehberde olup olmadığını kontrol etsin ve eğer varsa numarasını yeni numara ile güncellesin\n", 967 | "- Rastgele kişi seç: random.choice fonksiyonunu kullanarak rehberden bir isim seçsin ve seçilen ismi ve ona ait olan numarayı **döndürsün**.\n", 968 | "- Kişileri görüntüle: rehberdeki bütün kişilerin isimlerini ve numaralarını alt alta ve başlarında indeksler olacak şekilde yazdırsın.\n", 969 | "- Main: içerisinde bir while döngüsü oluşturun ve her turda menüyü yazdırın \n", 970 | "menu = '''\n", 971 | " _________________________\n", 972 | " | 1: Kişi ekle |\n", 973 | " | 2: Kişi Sil |\n", 974 | " | 3: İsim Güncelle |\n", 975 | " | 4: Numara Güncelle |\n", 976 | " | 5: Rastgele Kişi Seç | \n", 977 | " | 6: Kişileri Görüntüle |\n", 978 | " | q: Çıkış Yap |\n", 979 | " _________________________\n", 980 | " '''\n", 981 | " ardından kullanıcıdan girdi olarak bir işlem seçmesini isteyin. Seçilen işleme göre eğer gerekiyorsa fonksiyon parametrelerini de kullanıcıdan girdi olarak alın ve gerekli fonksiyonları çağırın. Kullanıcı eğer \"q\" değerini girerse döngüyü bitirin.\n", 982 | "\n", 983 | "Girdi alırken veya çıktı verirken kullanıcı ile olan etkileşimi istediğiniz gibi sağlayabilirsiniz ve menüye istediğiniz kadar farklı seçenekler ekleyebilirsiniz.\n", 984 | "\n", 985 | "En sonda main fonksiyonunu çağırarak uygulamayı başlatın ve test edin.\n", 986 | "\n" 987 | ] 988 | }, 989 | { 990 | "cell_type": "code", 991 | "metadata": { 992 | "id": "Gs7hMdvtAB8c" 993 | }, 994 | "source": [ 995 | "import random\n", 996 | "\n", 997 | "rehber = {}\n", 998 | "\n", 999 | "def kisi_ekle(isim, numara):\n", 1000 | " global rehber\n", 1001 | " if not isim in rehber.keys():\n", 1002 | " rehber[isim] = numara\n", 1003 | " print(\"Yeni kişi eklendi\")\n", 1004 | " else: print(\"Böyle Bir Kişi Var\")\n", 1005 | "\n", 1006 | "def kisi_sil(isim):\n", 1007 | " global rehber\n", 1008 | " try:\n", 1009 | " del rehber[isim]\n", 1010 | " print(\"Kişi Silindi\")\n", 1011 | " except KeyError:\n", 1012 | " print(\"Kişi Bulunamadı\")\n", 1013 | "\n", 1014 | "def isim_guncelle(isim, yeni_isim):\n", 1015 | " global rehber\n", 1016 | " if isim in rehber.keys():\n", 1017 | " if not yeni_isim in rehber.keys():\n", 1018 | " rehber[yeni_isim] = rehber[isim]\n", 1019 | " del rehber[isim]\n", 1020 | " print(\"İsim Güncellendi\")\n", 1021 | " else: print(\"Yeni İsimde Bir Kullanıcı Mevcut\")\n", 1022 | " else: print(\"Kişi Bulunamadı\")\n", 1023 | "\n", 1024 | "def numara_guncelle(isim,yeni_numara):\n", 1025 | " global rehber\n", 1026 | " if isim in rehber.keys():\n", 1027 | " rehber[isim] = yeni_numara\n", 1028 | " print(\"Numara Güncellendi\")\n", 1029 | " else: print(\"Kişi Bulunamadı\")\n", 1030 | "\n", 1031 | "def rastgele_kisi_sec():\n", 1032 | " isim = random.choice(list(rehber.keys()))\n", 1033 | " return isim, rehber[isim]\n", 1034 | "\n", 1035 | "def kisileri_goruntule():\n", 1036 | " global rehber\n", 1037 | " if not len(rehber) == 0:\n", 1038 | " print(\"Rehber:\\n\")\n", 1039 | " i = 1\n", 1040 | " for key,value in rehber.items():\n", 1041 | " print(f\"{i})\\n\\tİsim: {key}\\n\\tNumara: {value}\")\n", 1042 | " i += 1\n", 1043 | " return\n", 1044 | " print(\"Rehber Boş\")\n", 1045 | "\n", 1046 | "def main():\n", 1047 | " global rehber\n", 1048 | " menu = '''\n", 1049 | " _________________________\n", 1050 | " | 1: Kişi ekle |\n", 1051 | " | 2: Kişi Sil |\n", 1052 | " | 3: İsim Güncelle |\n", 1053 | " | 4: Numara Güncelle |\n", 1054 | " | 5: Rastgele Kişi Seç | \n", 1055 | " | 6: Kişileri Görüntüle |\n", 1056 | " | q: Çıkış Yap |\n", 1057 | " _________________________\n", 1058 | " '''\n", 1059 | " print(menu)\n", 1060 | " while True:\n", 1061 | " secim = input(\"Lütfen seçim yapınız: \")\n", 1062 | " print(\"*\"*50+\"\\n\")\n", 1063 | " if secim == \"1\":\n", 1064 | " isim = input(\"Yeni kişi ismi giriniz: \")\n", 1065 | " numara = input(\"Numarayı giriniz: \")\n", 1066 | " kisi_ekle(isim,numara)\n", 1067 | "\n", 1068 | " elif secim == \"2\":\n", 1069 | " isim = input(\"Silmek istediğiniz kişinin ismini giriniz: \")\n", 1070 | " kisi_sil(isim)\n", 1071 | "\n", 1072 | " elif secim == \"3\":\n", 1073 | " isim = input(\"Değiştirmek istediğiniz ismi giriniz: \")\n", 1074 | " yeni_isim = input(\"Yeni ismi giriniz: \")\n", 1075 | " isim_guncelle(isim,yeni_isim)\n", 1076 | "\n", 1077 | " elif secim == \"4\":\n", 1078 | " isim = input(\"Numarasını değiştirmek istediğiniz kişinin ismini giriniz: \")\n", 1079 | " yeni_numara = input(\"Yeni numarayı giriniz: \")\n", 1080 | " numara_guncelle(isim,yeni_numara)\n", 1081 | " \n", 1082 | " elif secim == \"5\":\n", 1083 | " isim, numara = rastgele_kisi_sec()\n", 1084 | " print(f\"\\n\\tİsim: {isim}\\n\\tNumara: {numara}\")\n", 1085 | " \n", 1086 | " elif secim == \"6\":\n", 1087 | " kisileri_goruntule()\n", 1088 | " \n", 1089 | " elif secim == \"q\":\n", 1090 | " break\n", 1091 | " \n", 1092 | " else: print(\"Geçersiz seçim yaptınız. Lütfen tekrar deneyiniz\")\n", 1093 | " print(menu)\n", 1094 | "\n", 1095 | "main()" 1096 | ], 1097 | "execution_count": null, 1098 | "outputs": [] 1099 | } 1100 | ] 1101 | } -------------------------------------------------------------------------------- /ENG Version/Module_2_Introduction_to_Python.ipynb: -------------------------------------------------------------------------------- 1 | {"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Module_2_Introduction_to_Python.ipynb","provenance":[],"collapsed_sections":[]},"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.5"}},"cells":[{"cell_type":"markdown","metadata":{"id":"UW-bYpQ3CLhW"},"source":["# 2. Conditions"]},{"cell_type":"markdown","metadata":{"id":"5tasFpjzCLhW"},"source":["## 2.1 Operators\n","\n","There are several operators in Python such as: \n","`not, >, <, ==, >=, <=, !=`"]},{"cell_type":"code","metadata":{"id":"DgwYNY8HZeJm"},"source":["a = 3 #assigning a value\n","a == 3 # comparing values\n","a != 3 #"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"iHtD9TRzCLhW","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632849312177,"user_tz":-180,"elapsed":4,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"620a3691-3e35-4028-ebba-401edecfa7be"},"source":["print(10 > 100) # False\n","print(10 < 100) # True\n","print(10 == 10) # True\n","print(10 != 50) # True\n","print(2 > 1 and 2 > 0) # True\n","print(not True) # False\n","print(not False) # True"],"execution_count":1,"outputs":[{"output_type":"stream","name":"stdout","text":["False\n","True\n","True\n","True\n","True\n","False\n","True\n"]}]},{"cell_type":"markdown","metadata":{"id":"dvM-V2jmCLhW"},"source":["## 2.2 Conditional Statements\n","\n","It is used to reason with certain conditions. If the condition is not met, the code in the else block is executed. The block inside a conditional expression is also indented."]},{"cell_type":"code","metadata":{"id":"aAMz7LG3Z-Qo"},"source":["# waterfall\n","print()\n","a=3\n","b=3\n","\n"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"j12VW33SaiSJ"},"source":["C#\n","Java\n","C\n","\n","if (hdsljfhdsf){\n"," hsjkh\n"," şdjskfkds\n"," şdsjfds\n"," \n","}"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"Ae8RQRDuaYHQ","executionInfo":{"status":"ok","timestamp":1632849649424,"user_tz":-180,"elapsed":3527,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"d4fcc96f-b555-4b3c-f36a-2e3243acc592"},"source":["age = int(input(\"Please enter your age\")) # 7\n","\n","if age >= 18:\n"," print(\"You can enter the club\")\n"," print(\"!\")\n","else:\n"," print(\"Sorry you have to wait to be an adult!\")"],"execution_count":3,"outputs":[{"output_type":"stream","name":"stdout","text":["Please enter your age18\n","You can enter the club\n","!\n"]}]},{"cell_type":"code","metadata":{"id":"waXmNuX4CLhW"},"source":["age = input('Please enter your age: ')\n","\n","if (int(age) >= 18):\n"," print('You can enter the club.')\n","else:\n"," print('Sorry you can''t enter the club!')"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"xtnpUwSlc2MW"},"source":["else if -> C# Java Python"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"9GJ19ZU5bM2A","executionInfo":{"status":"ok","timestamp":1632850167363,"user_tz":-180,"elapsed":2272,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"a18fc621-1969-4bce-977d-b9f75379637f"},"source":["# 0-20 : F. 21-50: E. 51-70: D. 71-85: C. 86-90: B. 91-100 : A\n","exam_score = int(input(\"Please enter your exam grades: \")) # 35\n","\n","if exam_score >= 0 and exam_score <=20:\n"," print(\"You got F!\")\n","elif exam_score >= 21 and exam_score <=50:\n"," print(\"You got E\")\n","elif exam_score >= 51 and exam_score <=70:\n"," print(\"You got D\")\n","elif exam_score >= 71 and exam_score <=85:\n"," print(\"You got C\")\n","elif exam_score >= 86 and exam_score <=90:\n"," print(\"You got B\")\n","elif exam_score >= 91 and exam_score <=100:\n"," print(\"You got A\")\n","else:\n"," print(\"Please enter a grade which is between 0 - 100\")"],"execution_count":9,"outputs":[{"output_type":"stream","name":"stdout","text":["Please enter your exam grades: 35\n","You got E\n"]}]},{"cell_type":"code","metadata":{"id":"30g7Xpc2CLhW"},"source":["exam_score = input('Enter your exam grade: ')\n","\n","if (int(exam_score) > 90):\n"," print('You''ve earned A+, congratulations!')\n","\n","elif (int(exam_score) > 80):\n"," print('You''ve earned A')\n","\n","else:\n"," print('You''ve earned B')"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"YmBdAXFICLhX"},"source":["is_adult = True\n","is_licensed = True\n","\n","if (is_adult and is_licensed):\n"," print('You are allowed to drive!')\n","\n","else:\n"," print('You are not allowed to drive!')"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"XC2WdG0BCv3m"},"source":["### Example"]},{"cell_type":"code","metadata":{"id":"r7zQczqGCzE6","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632850438754,"user_tz":-180,"elapsed":3841,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"6d7074be-56ab-4661-9bfa-dd39b2fa2c24"},"source":["print(\"**************ATM Enter Panel**************\")\n","\n","# Username password on database\n","db_username = \"Fethi\"\n","db_password = \"1234\"\n","\n","# Username and password retrieved from user\n","username = input(\"Please enter your username:\")\n","password = input(\"Please enter your password:\")\n","\n","# Program\n","if (username != db_username and password == db_password):\n"," print(\"Only, your username is incorrect\")\n","\n","elif (username == db_username and password != db_password):\n"," print(\"Only, your password is incorrect\")\n","\n","elif (username != db_username and password != db_password):\n"," print(\"Your username and password is incorrect!\")\n","\n","else:\n"," print(\"Access granted!\")"],"execution_count":13,"outputs":[{"output_type":"stream","name":"stdout","text":["**************ATM Enter Panel**************\n","Please enter your username:Fethi\n","Please enter your password:1234\n","Access granted!\n"]}]},{"cell_type":"markdown","metadata":{"id":"gmvgEgynDgfR"},"source":["### Nested If Statements"]},{"cell_type":"code","metadata":{"id":"tE_u8zCHDg29","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632850523010,"user_tz":-180,"elapsed":269,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"db893b6b-ee32-4d9f-da7f-0f9f24ce320b"},"source":["x = 10\n","\n","if x > 5:\n"," if x > 7:\n"," print(\"Bigger than 5 and 7\") "],"execution_count":15,"outputs":[{"output_type":"stream","name":"stdout","text":["Bigger than 5 and 7\n"]}]},{"cell_type":"markdown","metadata":{"id":"gDwccPO2_c0R"},"source":["### Question\n","\n","At a particular company, employees’ salaries are raised progressively, calculated using the following formula:\n","\n","salary = salary + salary x (raise percentage) \n","\n","Raises are predefined as given below, according to the current salary of the worker. For instance, if the worker’s current salary is less than or equal to 1000 TL, then its salary is increased 15%.\n","\n","\n","Range | Percentage\n","--- | ---\n","0 < salary ≤ 1000 | 15%\n","1000 < salary ≤ 2000 |10%\n","2000 < salary ≤ 3000| 5%\n","3000 < salary | 2.5%\n","\n","\n","Write a program that asks the user to enter his/her salary. Then your program should calculate and print the raised salary of the user.\n","\n","Some example program runs:\n","\n","Please enter your salary: 1000\n","\n","Your raised salary is 1150.0.\n","\n","Please enter your salary: 2500\n","\n","Your raised salary is 2625.0."]},{"cell_type":"markdown","metadata":{"id":"ZfMXLFHyFkDT"},"source":["### Answer"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"0ZUun08HsFx_","executionInfo":{"status":"ok","timestamp":1632854421329,"user_tz":-180,"elapsed":1996,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"f2233517-9cde-43fb-b454-aac244c4de8f"},"source":["salary = float(input(\"Please enter you salary:\"))\n","\n","if salary > 0 and salary <=1000:\n"," salary = salary + (salary * 0.15)\n"," print(f\"Your raised salary is :{salary}\")\n","elif salary >1000 and salary <=2000:\n"," salary = salary + (salary * 0.1)\n"," print(f\"Your raised salary is :{salary}\")\n","elif salary>2000 and salary <=3000:\n"," salary = salary + (salary * 0.05)\n"," print(f\"Your raised salary is :{salary}\")\n","elif salary> 3000:\n"," salary = salary + (salary * 0.025)\n"," print(f\"Your raised salary is :{salary}\")\n","else:\n"," print(\"Please enter a value greater than 0!\")"],"execution_count":87,"outputs":[{"output_type":"stream","name":"stdout","text":["Please enter you salary:2500\n","Your raised salary is :2625.0\n"]}]},{"cell_type":"code","metadata":{"id":"iXxyMx5KFj89"},"source":["salary = float(input(\"Please enter your salary: \"))\n","\n","if salary < 0:\n"," print(\"Invalid value\")\n","else:\n","\n"," if 0 < salary <= 1000:\n"," salary = salary + salary * 0.15\n"," elif salary <= 2000:\n"," salary = salary + salary * 0.1\n"," elif salary <= 3000:\n"," salary = salary + salary * 0.05\n"," else:\n"," salary = salary + salary * 0.025\n","\n"," print(\"Your raised salary is\", salary)"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"GWhbQW7aFy1h"},"source":["# 3. Loops\n","\n","Loops allow a block of code to be run multiple times."]},{"cell_type":"markdown","metadata":{"id":"4svV-k30Fy1k"},"source":["## 3.1 For Loop\n","\n","In Python, the basic loop form is a for loop, which can loop over a collection."]},{"cell_type":"code","metadata":{"id":"nQ78cVvQe0kt","executionInfo":{"status":"ok","timestamp":1632850702444,"user_tz":-180,"elapsed":279,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}}},"source":["l = [1, \"Fethi\", \"Python\", \"Taha\", 13]"],"execution_count":16,"outputs":[]},{"cell_type":"code","metadata":{"id":"0h2AOqY5fZhN"},"source":["[1, \"Fethi\", \"Python\", \"Taha\", 13]\n","elem = 1\n","elem = \"Fethi\"\n","elem = \"Python\"\n","elem = \"Taha\"\n","elem = 13"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"JZwkds7RfR2d","executionInfo":{"status":"ok","timestamp":1632850911743,"user_tz":-180,"elapsed":422,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"9610b010-cbb4-4f82-9ea6-953492029290"},"source":["for elem in l:\n"," print(elem * 3)"],"execution_count":21,"outputs":[{"output_type":"stream","name":"stdout","text":["3\n","FethiFethiFethi\n","PythonPythonPython\n","TahaTahaTaha\n","39\n"]}]},{"cell_type":"code","metadata":{"id":"4x4YfPKnFy1k","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632850885804,"user_tz":-180,"elapsed":312,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"cb64a26c-af76-45c2-cadd-4db9d99e2415"},"source":["for item in 'Python': # Can loop over string\n"," print(item) # Iterates all letters of string"],"execution_count":20,"outputs":[{"output_type":"stream","name":"stdout","text":["P\n","y\n","t\n","h\n","o\n","n\n"]}]},{"cell_type":"code","metadata":{"id":"pqLJHaSJFy1m"},"source":["for item in [1,2,3,4,5]: # Can loop through over collection\n"," print(item) # Iterates all elements of collections"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"JgRFb0NvFy1n","executionInfo":{"status":"ok","timestamp":1632850979485,"user_tz":-180,"elapsed":271,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}}},"source":["player = {\n"," 'firstname': 'Mert',\n"," 'lastname': 'Cobanov',\n"," 'role': 'captain'\n","}"],"execution_count":22,"outputs":[]},{"cell_type":"code","metadata":{"id":"28qQNr0xFy1n","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632850987238,"user_tz":-180,"elapsed":275,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"f7febbec-b4d4-404f-baf7-1507a4aefe87"},"source":["for item in player: # iterates over the keys of player\n"," print(item) # prints all keys"],"execution_count":23,"outputs":[{"output_type":"stream","name":"stdout","text":["firstname\n","lastname\n","role\n"]}]},{"cell_type":"code","metadata":{"id":"5S4aBBa4Fy1n","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632850998357,"user_tz":-180,"elapsed":269,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"052f8276-900a-464a-e798-4c8e3c90d098"},"source":["for item in player.keys(): \n"," print(item) # prints all keys"],"execution_count":24,"outputs":[{"output_type":"stream","name":"stdout","text":["firstname\n","lastname\n","role\n"]}]},{"cell_type":"code","metadata":{"id":"9mblj3EbFy1o","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632851007585,"user_tz":-180,"elapsed":332,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"3dad3285-bbf9-4360-98c9-b52492659eff"},"source":["for item in player.values():\n"," print(item) # prints all values"],"execution_count":25,"outputs":[{"output_type":"stream","name":"stdout","text":["Mert\n","Cobanov\n","captain\n"]}]},{"cell_type":"code","metadata":{"id":"t_bBC76uFy1o","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632851116398,"user_tz":-180,"elapsed":286,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"5dd51564-4c6c-4e41-bd42-fc8c073bdd5f"},"source":["for item in player.items():\n"," print(f\"{item[0]}: {item[1]}\") # prints key and value as tuple"],"execution_count":28,"outputs":[{"output_type":"stream","name":"stdout","text":["firstname: Mert\n","lastname: Cobanov\n","role: captain\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"duUozE2Mgz7e","executionInfo":{"status":"ok","timestamp":1632851183099,"user_tz":-180,"elapsed":258,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"148abab8-2b19-497e-dcbf-e1fa84ce1e8f"},"source":["for item in player.items():\n"," print(item) # prints key and value as tuple"],"execution_count":34,"outputs":[{"output_type":"stream","name":"stdout","text":["('firstname', 'Mert')\n","('lastname', 'Cobanov')\n","('role', 'captain')\n"]}]},{"cell_type":"code","metadata":{"id":"ChgPmKhWFy1o","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632851251179,"user_tz":-180,"elapsed":345,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"3d00535e-b550-4718-bbb0-c88fd0c38935"},"source":["for key, value in player.items():\n"," print(f\"{key}: {value}\") # prints key and value using unpacking"],"execution_count":35,"outputs":[{"output_type":"stream","name":"stdout","text":["firstname: Mert\n","lastname: Cobanov\n","role: captain\n"]}]},{"cell_type":"markdown","metadata":{"id":"5iyBPxjxFy1p"},"source":["### range\n","\n","range is an iterable object used to generate a range of numbers in Python. It is often used in loops and to create a list which is itearable."]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"wvaKdetBhUcv","executionInfo":{"status":"ok","timestamp":1632851334673,"user_tz":-180,"elapsed":373,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"0f1e7bae-c6d9-4881-e649-dee5d61e4ac6"},"source":["list(range(30))"],"execution_count":38,"outputs":[{"output_type":"execute_result","data":{"text/plain":["[0,\n"," 1,\n"," 2,\n"," 3,\n"," 4,\n"," 5,\n"," 6,\n"," 7,\n"," 8,\n"," 9,\n"," 10,\n"," 11,\n"," 12,\n"," 13,\n"," 14,\n"," 15,\n"," 16,\n"," 17,\n"," 18,\n"," 19,\n"," 20,\n"," 21,\n"," 22,\n"," 23,\n"," 24,\n"," 25,\n"," 26,\n"," 27,\n"," 28,\n"," 29]"]},"metadata":{},"execution_count":38}]},{"cell_type":"code","metadata":{"id":"LJ0jZ5dEFy1p","scrolled":true,"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632851433999,"user_tz":-180,"elapsed":288,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"38f5eb83-84a9-4275-ad66-72735de6c00d"},"source":["for item in range(10): # [0,1,2,3,4,5,6,7,8,9]\n"," print('python') # prints python 10 times"],"execution_count":39,"outputs":[{"output_type":"stream","name":"stdout","text":["python\n","python\n","python\n","python\n","python\n","python\n","python\n","python\n","python\n","python\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"27wICQ_rh6kC","executionInfo":{"status":"ok","timestamp":1632851477340,"user_tz":-180,"elapsed":4,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"0254c0ac-e1e0-412f-c0d4-5d759ec6d2b5"},"source":["list(range(10,30,3))"],"execution_count":42,"outputs":[{"output_type":"execute_result","data":{"text/plain":["[10, 13, 16, 19, 22, 25, 28]"]},"metadata":{},"execution_count":42}]},{"cell_type":"code","metadata":{"id":"VWx3nv5sFy1p"},"source":["for item in range(10):\n"," print('hello') # prints hello 10 times"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"oQORr_JiiSIV","executionInfo":{"status":"ok","timestamp":1632851537775,"user_tz":-180,"elapsed":265,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"1465a143-cf51-4d72-d7cb-0e7e593b5486"},"source":["list(range(0, 10, 2))"],"execution_count":44,"outputs":[{"output_type":"execute_result","data":{"text/plain":["[0, 2, 4, 6, 8]"]},"metadata":{},"execution_count":44}]},{"cell_type":"code","metadata":{"id":"0dJCTxBNFy1q","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632851591505,"user_tz":-180,"elapsed":3,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"9fb99d78-b8d0-4e6a-eeea-c7389920e479"},"source":["for item in range(0, 10, 2):\n"," print(f'{item}: hii') # prints hii 5 times "],"execution_count":45,"outputs":[{"output_type":"stream","name":"stdout","text":["0: hii\n","2: hii\n","4: hii\n","6: hii\n","8: hii\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"clzy6TpYiuOO","executionInfo":{"status":"ok","timestamp":1632851653823,"user_tz":-180,"elapsed":276,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"a09975b4-1600-44a1-a0d1-058b49640f0d"},"source":["list(range(10, 0, -1))"],"execution_count":47,"outputs":[{"output_type":"execute_result","data":{"text/plain":["[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]"]},"metadata":{},"execution_count":47}]},{"cell_type":"code","metadata":{"id":"fq9R9fSWFy1q","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632851645402,"user_tz":-180,"elapsed":306,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"928517da-38db-4204-a11e-f91c94589acf"},"source":["for item in range(10, 0, -1):\n"," print(item) # prints in reverse order"],"execution_count":46,"outputs":[{"output_type":"stream","name":"stdout","text":["10\n","9\n","8\n","7\n","6\n","5\n","4\n","3\n","2\n","1\n"]}]},{"cell_type":"code","metadata":{"id":"p3ZtMH61Fy1q"},"source":["print(list(range(10))) # generates a list of 10 items"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"DA-U5yc4Fy1q"},"source":["### enumerate\n","\n","enumerate, döngü sırasında yineleyicinin dizinine ihtiyacımız olduğunda kullanışlıdır."]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"3Ci-CfgfjH8g","executionInfo":{"status":"ok","timestamp":1632851759748,"user_tz":-180,"elapsed":301,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"5024e06f-94d5-4a13-96de-d7abfda4191c"},"source":["list(range(10))"],"execution_count":52,"outputs":[{"output_type":"execute_result","data":{"text/plain":["[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]"]},"metadata":{},"execution_count":52}]},{"cell_type":"code","metadata":{"id":"_dooUfDxFy1r","scrolled":true,"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632851796180,"user_tz":-180,"elapsed":276,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"ecdf8e84-8e47-4936-847e-6cac15174e88"},"source":["for key, value in enumerate(range(10)): # using unpacking techique \n"," print(f'key is {key} and value is {value}') # prints key and value at the same time"],"execution_count":53,"outputs":[{"output_type":"stream","name":"stdout","text":["key is 0 and value is 0\n","key is 1 and value is 1\n","key is 2 and value is 2\n","key is 3 and value is 3\n","key is 4 and value is 4\n","key is 5 and value is 5\n","key is 6 and value is 6\n","key is 7 and value is 7\n","key is 8 and value is 8\n","key is 9 and value is 9\n"]}]},{"cell_type":"code","metadata":{"id":"dXl9rdlrjD7G"},"source":["lst()"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"hYPL8TlGnAUB","executionInfo":{"status":"ok","timestamp":1632852802255,"user_tz":-180,"elapsed":292,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}}},"source":["l = [\"Fethi\", \"Taha\", \"Python\", \"Mert\", \"Ömer\", \"İrem\", \"Yağız\", \"Aysuda\"]"],"execution_count":54,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"cWWl98CAnH4Q","executionInfo":{"status":"ok","timestamp":1632852805505,"user_tz":-180,"elapsed":292,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"700eb642-4d4b-4d8f-cf04-210e61597370"},"source":["l"],"execution_count":55,"outputs":[{"output_type":"execute_result","data":{"text/plain":["['Fethi', 'Taha', 'Python', 'Mert', 'Ömer', 'İrem', 'Yağız', 'Aysuda']"]},"metadata":{},"execution_count":55}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"xbE_IXAYnJTH","executionInfo":{"status":"ok","timestamp":1632852815596,"user_tz":-180,"elapsed":281,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"f8953dba-6d9d-4cbe-98ec-e977e5dcd6a8"},"source":["list(enumerate(l))"],"execution_count":56,"outputs":[{"output_type":"execute_result","data":{"text/plain":["[(0, 'Fethi'),\n"," (1, 'Taha'),\n"," (2, 'Python'),\n"," (3, 'Mert'),\n"," (4, 'Ömer'),\n"," (5, 'İrem'),\n"," (6, 'Yağız'),\n"," (7, 'Aysuda')]"]},"metadata":{},"execution_count":56}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"9TI-z7SLi5Tm","executionInfo":{"status":"ok","timestamp":1632851700572,"user_tz":-180,"elapsed":294,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"f2b8d2e7-988a-47ed-ef24-979ff3f2e885"},"source":["list(enumerate(range(10)))"],"execution_count":50,"outputs":[{"output_type":"execute_result","data":{"text/plain":["[(0, 0),\n"," (1, 1),\n"," (2, 2),\n"," (3, 3),\n"," (4, 4),\n"," (5, 5),\n"," (6, 6),\n"," (7, 7),\n"," (8, 8),\n"," (9, 9)]"]},"metadata":{},"execution_count":50}]},{"cell_type":"markdown","metadata":{"id":"5zdhALFLFy1r"},"source":["## 3.2 While Loop\n","\n","While Loops are way of executing a block of code several times depending on a certain condition. We have to be a little careful when dealing with while loops to avoid creating an endless loop that will continue to run until we accidentally crash our systems!"]},{"cell_type":"markdown","metadata":{"id":"y7wGmxjLHIM0"},"source":["```python\n","hungry = True\n","\n","while(hungry): # This is always True, this means it prints endlessly until our system crashes!\n"," print('Give me something to eat!')\n","```"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"BE1IXZPToV4G","executionInfo":{"status":"ok","timestamp":1632853212443,"user_tz":-180,"elapsed":258,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"f27b4755-475e-43fb-f3ac-114eead5a7d9"},"source":["number_list = [1,2,3,4,5,6,7,8,9,10]\n","\n","for number in number_list:\n"," if number == 8:\n"," break\n"," print(number)"],"execution_count":59,"outputs":[{"output_type":"stream","name":"stdout","text":["1\n","2\n","3\n","4\n","5\n","6\n","7\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"v7Fcs9ptouuB","executionInfo":{"status":"ok","timestamp":1632853296225,"user_tz":-180,"elapsed":265,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"a11567fd-7069-49ac-b519-d31b95fce20c"},"source":["number_list = [1,2,3,4,5,6,7,8,9,10]\n","\n","for number in number_list:\n"," if number == 8:\n"," continue\n"," print(number)"],"execution_count":60,"outputs":[{"output_type":"stream","name":"stdout","text":["1\n","2\n","3\n","4\n","5\n","6\n","7\n","9\n","10\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"AAx5jDYhnebO","executionInfo":{"status":"ok","timestamp":1632853358262,"user_tz":-180,"elapsed":255,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"c5f510c0-3632-4985-964e-ba5cfd49c96c"},"source":["hungry = True\n","satisfaction = 0\n","\n","while hungry: # 9 < 10 -> 10 < 10 (X)\n"," satisfaction += 1\n"," print(f\"Eat apple! Apple count: {satisfaction}\")\n"," if satisfaction == 10:\n"," hungry = False\n","\n","print(\"I'm full\")"],"execution_count":61,"outputs":[{"output_type":"stream","name":"stdout","text":["Eat apple! Apple count: 1\n","Eat apple! Apple count: 2\n","Eat apple! Apple count: 3\n","Eat apple! Apple count: 4\n","Eat apple! Apple count: 5\n","Eat apple! Apple count: 6\n","Eat apple! Apple count: 7\n","Eat apple! Apple count: 8\n","Eat apple! Apple count: 9\n","Eat apple! Apple count: 10\n","I'm full\n"]}]},{"cell_type":"code","metadata":{"id":"a6jdRXjWp9uK","executionInfo":{"status":"ok","timestamp":1632853578476,"user_tz":-180,"elapsed":266,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}}},"source":["empty_tuple = ()"],"execution_count":62,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"wB2KV9SGqFlp","executionInfo":{"status":"ok","timestamp":1632853584216,"user_tz":-180,"elapsed":261,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"ceee844d-398c-4f90-e172-cf6f33b4c61c"},"source":["type(empty_tuple)"],"execution_count":63,"outputs":[{"output_type":"execute_result","data":{"text/plain":["tuple"]},"metadata":{},"execution_count":63}]},{"cell_type":"code","metadata":{"id":"Je927ShLqHEV","executionInfo":{"status":"ok","timestamp":1632853605072,"user_tz":-180,"elapsed":276,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}}},"source":["credentials = (\"mangatotti\",\"1234\")"],"execution_count":64,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"N1mfZsJfqL2e","executionInfo":{"status":"ok","timestamp":1632853608822,"user_tz":-180,"elapsed":349,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"6d8a99ac-0c37-493e-9e0f-7853f0c11c88"},"source":["credentials"],"execution_count":65,"outputs":[{"output_type":"execute_result","data":{"text/plain":["('mangatotti', '1234')"]},"metadata":{},"execution_count":65}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":167},"id":"z4OlV2SWqM9Z","executionInfo":{"status":"error","timestamp":1632853675616,"user_tz":-180,"elapsed":258,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"173c6ab2-112d-46b1-92f3-eddab852681d"},"source":["credentials[0] = \"Fethi\""],"execution_count":71,"outputs":[{"output_type":"error","ename":"TypeError","evalue":"ignored","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)","\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mcredentials\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"Fethi\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m","\u001b[0;31mTypeError\u001b[0m: 'tuple' object does not support item assignment"]}]},{"cell_type":"code","metadata":{"id":"IYl0KEIuqgZi","executionInfo":{"status":"ok","timestamp":1632853740756,"user_tz":-180,"elapsed":260,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}}},"source":["empty_set = set()"],"execution_count":74,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"Mn8z4V4Sqo-O","executionInfo":{"status":"ok","timestamp":1632853742135,"user_tz":-180,"elapsed":3,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"44dc6c00-1633-48f1-8fca-db1355f35f59"},"source":["type(empty_set)"],"execution_count":75,"outputs":[{"output_type":"execute_result","data":{"text/plain":["set"]},"metadata":{},"execution_count":75}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"kSW7csEMqt9D","executionInfo":{"status":"ok","timestamp":1632853755157,"user_tz":-180,"elapsed":2,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"60bf306b-9fa4-4052-f2f0-4e8937f10dca"},"source":["print(empty_set)"],"execution_count":76,"outputs":[{"output_type":"stream","name":"stdout","text":["set()\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"ivTQ1Afwqw-N","executionInfo":{"status":"ok","timestamp":1632853900659,"user_tz":-180,"elapsed":273,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"b039ef24-6495-4992-f39e-0c860ca93f4f"},"source":["my_set = {0,1,2,3,4,4,4,4,4,5,5,1,1,2,2,\"F\",\"e\",True,False}\n","print(my_set)"],"execution_count":79,"outputs":[{"output_type":"stream","name":"stdout","text":["{0, 1, 2, 3, 4, 5, 'F', 'e'}\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":167},"id":"GZSG9VForWbH","executionInfo":{"status":"error","timestamp":1632853919612,"user_tz":-180,"elapsed":271,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"f8694d83-60f8-49a3-8e32-cd1b651e1fb3"},"source":["my_set[0]"],"execution_count":80,"outputs":[{"output_type":"error","ename":"TypeError","evalue":"ignored","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)","\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmy_set\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m","\u001b[0;31mTypeError\u001b[0m: 'set' object is not subscriptable"]}]},{"cell_type":"code","metadata":{"id":"MX5fSox7rZRd","executionInfo":{"status":"ok","timestamp":1632853945789,"user_tz":-180,"elapsed":331,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}}},"source":["my_set.add(\"Taha\")"],"execution_count":83,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"fiS57BuWrfDX","executionInfo":{"status":"ok","timestamp":1632853950539,"user_tz":-180,"elapsed":319,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"3651771a-eca5-4290-ce12-f545fdaa5de2"},"source":["my_set"],"execution_count":84,"outputs":[{"output_type":"execute_result","data":{"text/plain":["{0, 1, 2, 3, 4, 5, 'F', 'Taha', 'e'}"]},"metadata":{},"execution_count":84}]},{"cell_type":"markdown","metadata":{"id":"sVfaEEqDFy1s"},"source":["## 3.3 Exercise\n","\n","Let's find the duplicate emails in an email list and print them."]},{"cell_type":"code","metadata":{"id":"qcFKc_pRFy1s","scrolled":true},"source":["email_list = ['roger@hey.com','michael@hey.com','roger@hey.com','prince@gmail.com']\n","duplicate_emails = []\n","\n","for email in email_list:\n"," if email_list.count(email) > 1 and email not in duplicate_emails:\n"," duplicate_emails.append(email)\n"," \n","print(duplicate_emails)"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"FVF48defGC69"},"source":["### Project: Social Media Account Operations\n","\n","Create a dictionary named login_info with Key = username, Value = password.\n","\n","Ask the user for a name input. If there is such a name in the dictionary, ask for a password, otherwise print \"No such user found\". If the entered password and name are correct, start a while loop and print a menu to the user.\n","\n","menu = \n","- 1: Change Password\n","- 2: Change Username\n","- 3: Delete Account\n","- q: Sign Out\n"," \n","\n","In the while loop, first ask the user to make a selection from the menu.\n","- If selection is 1, request a new password longer than 8 digits from the user as input. Change the password (value) value in the dictionary with the new password\n","- If the choice is 2, request a new name from the user as input. Change the name(key) value with the new name in the dictionary\n","- If the choice is 3, delete the logged in user from the dictionary\n","- If the selection is q, finish the while loop and terminate the application"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"G53ku-hitg9d","executionInfo":{"status":"ok","timestamp":1632855532348,"user_tz":-180,"elapsed":39297,"user":{"displayName":"Fethi Tekyaygil","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"07772244642227209435"}},"outputId":"492a6345-e105-4b99-c043-1a2788afcc3a"},"source":["login_information = {\"Fethi\":\"1234\"}\n","valid_credentials = False\n","\n","username = input(\"Plase enter your username:\")\n","\n","if username in login_information:\n"," password = input(\"Please enter your password: \")\n"," if login_information[username] == password:\n"," valid_credentials = True\n","\n","if valid_credentials == False:\n"," print(\"No such user found!\")\n","\n","choice = None\n","while valid_credentials and choice != \"q\":\n"," print(\"\"\"\n"," 1: Change Password\n"," 2: Change Username\n"," 3: Delete Account\n"," 4: See Dictionary\n"," q: Sign Out\n"," \"\"\")\n"," choice = input(\"Please enter your choice:\")\n","\n"," if choice == \"1\":\n"," while True:\n"," new_password = input(\"Please enter your new password (Your password must contain at least 8 characters): \")\n"," if len(new_password) >= 8:\n"," login_information[username] = new_password\n"," break\n"," \n"," if choice == \"2\":\n"," new_username = input(\"Please enter your new username: \")\n"," login_information[new_username] = login_information[username] # {\"Taha\":\"1234\", \"Fethi\":\"1234\"}\n"," del login_information[username]\n"," username = new_username\n","\n"," if choice == \"3\":\n"," del login_information[username]\n","\n"," if choice == \"4\":\n"," print(login_information)"],"execution_count":98,"outputs":[{"name":"stdout","output_type":"stream","text":["Plase enter your username:Fethi\n","Please enter your password: 1234\n","\n"," 1: Change Password\n"," 2: Change Username\n"," 3: Delete Account\n"," 4: See Dictionary\n"," q: Sign Out\n"," \n","Please enter your choice:2\n","Please enter your new usernameHüsnü\n","\n"," 1: Change Password\n"," 2: Change Username\n"," 3: Delete Account\n"," 4: See Dictionary\n"," q: Sign Out\n"," \n","Please enter your choice:4\n","{'Hüsnü': '1234'}\n","\n"," 1: Change Password\n"," 2: Change Username\n"," 3: Delete Account\n"," 4: See Dictionary\n"," q: Sign Out\n"," \n","Please enter your choice:3\n","\n"," 1: Change Password\n"," 2: Change Username\n"," 3: Delete Account\n"," 4: See Dictionary\n"," q: Sign Out\n"," \n","Please enter your choice:4\n","{}\n","\n"," 1: Change Password\n"," 2: Change Username\n"," 3: Delete Account\n"," 4: See Dictionary\n"," q: Sign Out\n"," \n","Please enter your choice:q\n"]}]},{"cell_type":"code","metadata":{"id":"Bwc0GLZH_962"},"source":["login_information = {\"GlobalAIHub\":\"Global123\"}\n","username = input(\"Username: \")\n","is_entered = False\n","if username in login_information.keys():\n"," password = input(\"Password: \")\n"," if login_information[username] == password:\n"," print(\"Access Granted\")\n"," is_entered = True\n"," else: print(\"Password is incorrect\")\n","else:\n"," print(\"No such user found\")\n","\n","menu = '''\n","1: Change Password\n","2: Change Username\n","3: Delete Account\n","q: Sign Out\n","'''\n","while is_entered:\n"," print(menu)\n"," choice = input(\"Please choose: \")\n"," print(\"*\"*50)\n","\n"," if choice == \"1\":\n"," new_password = input(\"\\nPlease enter your password: \")\n"," if len(new_password) >= 8:\n"," login_information[username] = new_password\n"," print(f\"\\nYour new password is: {new_password}\")\n"," else: print(\"Your password must contain at least 8 letters\")\n","\n"," elif choice == \"2\":\n"," new_username = input(\"\\nPlease enter your new username: \")\n"," login_information[new_username] = login_information[username]\n"," del giris_bilgileri[username]\n"," username = new_username\n"," print(f\"\\nYour username has been changed as: {yeni_isim} !\")\n","\n"," elif choice == \"3\":\n"," del login_information[username]\n"," print(\"Your account deleted successfully!\")\n","\n"," elif choice == \"q\":\n"," print(\"Goodbye...\")\n"," break\n","\n"," else:\n"," print(\"You have made incorrect selection. Please try again!\")"],"execution_count":null,"outputs":[]}]} -------------------------------------------------------------------------------- /TR Version/Module 1 - Introduction to Python.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "Module1 - Introduction to Python.ipynb", 7 | "provenance": [], 8 | "collapsed_sections": [] 9 | }, 10 | "kernelspec": { 11 | "display_name": "Python 3", 12 | "language": "python", 13 | "name": "python3" 14 | }, 15 | "language_info": { 16 | "codemirror_mode": { 17 | "name": "ipython", 18 | "version": 3 19 | }, 20 | "file_extension": ".py", 21 | "mimetype": "text/x-python", 22 | "name": "python", 23 | "nbconvert_exporter": "python", 24 | "pygments_lexer": "ipython3", 25 | "version": "3.9.5" 26 | } 27 | }, 28 | "cells": [ 29 | { 30 | "cell_type": "markdown", 31 | "metadata": { 32 | "id": "v39xHSNK9bZu" 33 | }, 34 | "source": [ 35 | "# 1. Veri Tipleri" 36 | ] 37 | }, 38 | { 39 | "cell_type": "markdown", 40 | "metadata": { 41 | "id": "rN2ZFfyu9bZx" 42 | }, 43 | "source": [ 44 | "Basitçe **Veri Tipleri**, Python'da değerleri temsil etmenin bir yoludur. Aşağıda listenene tipler Python'da en sık kullanılan veri tipleridir.\n", 45 | "\n", 46 | "- **int (sayıları temsil eder)**\n", 47 | "- **float (ondalıklı sayıları temsil eder)**\n", 48 | "- **str (yazıları temsil eder)**\n", 49 | "- **bool (bool değerleri temsil eder)**\n", 50 | "- **list**\n", 51 | "- **dict**\n", 52 | "- tuple\n", 53 | "- set\n", 54 | "- complex (not used very often)\n", 55 | "- None (to represent an absence of value)" 56 | ] 57 | }, 58 | { 59 | "cell_type": "markdown", 60 | "metadata": { 61 | "id": "fQnP14ir9bZy" 62 | }, 63 | "source": [ 64 | "## 1.1 Sayılar (Numbers)" 65 | ] 66 | }, 67 | { 68 | "cell_type": "markdown", 69 | "metadata": { 70 | "id": "nJF_q9m99bZy" 71 | }, 72 | "source": [ 73 | "Sayısal **3** veri tipi mevcuttur:\n", 74 | "\n", 75 | "- int (tam sayıları sınırsız boyutta depolar)\n", 76 | "- float (kayan noktalı gerçek sayı değerlerini depolar)\n", 77 | "- complex (kompleks sayıları depolar)" 78 | ] 79 | }, 80 | { 81 | "cell_type": "code", 82 | "metadata": { 83 | "id": "0VGXGIsv9bZy" 84 | }, 85 | "source": [ 86 | "num = 100 # değişken tanımlamak\n", 87 | "print(type(num)) # \n", 88 | "\n", 89 | "num2 = 99.99\n", 90 | "print(type(num2)) # \n", 91 | "\n", 92 | "expression1 = num * 10\n", 93 | "print(type(expression1)) # \n", 94 | "\n", 95 | "expression2 = num + num2\n", 96 | "print(type(expression2)) # " 97 | ], 98 | "execution_count": null, 99 | "outputs": [] 100 | }, 101 | { 102 | "cell_type": "markdown", 103 | "metadata": { 104 | "id": "5Nh5tyvn9bZz" 105 | }, 106 | "source": [ 107 | "### Matematiksel Fonksiyonlar\n", 108 | "\n", 109 | "Ilerleyen bolumlerde fonksiyonlar daha detayli anlatilacak fakat fonkisyonlari kullanmak oldukca basit!" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "metadata": { 115 | "id": "x_Rws9AV9bZ0" 116 | }, 117 | "source": [ 118 | "print(round(2.1)) # 2\n", 119 | "print(round(5.9)) # 6\n", 120 | "print(abs(-34)) # 34" 121 | ], 122 | "execution_count": null, 123 | "outputs": [] 124 | }, 125 | { 126 | "cell_type": "markdown", 127 | "metadata": { 128 | "id": "zj-hfpAb_j__" 129 | }, 130 | "source": [ 131 | "### Matematiksel Operatorler\n", 132 | "Pythonda integer degerler operatorler ile birlikte herhangi bir hesap makinesi gibi islem gorebilir" 133 | ] 134 | }, 135 | { 136 | "cell_type": "code", 137 | "metadata": { 138 | "colab": { 139 | "base_uri": "https://localhost:8080/" 140 | }, 141 | "id": "dQS7CgW4_uGe", 142 | "outputId": "dd715ae1-3950-4145-d533-feb49422d7fd" 143 | }, 144 | "source": [ 145 | "x = 10\n", 146 | "\n", 147 | "print(x+2) # Toplama\n", 148 | "print(x-2) # Cikarma\n", 149 | "print(x*2) # Carpma\n", 150 | "print(x/2) # Bolme\n", 151 | "\n", 152 | "print(x**2) # Ustel \n", 153 | "print(x//2) # Bolum\n", 154 | "print(x%2) # Kalan" 155 | ], 156 | "execution_count": null, 157 | "outputs": [ 158 | { 159 | "output_type": "stream", 160 | "text": [ 161 | "12\n", 162 | "8\n", 163 | "20\n", 164 | "5.0\n", 165 | "100\n", 166 | "5\n", 167 | "0\n" 168 | ], 169 | "name": "stdout" 170 | } 171 | ] 172 | }, 173 | { 174 | "cell_type": "markdown", 175 | "metadata": { 176 | "id": "aoq3caaE9bZ0" 177 | }, 178 | "source": [ 179 | "## 1.2 Değişkenler (Variables)" 180 | ] 181 | }, 182 | { 183 | "cell_type": "markdown", 184 | "metadata": { 185 | "id": "Wtw_GcGY9bZ0" 186 | }, 187 | "source": [ 188 | "Değişkenler değerleri depolar. Aşağıdakiler, Python'da adlandırma kurallarıdır:\n", 189 | "\n", 190 | "- Değişkenler bir harfle (tercihen küçük harfle) veya alt çizgiyle başlamalı ve ardından sayılar veya alt çizgi gelmelidir\n", 191 | "- Snake case, user_name gibi birden çok kelimeyle değişken yazmanın geleneksel yoludur.\n", 192 | "- Büyük / küçük harfe duyarlıdırlar\n", 193 | "- Anahtar kelimeler, anahtar kelimelerin (Python anahtar kelimeleri) üzerine yazılmamalıdır" 194 | ] 195 | }, 196 | { 197 | "cell_type": "markdown", 198 | "metadata": { 199 | "id": "yys74j7s9bZ1" 200 | }, 201 | "source": [ 202 | "## 1.3 Stringler (Strings)" 203 | ] 204 | }, 205 | { 206 | "cell_type": "code", 207 | "metadata": { 208 | "id": "MPOE8ktZ9bZ1" 209 | }, 210 | "source": [ 211 | "name = 'Python' # tek tırnak ile tanımlamak\n", 212 | "name2 = \"Python\" # çift tırnak ile tanımlamak\n", 213 | "name3 = '''Bu oldukça uzun bir stringdir.\n", 214 | " Bu şekilde birkaç satırda yazabiliriz''' # 3 tırnak işareti ile tanımlamak\n", 215 | "\n", 216 | "print(type(name)) # \n", 217 | "print(type(name2)) # \n", 218 | "print(type(name3)) # \n" 219 | ], 220 | "execution_count": null, 221 | "outputs": [] 222 | }, 223 | { 224 | "cell_type": "markdown", 225 | "metadata": { 226 | "id": "40JFnBWA9bZ1" 227 | }, 228 | "source": [ 229 | "### String Birleştirme (String Concatenation)" 230 | ] 231 | }, 232 | { 233 | "cell_type": "code", 234 | "metadata": { 235 | "id": "placDrPV9bZ2" 236 | }, 237 | "source": [ 238 | "first_name = 'Mert'\n", 239 | "last_name = 'Cobanov'\n", 240 | "print(first_name + ' ' + last_name) # Mert Cobanov" 241 | ], 242 | "execution_count": null, 243 | "outputs": [] 244 | }, 245 | { 246 | "cell_type": "markdown", 247 | "metadata": { 248 | "id": "6FsypqI09bZ2" 249 | }, 250 | "source": [ 251 | "### Veri Tipi Dönüşümleri (Type Conversion)" 252 | ] 253 | }, 254 | { 255 | "cell_type": "code", 256 | "metadata": { 257 | "id": "-I2aVf529bZ2" 258 | }, 259 | "source": [ 260 | "user_name = 'Mert'\n", 261 | "age = 25\n", 262 | "print(user_name + age)" 263 | ], 264 | "execution_count": null, 265 | "outputs": [] 266 | }, 267 | { 268 | "cell_type": "code", 269 | "metadata": { 270 | "id": "_R5HMewG9bZ2" 271 | }, 272 | "source": [ 273 | "user_name = 'Mert'\n", 274 | "age = 25\n", 275 | "print(user_name + str(age)) # Mert40\n", 276 | "print(type(str(age))) # " 277 | ], 278 | "execution_count": null, 279 | "outputs": [] 280 | }, 281 | { 282 | "cell_type": "code", 283 | "metadata": { 284 | "id": "jLBxrbDL9bZ2" 285 | }, 286 | "source": [ 287 | "lucky_number = 7\n", 288 | "lucky_number_stringified = str(7)\n", 289 | "lucky_number_extracted = int(lucky_number_stringified)\n", 290 | "print(lucky_number_extracted) # 7" 291 | ], 292 | "execution_count": null, 293 | "outputs": [] 294 | }, 295 | { 296 | "cell_type": "markdown", 297 | "metadata": { 298 | "id": "BQfrwyvq9bZ3" 299 | }, 300 | "source": [ 301 | "### String Biçimlendirme (Formatted String)\n", 302 | "\n", 303 | "String biçimlendirme, string içeriğini dinamik olarak güncellememize izin veren bir özelliktir. Bir sunucudan alınan kullanıcı bilgilerimiz olduğunu ve buna dayalı olarak özel bir mesaj görüntülemek istediğimizi varsayalım. İlk fikir, string biçimlendirme uygulamaktır." 304 | ] 305 | }, 306 | { 307 | "cell_type": "code", 308 | "metadata": { 309 | "colab": { 310 | "base_uri": "https://localhost:8080/" 311 | }, 312 | "id": "plgL_7b39bZ3", 313 | "outputId": "48a3d872-4693-4d89-9c52-83e850fd3e68" 314 | }, 315 | "source": [ 316 | "first_name = 'Mert'\n", 317 | "last_name = 'Cobanov'\n", 318 | "welcome_message = \"Hoşgeldin\" + \" \" + first_name + \" \" + last_name\n", 319 | "\n", 320 | "print(welcome_message) # Welcome Mert Cobanov" 321 | ], 322 | "execution_count": null, 323 | "outputs": [ 324 | { 325 | "output_type": "stream", 326 | "text": [ 327 | "Hoşgeldin Mert Cobanov\n" 328 | ], 329 | "name": "stdout" 330 | } 331 | ] 332 | }, 333 | { 334 | "cell_type": "code", 335 | "metadata": { 336 | "colab": { 337 | "base_uri": "https://localhost:8080/" 338 | }, 339 | "id": "UV2ec1Ax9bZ3", 340 | "outputId": "dd0d603e-cfc7-4880-b9be-72ce7b5a5037" 341 | }, 342 | "source": [ 343 | "first_name = 'Mert'\n", 344 | "last_name = 'Cobanov'\n", 345 | "welcome_message = f'Hoşgeldin {first_name} {last_name}'\n", 346 | "print(welcome_message) # Hoşgeldin Mert Cobanov" 347 | ], 348 | "execution_count": null, 349 | "outputs": [ 350 | { 351 | "output_type": "stream", 352 | "text": [ 353 | "Hoşgeldin Mert Cobanov\n" 354 | ], 355 | "name": "stdout" 356 | } 357 | ] 358 | }, 359 | { 360 | "cell_type": "markdown", 361 | "metadata": { 362 | "id": "d5_gZQX79bZ3" 363 | }, 364 | "source": [ 365 | "### String Indeksleri (String Indexes)\n", 366 | "\n", 367 | "Python'daki dizeler basitçe sıralı karakter koleksiyonudur. Böylece onunla birçok harika numara yapabiliriz. Bir dizenin karakterlerine erişebilir, bir alt dizeyi seçebilir, bir dizeyi tersine çevirebilir ve çok daha fazlasını yapabiliriz. Aynı zamanda sicim dilimleme olarak da adlandırılır." 368 | ] 369 | }, 370 | { 371 | "cell_type": "code", 372 | "metadata": { 373 | "id": "idzZqBUa9bZ4" 374 | }, 375 | "source": [ 376 | "language = 'python'\n", 377 | "first_character = language[0] # indexing starts from 0\n", 378 | "second_character = language[1]\n", 379 | "print(first_character) # p\n", 380 | "print(second_character) # y" 381 | ], 382 | "execution_count": null, 383 | "outputs": [] 384 | }, 385 | { 386 | "cell_type": "code", 387 | "metadata": { 388 | "id": "0F7as7fF9bZ4" 389 | }, 390 | "source": [ 391 | "# Strings can be manipulated easily with this syntax [start:stop:step-over]\n", 392 | "\n", 393 | "range_1 = language[0:2] # here it starts from index 0 and ends at index 1\n", 394 | "range_2 = language[0::1] # starts at 0, stops at end with step over 1 \n", 395 | "range_3 = language[::2] # starts at 0, till end with step 2\n", 396 | "range_4 = language[1:] # starts at index 1 till end of string\n", 397 | "range_5 = language[-1] # selects last character\n", 398 | "range_6 = language[-2] # second last character\n", 399 | "reverse_string = language[::-1] # starts from end and reverses the string\n", 400 | "reverse_string_2 = language[::-2] # reverses string and skips 1 character\n", 401 | "\n", 402 | "print(range_1) # py\n", 403 | "print(range_2) # python\n", 404 | "print(range_3) # pto\n", 405 | "print(range_4) # ython\n", 406 | "print(range_5) # n\n", 407 | "print(range_6) # o\n", 408 | "print(reverse_string) # nohtyp\n", 409 | "print(reverse_string_2) # nhy" 410 | ], 411 | "execution_count": null, 412 | "outputs": [] 413 | }, 414 | { 415 | "cell_type": "markdown", 416 | "metadata": { 417 | "id": "Rg3wjuUC9baA" 418 | }, 419 | "source": [ 420 | "## 1.4 Mantiksal Operatorler ve Boolean\n", 421 | "\n", 422 | "Booleanlar python'da bool olarak temsil edilir ve True veya False depolar." 423 | ] 424 | }, 425 | { 426 | "cell_type": "code", 427 | "metadata": { 428 | "id": "TI6EaOu09baA", 429 | "scrolled": true 430 | }, 431 | "source": [ 432 | "iyi_mi = True\n", 433 | "kirli_mi = False" 434 | ], 435 | "execution_count": null, 436 | "outputs": [] 437 | }, 438 | { 439 | "cell_type": "code", 440 | "metadata": { 441 | "id": "XxJaXA1v9baA", 442 | "outputId": "6f416b58-f4e9-49bc-8640-5c1d88d61653" 443 | }, 444 | "source": [ 445 | "print(10 > 9) # True " 446 | ], 447 | "execution_count": null, 448 | "outputs": [ 449 | { 450 | "output_type": "stream", 451 | "text": [ 452 | "True\n" 453 | ], 454 | "name": "stdout" 455 | } 456 | ] 457 | }, 458 | { 459 | "cell_type": "markdown", 460 | "metadata": { 461 | "id": "x9gOH1WdA6yN" 462 | }, 463 | "source": [ 464 | "![image.png](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA5sAAAFPCAYAAADDW9oAAAAgAElEQVR4Ae29z48b15mvzz+D2wa0EeCFtVMDdyMCWliAFyGgxTTghdDIQmh4YTS8MBraCIQXjYYXQmMQJEQvjLDv2DdU5trDxown1ORaCXsSJ1QSe7onEC47iW4ufW8D4Xyj2LStzH2/qGb9OHV46gfZRfJU1WNA7qpi8dRbz/upw/M5depURfgPAhCAAAQgAAEIQAACEIAABCCQMYFKxuVRHAQgAAEIQAACEIAABCAAAQhAQDCbiAACEIAABCAAAQhAAAIQgAAEMieA2cwcKQVCAAIQgAAEIAABCEAAAhCAAGYTDUAAAhCAAAQgAAEIQAACEIBA5gQwm5kjpUAIQAACEIAABCAAAQhAAAIQwGyiAQhAAAIQgAAEIAABCEAAAhDInABmM3OkFAgBCEAAAhCAAAQgAAEIQAACmE00AAEIQAACEIAABCAAAQhAAAKZE8BsZo6UAiEAAQhAAAIQgAAEIAABCEAAs4kGIAABCEAAAhCAAAQgAAEIQCBzApjNzJFSIAQgAAEIQAACEIAABCAAAQhgNtEABCAAAQhAAAIQgAAEIAABCGROALOZOVIKhAAEIAABCEAAAhCAAAQgAAHMJhqAAAQgAAEIQAACEIAABCAAgcwJYDYzR0qBEIAABCAAAQhAAAIQgAAEIIDZRAM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hAAAIQKCEBzGYJk84pQwACEIAABCAAAQhAAAIQWDQBzOaiCVM+BCAAAQhAAAIQgAAEIACBEhLAbJYw6ZwyBCAAAQhAAAIQgAAEIACBRRPAbC6aMOVDAAIQgAAEIAABCEAAAhAoIQHMZgmTzilDAAIQgAAEIAABCEAAAhBYNAHM5qIJUz4EIAABCEAAAhCAAAQgAIESEsBsljDpnDIEIAABCEAAAhCAAAQgAIFFE8BsLpow5UMAAhCAAAQgAAEIQAACECghAcxmCZPOKUMAAhCAAAQgAAEIQAACEFg0AczmoglTPgQgAAEIQAACEIAABCAAgRISwGyWMOmcMgQgAAEIQAACEIAABCAAgUUTwGwumjDlQwACEIAABCAAAQhAAAIQKCEBzGYJk84pQwACEIAABCAAAQhAAAIQWDQBzOaiCVM+BCAAAQhAAAIQgAAEIACBEhLAbJYw6ZwyBCAAAQhAAAIQgAAEIACBRRPAbC6aMOVDAAIQgAAEIAABCEAAAhAoIQHMZgmTzilDAAIQgAAEIAABCEAAAhBYNAHM5qIJUz4EIAABCEAAAhCAAAQgAIESEsBsljDpnDIEIAABCEAAAhCAAAQgAIFFE8BsLpow5UMAAhCAAAQgAAEIQAACECghAcxmCZPOKUMAAhCAAAQgAAEIQAACEFg0AczmoglTPgQgAAEIQAACEIAABCAAgRISwGyWMOmcMgQgAAEIQAACEIAABCAAgUUT+P8BZXrxh4ZJQbkAAAAASUVORK5CYII=)" 465 | ] 466 | }, 467 | { 468 | "cell_type": "code", 469 | "metadata": { 470 | "colab": { 471 | "base_uri": "https://localhost:8080/" 472 | }, 473 | "id": "LnRCz23QBJJj", 474 | "outputId": "6ad53313-f862-4b22-b113-12b4ac550cfb" 475 | }, 476 | "source": [ 477 | "print(True or False)\n", 478 | "print(True and False)\n", 479 | "print(not True)" 480 | ], 481 | "execution_count": null, 482 | "outputs": [ 483 | { 484 | "output_type": "stream", 485 | "text": [ 486 | "True\n", 487 | "False\n", 488 | "False\n" 489 | ], 490 | "name": "stdout" 491 | } 492 | ] 493 | }, 494 | { 495 | "cell_type": "code", 496 | "metadata": { 497 | "colab": { 498 | "base_uri": "https://localhost:8080/" 499 | }, 500 | "id": "9KVxD0QgBUI4", 501 | "outputId": "78139c3e-6d45-426c-c04a-2d6f878a1298" 502 | }, 503 | "source": [ 504 | "isim = 'Mert'\n", 505 | "soyad = 'Cobanoglu'\n", 506 | "print(isim == soyad)" 507 | ], 508 | "execution_count": null, 509 | "outputs": [ 510 | { 511 | "output_type": "stream", 512 | "text": [ 513 | "False\n" 514 | ], 515 | "name": "stdout" 516 | } 517 | ] 518 | }, 519 | { 520 | "cell_type": "markdown", 521 | "metadata": { 522 | "id": "_4Y924uu9bZ4" 523 | }, 524 | "source": [ 525 | "## 1.5 Listeler (Lists)\n", 526 | "\n", 527 | "Listeler önemli bir veri türüdür. Organize bir nesne koleksiyonudur. Aynı zamanda, verileri farklı amaçlar için belirli bir biçimde düzenleyen bir kap anlamına gelen bir veri yapısıdır. `[]` İle gösterilirler. Aynı veya farklı veri türlerini birlikte depolamak için kullanılabilirler." 528 | ] 529 | }, 530 | { 531 | "cell_type": "code", 532 | "metadata": { 533 | "id": "2y619V4K9bZ4", 534 | "outputId": "ac710ff6-1eae-4c42-f66d-317320f874e9" 535 | }, 536 | "source": [ 537 | "favorite_languages = ['javascript', 'python', 'typescript']\n", 538 | "shopping_cart_items = ['kalem','diş fırçası', 'kolonya', 'silgi']\n", 539 | "random_things = ['futbol', 123, True, 'yazılımcı', 777]\n", 540 | "\n", 541 | "first_item = shopping_cart_items[0]\n", 542 | "print(first_item) # 'kalem'" 543 | ], 544 | "execution_count": null, 545 | "outputs": [ 546 | { 547 | "output_type": "stream", 548 | "text": [ 549 | "kalem\n" 550 | ], 551 | "name": "stdout" 552 | } 553 | ] 554 | }, 555 | { 556 | "cell_type": "markdown", 557 | "metadata": { 558 | "id": "RSNx7WZz9bZ6" 559 | }, 560 | "source": [ 561 | "### Listelerin Dilimlenmesi (List Slicing)\n", 562 | "\n", 563 | "Stringlere benzer şekilde, listeler de dilimlenebilir. Bununla birlikte, stringlerden farklı olarak listeler değiştirilebilir, bu da verilerinin değiştirilebileceği anlamına gelir." 564 | ] 565 | }, 566 | { 567 | "cell_type": "code", 568 | "metadata": { 569 | "id": "F6eVxUOU9bZ6", 570 | "scrolled": true, 571 | "outputId": "40c3eb56-00d1-4e49-df7d-471b2cae6a4a" 572 | }, 573 | "source": [ 574 | "soccer_stars = ['ronaldo', 'messi','ibrahimovic','zidane','beckham']\n", 575 | "soccer_stars[0] = 'suarez'\n", 576 | "print(soccer_stars) # ['suarez', 'messi','ibrahimovic','zidane','beckham']" 577 | ], 578 | "execution_count": null, 579 | "outputs": [ 580 | { 581 | "output_type": "stream", 582 | "text": [ 583 | "['suarez', 'messi', 'ibrahimovic', 'zidane', 'beckham']\n" 584 | ], 585 | "name": "stdout" 586 | } 587 | ] 588 | }, 589 | { 590 | "cell_type": "code", 591 | "metadata": { 592 | "id": "mZE0HWka9bZ6", 593 | "outputId": "a4ad83ea-2e88-48cb-bb0a-77e02c9a52a3" 594 | }, 595 | "source": [ 596 | "range = soccer_stars[0:3]\n", 597 | "print(range) # ['suarez', 'messi', 'ibrahimovic']\n", 598 | "print(soccer_stars) # ['suarez', 'messi','ibrahimovic','zidane','beckham']" 599 | ], 600 | "execution_count": null, 601 | "outputs": [ 602 | { 603 | "output_type": "stream", 604 | "text": [ 605 | "['suarez', 'messi', 'ibrahimovic']\n", 606 | "['suarez', 'messi', 'ibrahimovic', 'zidane', 'beckham']\n" 607 | ], 608 | "name": "stdout" 609 | } 610 | ] 611 | }, 612 | { 613 | "cell_type": "code", 614 | "metadata": { 615 | "id": "0XV3CN2n9bZ6", 616 | "outputId": "b416463c-969a-4b99-cd24-bc307b2a966b" 617 | }, 618 | "source": [ 619 | "clone = soccer_stars[:] # listeyi kopyalar.\n", 620 | "print(clone) # ['suarez', 'messi','ibrahimovic','zidane','beckham']" 621 | ], 622 | "execution_count": null, 623 | "outputs": [ 624 | { 625 | "output_type": "stream", 626 | "text": [ 627 | "['suarez', 'messi', 'ibrahimovic', 'zidane', 'beckham']\n" 628 | ], 629 | "name": "stdout" 630 | } 631 | ] 632 | }, 633 | { 634 | "cell_type": "code", 635 | "metadata": { 636 | "id": "-MaCifvG9bZ7", 637 | "outputId": "8ca096c4-939e-464d-dcc9-d9843dfa0995" 638 | }, 639 | "source": [ 640 | "reverse_order = soccer_stars[::-1] # listenin sırasını tersine çevirir\n", 641 | "print(reverse_order) # ['beckham', 'zidane', 'ibrahimovic', 'messi', 'suarez']" 642 | ], 643 | "execution_count": null, 644 | "outputs": [ 645 | { 646 | "output_type": "stream", 647 | "text": [ 648 | "['beckham', 'zidane', 'ibrahimovic', 'messi', 'suarez']\n" 649 | ], 650 | "name": "stdout" 651 | } 652 | ] 653 | }, 654 | { 655 | "cell_type": "markdown", 656 | "metadata": { 657 | "id": "5ib68fhT9bZ7" 658 | }, 659 | "source": [ 660 | "### Listelere eleman eklenmesi (append, insert, extend)" 661 | ] 662 | }, 663 | { 664 | "cell_type": "code", 665 | "metadata": { 666 | "id": "KNgxR3JA9bZ7", 667 | "scrolled": true, 668 | "outputId": "4e70cc1a-2c0a-4d24-d0b9-4beb0d813ac5" 669 | }, 670 | "source": [ 671 | "# Append\n", 672 | "\n", 673 | "scores = [44,48,55,89,34]\n", 674 | "scores.append(100) # elemanları listenin sonuna ekler\n", 675 | "print(scores) # [44, 48, 55, 89, 34, 100]" 676 | ], 677 | "execution_count": null, 678 | "outputs": [ 679 | { 680 | "output_type": "stream", 681 | "text": [ 682 | "[44, 48, 55, 89, 34, 100]\n" 683 | ], 684 | "name": "stdout" 685 | } 686 | ] 687 | }, 688 | { 689 | "cell_type": "code", 690 | "metadata": { 691 | "id": "eGHwU4lV9bZ7", 692 | "outputId": "cdf7788e-832d-4b04-e402-eaf1c248da9c" 693 | }, 694 | "source": [ 695 | "# Insert\n", 696 | "\n", 697 | "scores.insert(0, 34) # Inserts 34 to index 0\n", 698 | "scores.insert(2, 44) # Inserts 44 to index 2\n", 699 | "print(scores) # [34, 44, 44, 48, 55, 89, 34, 100]" 700 | ], 701 | "execution_count": null, 702 | "outputs": [ 703 | { 704 | "output_type": "stream", 705 | "text": [ 706 | "[34, 44, 44, 48, 55, 89, 34, 100]\n" 707 | ], 708 | "name": "stdout" 709 | } 710 | ] 711 | }, 712 | { 713 | "cell_type": "code", 714 | "metadata": { 715 | "id": "eLgPU1ot9bZ7", 716 | "outputId": "03a981db-6061-4304-a87b-9ea561b39c39" 717 | }, 718 | "source": [ 719 | "# Extend\n", 720 | "\n", 721 | "scores.extend([23]) # Başka bir listeyi listenin sonuna ekler\n", 722 | "print(scores) # [34, 44, 44, 48, 55, 89, 34, 100, 23]" 723 | ], 724 | "execution_count": null, 725 | "outputs": [ 726 | { 727 | "output_type": "stream", 728 | "text": [ 729 | "[34, 44, 44, 48, 55, 89, 34, 100, 23, 23, 23]\n" 730 | ], 731 | "name": "stdout" 732 | } 733 | ] 734 | }, 735 | { 736 | "cell_type": "code", 737 | "metadata": { 738 | "id": "BncnxWP89bZ8", 739 | "outputId": "6797efad-3c68-4fb2-c695-2b478909fd6d" 740 | }, 741 | "source": [ 742 | "scores.extend([12,10])\n", 743 | "print(scores) # [34, 44, 44, 48, 55, 89, 34, 100, 23, 12, 10]" 744 | ], 745 | "execution_count": null, 746 | "outputs": [ 747 | { 748 | "output_type": "stream", 749 | "text": [ 750 | "[34, 44, 44, 48, 55, 89, 34, 100, 23, 23, 23, 12, 10]\n" 751 | ], 752 | "name": "stdout" 753 | } 754 | ] 755 | }, 756 | { 757 | "cell_type": "markdown", 758 | "metadata": { 759 | "id": "gIPESbeS9bZ8" 760 | }, 761 | "source": [ 762 | "### Listelerden eleman çıkartılması (pop, remove, clear)" 763 | ] 764 | }, 765 | { 766 | "cell_type": "code", 767 | "metadata": { 768 | "id": "UNDu8DKk9bZ8", 769 | "outputId": "c7a9c29e-de83-4729-a4be-9d1453e9d8b9" 770 | }, 771 | "source": [ 772 | "# Pop\n", 773 | "\n", 774 | "languages = ['C', 'C#', 'C++']\n", 775 | "languages.pop()\n", 776 | "print(languages) # ['C', 'C#']" 777 | ], 778 | "execution_count": null, 779 | "outputs": [ 780 | { 781 | "output_type": "stream", 782 | "text": [ 783 | "['C', 'C#']\n" 784 | ], 785 | "name": "stdout" 786 | } 787 | ] 788 | }, 789 | { 790 | "cell_type": "code", 791 | "metadata": { 792 | "id": "dQempjos9bZ8", 793 | "outputId": "c8829e49-6a64-413c-e062-c9ccc980cc3f" 794 | }, 795 | "source": [ 796 | "# Remove\n", 797 | "\n", 798 | "languages.remove('C')\n", 799 | "print(languages) # ['C#']" 800 | ], 801 | "execution_count": null, 802 | "outputs": [ 803 | { 804 | "output_type": "stream", 805 | "text": [ 806 | "['C#']\n" 807 | ], 808 | "name": "stdout" 809 | } 810 | ] 811 | }, 812 | { 813 | "cell_type": "code", 814 | "metadata": { 815 | "id": "DU2czytW9bZ9", 816 | "outputId": "0a6d456c-99e3-4852-cc42-89eab600a841" 817 | }, 818 | "source": [ 819 | "# Clear\n", 820 | "\n", 821 | "languages.clear()\n", 822 | "print(languages) # []" 823 | ], 824 | "execution_count": null, 825 | "outputs": [ 826 | { 827 | "output_type": "stream", 828 | "text": [ 829 | "[]\n" 830 | ], 831 | "name": "stdout" 832 | } 833 | ] 834 | }, 835 | { 836 | "cell_type": "markdown", 837 | "metadata": { 838 | "id": "I_TJQBoD9bZ9" 839 | }, 840 | "source": [ 841 | "### İndeksleri almak ve sayma (index, count)" 842 | ] 843 | }, 844 | { 845 | "cell_type": "code", 846 | "metadata": { 847 | "id": "cyZVX03C9bZ9", 848 | "scrolled": true 849 | }, 850 | "source": [ 851 | "alphabets = ['a', 'b', 'c']" 852 | ], 853 | "execution_count": null, 854 | "outputs": [] 855 | }, 856 | { 857 | "cell_type": "code", 858 | "metadata": { 859 | "id": "Ec4B2TBO9bZ9", 860 | "outputId": "678acc98-e45f-491a-c21d-0552a973a179" 861 | }, 862 | "source": [ 863 | "print(alphabets.index('a')) # 0 (Aranan değerin liste içerisindeki indeksini getirir)" 864 | ], 865 | "execution_count": null, 866 | "outputs": [ 867 | { 868 | "output_type": "stream", 869 | "text": [ 870 | "0\n" 871 | ], 872 | "name": "stdout" 873 | } 874 | ] 875 | }, 876 | { 877 | "cell_type": "code", 878 | "metadata": { 879 | "id": "p1WcXNjn9bZ9", 880 | "outputId": "adb2bb40-f7cb-4559-89ac-d7fe66b60baf" 881 | }, 882 | "source": [ 883 | "print(alphabets.count('b')) # 1 (Aranan değerin liste içerisinde kaç kez geçtiğini getirir)" 884 | ], 885 | "execution_count": null, 886 | "outputs": [ 887 | { 888 | "output_type": "stream", 889 | "text": [ 890 | "1\n" 891 | ], 892 | "name": "stdout" 893 | } 894 | ] 895 | }, 896 | { 897 | "cell_type": "markdown", 898 | "metadata": { 899 | "id": "sCA9-e6k9bZ9" 900 | }, 901 | "source": [ 902 | "### Sıralama, Tersleme ve Kopyalama (Sorting, reversing and copying)\n" 903 | ] 904 | }, 905 | { 906 | "cell_type": "code", 907 | "metadata": { 908 | "id": "FHoyO2Zt9bZ-", 909 | "scrolled": true, 910 | "outputId": "7807b7e8-6e92-4956-deae-06b5eab8e41f" 911 | }, 912 | "source": [ 913 | "# Sort\n", 914 | "\n", 915 | "numbers = [1,4,6,3,2,5]\n", 916 | "numbers.sort() # Sorts the list items in place and returns nothing\n", 917 | "print(numbers) # [1, 2, 3, 4, 5, 6]" 918 | ], 919 | "execution_count": null, 920 | "outputs": [ 921 | { 922 | "output_type": "stream", 923 | "text": [ 924 | "[1, 2, 3, 4, 5, 6]\n" 925 | ], 926 | "name": "stdout" 927 | } 928 | ] 929 | }, 930 | { 931 | "cell_type": "code", 932 | "metadata": { 933 | "id": "VKF0jYf_9bZ-", 934 | "outputId": "2c1cbcfd-3b04-49d0-ad94-f8b73253d773" 935 | }, 936 | "source": [ 937 | "# Sorted\n", 938 | "# Yeni bir liste olarak alabilirsiniz\n", 939 | "\n", 940 | "sorted_numbers = sorted(numbers) # note - this is not a method\n", 941 | "print(sorted_numbers) # [1, 2, 3, 4, 5, 6]" 942 | ], 943 | "execution_count": null, 944 | "outputs": [ 945 | { 946 | "output_type": "stream", 947 | "text": [ 948 | "[1, 2, 3, 4, 5, 6]\n" 949 | ], 950 | "name": "stdout" 951 | } 952 | ] 953 | }, 954 | { 955 | "cell_type": "code", 956 | "metadata": { 957 | "id": "xpJhQlJG9bZ-", 958 | "outputId": "507b048a-dfa8-478e-c1a7-25434809feb3" 959 | }, 960 | "source": [ 961 | "# Reverse\n", 962 | "\n", 963 | "numbers.reverse() # Listeyi tersine çevirir\n", 964 | "print(numbers) # [6, 5, 4, 3, 2, 1]" 965 | ], 966 | "execution_count": null, 967 | "outputs": [ 968 | { 969 | "output_type": "stream", 970 | "text": [ 971 | "[6, 5, 4, 3, 2, 1]\n" 972 | ], 973 | "name": "stdout" 974 | } 975 | ] 976 | }, 977 | { 978 | "cell_type": "code", 979 | "metadata": { 980 | "id": "lCodpDFa9bZ-", 981 | "outputId": "ef5ffa08-2634-4ff2-ca8c-ff4f689e9ae0" 982 | }, 983 | "source": [ 984 | "# Copy\n", 985 | "\n", 986 | "numbers_clone = numbers.copy() # numbers[:] ile aynı şekilde kopyalar\n", 987 | "print(numbers_clone) # [6, 5, 4, 3, 2, 1]" 988 | ], 989 | "execution_count": null, 990 | "outputs": [ 991 | { 992 | "output_type": "stream", 993 | "text": [ 994 | "[6, 5, 4, 3, 2, 1]\n" 995 | ], 996 | "name": "stdout" 997 | } 998 | ] 999 | }, 1000 | { 1001 | "cell_type": "markdown", 1002 | "metadata": { 1003 | "id": "75ErMAKp9bZ_" 1004 | }, 1005 | "source": [ 1006 | "## 1.5 Sözlükler (Dictionaries)" 1007 | ] 1008 | }, 1009 | { 1010 | "cell_type": "code", 1011 | "metadata": { 1012 | "id": "5CooteP39bZ_", 1013 | "scrolled": true 1014 | }, 1015 | "source": [ 1016 | "user = {'name': 'Mert', 'age': 25, 'married': False}" 1017 | ], 1018 | "execution_count": null, 1019 | "outputs": [] 1020 | }, 1021 | { 1022 | "cell_type": "code", 1023 | "metadata": { 1024 | "id": "QU5Km4GE9bZ_", 1025 | "outputId": "4110d1ff-a48d-413c-d524-05525f80c653" 1026 | }, 1027 | "source": [ 1028 | "print(user['name']) # Mert\n", 1029 | "print(user['married']) # False" 1030 | ], 1031 | "execution_count": null, 1032 | "outputs": [ 1033 | { 1034 | "output_type": "stream", 1035 | "text": [ 1036 | "Mert\n", 1037 | "False\n" 1038 | ], 1039 | "name": "stdout" 1040 | } 1041 | ] 1042 | }, 1043 | { 1044 | "cell_type": "markdown", 1045 | "metadata": { 1046 | "id": "GtafY51E9bZ_" 1047 | }, 1048 | "source": [ 1049 | "### Sözlük Anahtarları (Dictionary Keys)\n", 1050 | "\n", 1051 | "Bir sözlükteki anahtarların dize veri türünde olması gerektiğinden bahsetmiştim. Bu tamamen doğru değil. dikt anahtarları herhangi bir değişmez veri türünde olabilir. Ayrıca, anahtarların benzersiz olması gerekir. Bir sözlüğün birden fazla özdeş anahtarı varsa, değerler geçersiz kılınır. Bu aynı zamanda çarpışma olarak da adlandırılır." 1052 | ] 1053 | }, 1054 | { 1055 | "cell_type": "code", 1056 | "metadata": { 1057 | "id": "bAuHylC59bZ_" 1058 | }, 1059 | "source": [ 1060 | "abstract = {\n", 1061 | " 'first': 123,\n", 1062 | " True: 'hello',\n", 1063 | " 777: [1,3,4,5]\n", 1064 | "}" 1065 | ], 1066 | "execution_count": null, 1067 | "outputs": [] 1068 | }, 1069 | { 1070 | "cell_type": "code", 1071 | "metadata": { 1072 | "id": "P74sMPVw9bZ_" 1073 | }, 1074 | "source": [ 1075 | "print(abstract['first']) # 123\n", 1076 | "print(abstract[True]) # 'hello\n", 1077 | "print(abstract[777]) # [1,3,4,5]" 1078 | ], 1079 | "execution_count": null, 1080 | "outputs": [] 1081 | }, 1082 | { 1083 | "cell_type": "code", 1084 | "metadata": { 1085 | "id": "wGAhOUYU9bZ_" 1086 | }, 1087 | "source": [ 1088 | "sample = {\n", 1089 | " 'username': 'Ahmet',\n", 1090 | " 'username': 'Mert'\n", 1091 | "}" 1092 | ], 1093 | "execution_count": null, 1094 | "outputs": [] 1095 | }, 1096 | { 1097 | "cell_type": "code", 1098 | "metadata": { 1099 | "id": "ieK5ctcE9baA", 1100 | "outputId": "54b6cc24-072e-4a49-b631-bc9a1f3233a9" 1101 | }, 1102 | "source": [ 1103 | "print(sample['username']) # james" 1104 | ], 1105 | "execution_count": null, 1106 | "outputs": [ 1107 | { 1108 | "output_type": "stream", 1109 | "text": [ 1110 | "Mert\n" 1111 | ], 1112 | "name": "stdout" 1113 | } 1114 | ] 1115 | }, 1116 | { 1117 | "cell_type": "markdown", 1118 | "metadata": { 1119 | "id": "TvObkmIH9baA" 1120 | }, 1121 | "source": [ 1122 | "### Sözlük Metodları (Dictionary Methods)" 1123 | ] 1124 | }, 1125 | { 1126 | "cell_type": "code", 1127 | "metadata": { 1128 | "id": "vtCtpeFP9baA", 1129 | "scrolled": true 1130 | }, 1131 | "source": [ 1132 | "user = {'name': 'Mert', 'age': 25, 'country': 'Turkey'}" 1133 | ], 1134 | "execution_count": null, 1135 | "outputs": [] 1136 | }, 1137 | { 1138 | "cell_type": "code", 1139 | "metadata": { 1140 | "id": "4LJi9_Gx9baA", 1141 | "outputId": "2594880e-0c1f-4bc5-d60c-211d0927655c" 1142 | }, 1143 | "source": [ 1144 | "print('name' in user.keys()) # True\n", 1145 | "print('gender' in user.keys()) # False\n", 1146 | "print('Mert' in user.values()) # True" 1147 | ], 1148 | "execution_count": null, 1149 | "outputs": [ 1150 | { 1151 | "output_type": "stream", 1152 | "text": [ 1153 | "True\n", 1154 | "False\n", 1155 | "True\n" 1156 | ], 1157 | "name": "stdout" 1158 | } 1159 | ] 1160 | }, 1161 | { 1162 | "cell_type": "markdown", 1163 | "metadata": { 1164 | "id": "uXX7Jh-WA4Uy" 1165 | }, 1166 | "source": [ 1167 | "## Proje: Vucut Kitle İndeksi Hesaplama\n", 1168 | "\n", 1169 | "Kullanıcıdan 3 tane girdi alınız:\n", 1170 | "1. İsim (string olarak alınız)\n", 1171 | "2. Kilo (float olarak alınız)\n", 1172 | "3. Boy (santimetre cinsinden integer olarak alınız)\n", 1173 | "\n", 1174 | "Alınan boy ve kilo girdilerini kullanarak girilen kişinin vücut kitle indeksini hesaplayınız (vki = kilo / boy^2) ve virgülden sonra 2. basamağa yuvarlayınız (Santimetre cinsinden girilen boyu, hesap yaparken metre cinsinden kullanmalısınız)\n", 1175 | "\n", 1176 | "Vücut kitle indeksi hesaplama kodunuzu kilo = 75, boy = 1.85 değerlerini kullanarak test ederseniz \"21.91\" değerini elde etmelisiniz\n", 1177 | "\n", 1178 | "Girilen kişi için bir sözlük oluşturun: Anahtar = isim, değer = vücut kitle indeksi olmalıdır\n", 1179 | "\n", 1180 | "Kişiler isimli bir liste oluşturup, oluşturduğunuz sözlüğü listeye ekeyin \n", 1181 | "\n", 1182 | "Buraya kadar olan kısımları 3 kez tekrarlayın ve 3 elemanlı, sözlüklerden oluşan bir liste elde edin\n", 1183 | "\n", 1184 | "Son olarak listedeki 3 kişinin isim ve vücut kitle indeksi verilerini alt alta yazdırın\n", 1185 | "\n", 1186 | "Örnek Çıktı:\n", 1187 | "* Furkan 24.8\n", 1188 | "* Berfin 19.16\n", 1189 | "* Yusuf 21.91" 1190 | ] 1191 | }, 1192 | { 1193 | "cell_type": "code", 1194 | "metadata": { 1195 | "id": "0s-uziK-_1oY" 1196 | }, 1197 | "source": [ 1198 | "kisiler = []\n", 1199 | "\n", 1200 | "isim = input(\"İsim giriniz: \")\n", 1201 | "kilo = float(input(\"Kilo giriniz: \"))\n", 1202 | "boy = int(input(\"Boy giriniz (cm): \")) / 100\n", 1203 | "vki = round(kilo/((boy)**2), 2)\n", 1204 | "kisi = {isim:vki}\n", 1205 | "kisiler.append(kisi)\n", 1206 | "\n", 1207 | "\n", 1208 | "isim = input(\"İsim giriniz: \")\n", 1209 | "kilo = float(input(\"Kilo giriniz: \"))\n", 1210 | "boy = int(input(\"Boy giriniz (cm): \")) / 100\n", 1211 | "vki = round(kilo/((boy)**2), 2)\n", 1212 | "kisi = {isim:vki}\n", 1213 | "kisiler.append(kisi)\n", 1214 | "\n", 1215 | "\n", 1216 | "isim = input(\"İsim giriniz: \")\n", 1217 | "kilo = float(input(\"Kilo giriniz: \"))\n", 1218 | "boy = int(input(\"Boy giriniz (cm): \")) / 100\n", 1219 | "vki = round(kilo/((boy)**2), 2)\n", 1220 | "kisi = {isim:vki}\n", 1221 | "kisiler.append(kisi)\n", 1222 | "\n", 1223 | "print(list(kisiler[0].keys())[0],list(kisiler[0].values())[0])\n", 1224 | "print(list(kisiler[1].keys())[0],list(kisiler[1].values())[0])\n", 1225 | "print(list(kisiler[2].keys())[0],list(kisiler[2].values())[0])" 1226 | ], 1227 | "execution_count": null, 1228 | "outputs": [] 1229 | } 1230 | ] 1231 | } --------------------------------------------------------------------------------