CINXE.COM
PY4E - Python for Everybody
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>PY4E - Python for Everybody</title> <script> var _TSUGI = { ajax_session: false, heartbeat: 1500000, heartbeat_url: "https://www.py4e.com/tsugi/util/heartbeat", rest_path: {"parent":"","base_url":"https:\/\/www.py4e.com","controller":"lessons","extra":"","action":false,"parameters":[],"current":"\/lessons","full":"\/lessons"}, spinnerUrl: "https://static.tsugi.org/img/spinner.gif", staticroot: "https://static.tsugi.org", apphome: "https://www.py4e.com", wwwroot: "https://www.py4e.com/tsugi", websocket_url: false, websocket_token: false, react_token: "hbvmgu05bugth2parchtlgdgm2", window_close_message: "Application complete - You can close this tab.", session_expire_message: "Your session has expired" } </script> <!-- Tiny bit of JS --> <script src="https://static.tsugi.org/js/tsugiscripts_head.js"></script> <!-- Le styles --> <link href="https://static.tsugi.org/bootstrap-3.4.1/css/bootstrap.min.css" rel="stylesheet"> <link href="https://static.tsugi.org/js/jquery-ui-1.11.4/jquery-ui.min.css" rel="stylesheet"> <link href="https://static.tsugi.org/fontawesome-free-5.8.2-web/css/all.css" rel="stylesheet"> <link href="https://static.tsugi.org/fontawesome-free-5.8.2-web/css/v4-shims.css" rel="stylesheet"> <style>:root {--primary:#0D47A1; --primary-menu:#0D47A1; --primary-border:#0d4295; --primary-darker:#0c4091; --primary-darkest:#0b3b85; --background-color:#FFFFFF; --background-focus:#F5F5F5; --background-accent:#0D47A1; --secondary:#EEEEEE; --secondary-menu:#EEEEEE; --text:#111111; --text-light:#5E5E5E; --font-family:sans-serif; --font-size:14px; }</style> <link href="https://static.tsugi.org/css/tsugi2.css" rel="stylesheet"> <style> </style> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://www.py4e.com/tsugi/vendor/tsugi/lib/static/js/html5shiv/html5shiv.js"></script> <script src="https://www.py4e.com/tsugi/vendor/tsugi/lib/static/js/respond/respond.min.js"></script> <![endif]--> <script type="text/javascript">CSRF_TOKEN = "TODORemoveThis";</script> </head> <body prefix="oer: http://oerschema.org"> <div id="body_container"> <script> if (window!=window.top) { document.getElementById("body_container").className = "container-fluid"; } else { document.getElementById("body_container").className = "container"; } </script> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" id="tsugi_main_nav_bar" style="display:none"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="https://www.py4e.com">PY4E</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-main"> <li><a href="https://www.py4e.com/lessons" >Lessons</a></li> <li><a href="https://www.py4e.com/discussions" >Discussions</a></li> <li><a href="https://www.py4e.com/materials" >OER</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="https://online.dr-chuck.com" target="_blank" >Instructor</a></li> <li><a href="https://www.py4e.com/book" >Book</a></li> <li><a href="https://www.py4e.com/login" >Login</a></li> </ul> </div> <!--/.nav-collapse --> </div> <!--container --> </nav> <script> if ( ! inIframe() ) { document.getElementById('tsugi_main_nav_bar').style.display = 'block'; document.getElementsByTagName('body')[0].style.paddingTop = '5.93rem'; } else { document.getElementsByTagName('body')[0].style.paddingTop = '1.0rem'; } </script> <div id="flashmessages"></div><style> .card { display: inline-block; padding: 0.5em; margin: 12px; border: 1px solid black; height: 9em; overflow-y: hidden; } .card div { height: 8em; overflow-y: hidden; text-overflow: ellipsis; } #loader { position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; background-color: white; margin: 0; z-index: 100; } </style> <link href="https://www.py4e.com/css/lessons.css" rel="stylesheet"> <div class="container"><div typeof="Course"> <h1>Python for Everybody (PY4E)</h1> <p property="description">Hello and welcome to my site where you learn Python even if you have no programming background.</p> <div id="box"> <div class="card"><div> <i class="fa fa-bicycle fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/install"> 1: Installing Python<br clear="all"/> <br/>The first task is to work through the installation steps including installing Python and text editor. </a></div></div> <div class="card"><div> <i class="fa fa-hand-o-right fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/intro"> 2: Why Program?<br clear="all"/> <br/>We learn why one might want to learn to program, and look at the basic issues with learning to program. </a></div></div> <div class="card"><div> <i class="fa fa-database fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/memory"> 3: Variables, expressions and statements<br clear="all"/> <br/>We learn how to make variables and store data in those variables. </a></div></div> <div class="card"><div> <i class="fa fa-diamond fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/logic"> 4: Conditional Execution<br clear="all"/> <br/>We look at how Python executes some statements and skips others. </a></div></div> <div class="card"><div> <i class="fa fa-files-o fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/functions"> 5: Functions<br clear="all"/> <br/>Take a brief look at how Python implements the 'store and use later' programming pattern. </a></div></div> <div class="card"><div> <i class="fa fa-gears fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/loops"> 6: Loops and Iterations<br clear="all"/> <br/>We look at how Python repeats statements using looping structures. </a></div></div> <div class="card"><div> <i class="fa fa-file-text-o fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/strings"> 7: Strings<br clear="all"/> <br/>We look at how Python stores and manipulates textual data using string variables and functions. </a></div></div> <div class="card"><div> <i class="fa fa-database fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/files"> 8: Files<br clear="all"/> <br/>We learn how to open data files on your computer and read through the files using Python. </a></div></div> <div class="card"><div> <i class="fa fa-list-ol fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/lists"> 9: Lists<br clear="all"/> <br/>We look at Python's simplest data structure - the list. Lists can store more than one item in a variable. </a></div></div> <div class="card"><div> <i class="fa fa-key fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/dictionary"> 10: Dictionaries<br clear="all"/> <br/>The dictionary data structures allows us to store multiple values in an object and look up the values by their key. </a></div></div> <div class="card"><div> <i class="fa fa-inbox fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/tuples"> 11: Tuples<br clear="all"/> <br/>The tuple is a Python data structure that is like a simple and efficient list. </a></div></div> <div class="card"><div> <i class="fa fa-magic fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/regex"> 12: Regular Expressions<br clear="all"/> <br/>Regular Expressions allow us to search for patterns in strings and extract data from strings using the regular expression programming language. </a></div></div> <div class="card"><div> <i class="fa fa-cloud fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/network"> 13: Network Programming<br clear="all"/> <br/>We take a quick look at how data moves across the network using the HyperText Transport Protocol (HTTP) and how we write programs to read data across the network. </a></div></div> <div class="card"><div> <i class="fa fa-briefcase fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/servces"> 14: Using Web Services<br clear="all"/> <br/>Web services allow a program to access data available in a different server. </a></div></div> <div class="card"><div> <i class="fa fa-cubes fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/Objects"> 15: Object-Oriented Programming<br clear="all"/> <br/>We do a quick look at how Python supports the Object-Oriented programming pattern. </a></div></div> <div class="card"><div> <i class="fa fa-database fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/database"> 16: Databases<br clear="all"/> <br/>Databases give us very fast random access to large amounts of data. There is a lot of material in this chapter as we learn the Structured Query Language (SQL). </a></div></div> <div class="card"><div> <i class="fa fa-bar-chart-o fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i><a href="/lessons/dataviz"> 17: Data Visualization<br clear="all"/> <br/>In this section, we learn to scrape data from the network, store the data in a database and then read the data from the database to produce in in-browser visualization of the data. </a></div></div> </div> <!-- box --> </div> <!-- typeof="Course" --> </div><script src="https://static.tsugi.org/js/jquery-1.11.3.js"></script> <script src="https://static.tsugi.org/bootstrap-3.4.1/js/bootstrap.min.js"></script> <script src="https://static.tsugi.org/js/jquery-ui-1.11.4/jquery-ui.min.js"></script> <script src="https://static.tsugi.org/js/jquery.timeago-1.6.3.js"></script> <script src="https://static.tsugi.org/js/handlebars-v4.0.2.js"></script> <script src="https://static.tsugi.org/tmpljs-3.8.0/tmpl.min.js"></script> <script src="https://static.tsugi.org/js/tsugiscripts.js"></script> <script type="text/javascript"> HEARTBEAT_TIMEOUT = setTimeout(doHeartBeat, _TSUGI.heartbeat); tsugiEmbedMenu(); $(document).ready(function() { jQuery("time.timeago").timeago(); }); </script> <script> $('a').each(function (x) { var href = $(this).attr('href'); if ( ! href ) return; if ( ! href.startsWith('#') ) return; var pos = href.indexOf('/?'); if ( pos < 1 ) return; // console.dir('Patching broken # href='+href); href = href.substring(0,pos); $(this).attr('href', href); }); </script> <script type="text/javascript" src="https://static.tsugi.org/js/waterfall-light.js"></script> <script> $(function(){ $('#box').waterfall({refresh: 0}) }); </script> </div></body> </html>