Skip to content

A 5-Week Python Bootcamp by CodeIT Community, Zetech University

License

Notifications You must be signed in to change notification settings

ZetechUni/python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python BootCamp

python-logo

Facebook Developers Circle Nairobi at Zetech University || CodeIT, Zetech University

5 Weeks Of Python (Roadmap)

Week 1: Environment Setup and Introduction

Downloading Python

Python comes pre-installed on Linux OS. For Windows you will have to Download. Download Python here

Resources

Python For Beginnes

Text Editors

Use a text-editor of your choice:

Recommended are:

Visual Studio Code Atom Sublime Text

Git and GitHub Setup.

Note that you have to pass the challenges in git and github to proceed to the next stages. They are essential tools in development for code sharing and collaboration.

Get Started Here

Raise an Issue if encountering a blocker

Practice Code

  1. Print
  2. Variables
  3. Dates
  4. Error Handling
  5. Conditions
Week 2
  1. Collections (list, arrays, ranges)
  2. Loops
  3. Functions
  4. Functions with Parameters
  5. Modules & Packages
  6. JSON with Python
  7. Decorators
Week 3
  1. Formatting & Linting
  2. Lambdas
  3. Classes
  4. Inheritance
  5. Mixins
  6. File System Management
  7. Asynchronous Programming
Week 4: Data Tools
  1. Jupyter Notebooks
  2. Anaconda, Conda & Colabs
  3. Introduction to Pandas
  4. Pandas: dataframe contents
  5. Pandas: dataframe querry
  6. CSV files & Jupyter
  7. Read/Write CSV Files with Pandas
Week 5: Data Tools
  1. Removing & Splitting dataframe columns
  2. Duplicate rows & Missing Values
  3. Split Testing & Data Training with scikit learn
  4. Train linear Regression Model with scikit learn
  5. Model testing
  6. Numpy & Pandas
  7. Visualizing data with Matplotlib

Setting Up Your Developer Environment

Python

Preferably version 3,

Download Python

git

Download Git

Git Configuration

GitHub Account

Create Account

What You Need:

As the Bootcamp is open to anyone, we encourage members of our community, Facebook Developers Circle Nairobi at Zetech University to actively engange in the activities.

Contributing To The Repo

  1. Fork the repo to your GitHub Account. Guide

  2. Create a new branch with a name in conjuction to your update/fix

    Read More On Contributions

# WEEK 1: Introduction
  1. Print

    The print function allows you to send output to the terminal

    Strings can be enclosed in single quotes or double quotes

    • "this is a string"
    • 'this is also a string'

    The input function allows you to prompt a user for a value

    Parameters:

    • prompt: Message to display to the user

    return value:

    • string value containing value entered by user
  2. Variables: Numeric

    Python can store and manipulate numbers. Python has two types of numeric values: integers (whole numbers) or float (numbers with decimal places)

    When naming variables follow the PEP-8 Style Guide for Python Code

    Converting to numeric values

  3. Variables: String

    Python can store and manipulate strings. Strings can be enclosed in single or double quotes. There are a number of string methods you can use to manipulate and work with strings

    Converting to string values

    When naming variables follow the PEP-8 Style Guide for Python Code

  4. Dates

    The datetime module contains a number of classes for manipulating dates and times.

    Date and time types:

    • date stores year, month, and day
    • time stores hour, minute, and second
    • datetime stores year, month, day, hour, minute, and second
    • timedelta a duration of time between two dates, times, or datetimes

    When naming variables follow the PEP-8 Style Guide for Python Code

    Converting from string to datetime

  5. Error Handling

    Error handling in Python is managed through the use of try/except/finally

    Python has numerous built-in exceptions. When creating except blocks, they need to be created from most specific to most generic according to the hierarchy.

  6. Conditions

    Conditional execution can be completed using the if statement

    if syntax

    if expression:
       # code to execute
    else:
       # code to execute

    Comparison operators

    • < less than
    • < greater than
    • == is equal to
    • >= greater than or equal to
    • <= less than or equal to
    • != not equal to
  7. Multiple Conditions

    Conditional execution can be completed using the if statement. Adding elif allows you to check multiple conditions

    if syntax

    if expression:
       # code to execute
    elif expression:
       # code to execute
    else:
       # code to execute

    Boolean operators

    • x or y - If either x OR y is true, the expression is executed

    Comparison operators

    • < less than
    • < greater than
    • == is equal to
    • >= greater than or equal to
    • <= less than or equal to
    • != not equal to
    • x in [a,b,c] Does x match the value of a, b, or c
# Week 2: The Basics
  1. Collections (list, arrays, ranges)

    Collections are groups of items. Python supports several types of collections. Three of the most common are dictionaries, lists and arrays.

    Lists

    Lists are a collection of items. Lists can be expanded or contracted as needed, and can contain any data type. Lists are most commonly used to store a single column collection of information, however it is possible to nest lists

    Arrays

    Arrays are similar to lists, however are designed to store a uniform basic data type, such as integers or floating point numbers.

    Dictionaries

    Dictionaries are key/value pairs of a collection of items. Unlike a list where items can only be accessed by their index or value, dictionaries use keys to identify each item.

  2. Loops

    For loops

    For loops takes each item in an array or collection in order, and assigns it to the variable you define.

    names = ['Christopher', 'Susan']
    for name in names:
       print(name)

    While loops

    While loops perform an operation as long as a condition is true.

    names = ['Christopher', 'Susan']
    index = 0
    while index < len(names):
       name = names[index]
       print(name)
       index = index + 1
  3. Functions

    Functions allow you to take code that is repeated and move it to a module that can be called when needed. Functions are defined with the def keyword and must be declared before the function is called in your code. Functions can accept parameters and return values.

    def functionname(parameter):
       # code to execute
       return value
  4. Functions with Parameters

    Functions allow you to take code that is repeated and move it to a module that can be called when needed. Functions are defined with the def keyword and must be declared before the function is called in your code. Functions can accept one or more parameters and return values.

    def function_name(parameter):
       # code to execute
       return value

    Parameters can be assigned a default value making them optional when the function is called.

    def function_name(parameter=default):
       # code to execute
       return value

    When you call a function you may specify the values for the parameters using positional or named notation

    def function_name(parameter1, parameter2):
       # code to execute
       return value
    
    # Positional notation pass in arguments in same order as parameters are declared
    result = function_name(value1,value2)
    
    # Named notation
    result = function_name(parameter1=value1, parameter2=value2)
  5. Modules & Packages

    Modules

    Modules allow you to store reusable blocks of code, such as functions, in separate files. They're referenced by using the import statement.

    # import module as namespace
    import helpers
    helpers.display('Not a warning')
    
    # import all into current namespace
    from helpers import *
    display('Not a warning')
    
    # import specific items into current namespace
    from helpers import display
    display('Not a warning')

    Packages

    Distribution packages are external archive files which contain resources such as classes and functions. Most every application you create will make use of one or more packages. Imports from packages follow the same syntax as modules you've created. The Python Package index contains a full list of packages you can install using pip.

    Virtual environments

    Virtual environments allow you to install packages into an isolated folder. This allows you to better manage versions.

  6. JSON with Python

    Many APIs return data in JSON, JavaScript Object Notation. JSON is a standard format that can is readable by humans and parsed or generated by code.

    JSON is built on two structures:

    • collections of key/value pairs
    • lists of values

    JSON Linters will format JSON so it easier to read by a human. The following website have JSON linters:

    Python includes a json module which helps you encode and decode JSON

  7. Decorators

    Decorators are similar to attributes in that they add meaning or functionality to blocks of code in Python. They're frequently used in frameworks such as Flask or Django. The most common interaction you'll have with decorators as a Python developer is through using them rather than creating them.

    # Example decorator
    @log(True)
    def sample_function():
       print('this is a sample function')

About

A 5-Week Python Bootcamp by CodeIT Community, Zetech University

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •