0% found this document useful (0 votes)
268 views

CleanCoding Python

This document outlines the course content for a course on clean coding with Python. The course aims to teach students how to design and program Python applications, use data structures like lists and dictionaries, write loops and functions, handle errors and exceptions, work with files and classes, and implement object-oriented programming concepts. It also covers machine learning algorithms like random forests and support vector machines. The course material will be taught over 4 units that cover Python fundamentals, data handling, advanced concepts, and machine learning algorithms.

Uploaded by

Tanisha Sehgal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
268 views

CleanCoding Python

This document outlines the course content for a course on clean coding with Python. The course aims to teach students how to design and program Python applications, use data structures like lists and dictionaries, write loops and functions, handle errors and exceptions, work with files and classes, and implement object-oriented programming concepts. It also covers machine learning algorithms like random forests and support vector machines. The course material will be taught over 4 units that cover Python fundamentals, data handling, advanced concepts, and machine learning algorithms.

Uploaded by

Tanisha Sehgal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Clean Coding with Python

COURSE OUTCOME:
➢ To understand why Python is a useful scripting language for developers
➢ To learn how to design and program Python applications
➢ To learn how to use lists, tuples, and dictionaries in Python programs
➢ To learn how to identify Python object types
➢ To learn how to use indexing and slicing to access data in Python programs
➢ To define the structure and components of a Python program
➢ To learn how to write loops and decision statements in Python
➢ To learn how to write functions and pass arguments in Python
➢ To learn how to build and package Python modules for reusability
➢ To learn how to read and write files in Python
➢ To learn how to design object‐oriented programs with Python classes
➢ To learn data handling and use cases diagrams
➢ To learn how to use class inheritance in Python for reusability
➢ To learn how to use exception handling in Python applications for error handling

Particulars

Unit - I
❖ Chapter - 1
➢ Introduction to Clean Code
■ What is Bad Code?
● Example 1: Avoid
● Example 2: for each code
■ What is Clean Code?
➢ Purpose of Clean Code
➢ Thought of experienced programmers
❖ Chapter - 2
➢ Meaningful Names
■ Intention Revealing Names
● Example 1: Poor Variable Names
● Example 2: Poor Method Names
● Example 3: Variable Name
■ Make Meaningful Distinctions
● Example 1: Usage of Different Words
● Example 2: Distinct Names
■ Use Pronounceable Names
● Example 1: Vocal Names
● Example 2: Short Form Names
● Example 3: Non-Pronounceable Names
● Example 4: Compare
■ Avoid Encodings and Mental Mappings
● Difference between smart and professional programmer
■ Class and Method Names
❖ Chapter - 3
➢ Functions
■ Function Size Matters
■ Blocks and Indenting
■ Do only one thing within a function
■ One level of abstraction per function
■ Use Descriptive Names
● Example 1: Verbal Names
■ Function Arguments
● Advantages of Having Less Arguments
■ Command Query Separation
■ Prefer Exceptions to Returning Error Codes
■ Extract Try/Catch Blocks
■ Error Handling Is One Thing
❖ Chapter - 4
➢ Comments
■ Good Comments
■ Good Names Can Obviate Comments
■ Types of Good Comments
● Legal Comment
Unit - II
❖ Introduction to Python
➢ What is Python?
➢ Advantages and disadvantages
➢ Downloading and installing
➢ Which version of Python
➢ Running Python Scripts
➢ Using the interpreter interactively
➢ Using variables
➢ String types: normal, raw and Unicode
➢ String operators and expressions
➢ Math operators and expressions
➢ Writing to the screen
➢ Reading from the keyboard
➢ Indenting is significant
➢ The if and elif statements
➢ While Loops
➢ Using List
➢ Dictionaries
➢ Using the for statement
➢ Opening, reading and writing a text file
➢ Using Pandas, the python data analysis library and data frames
➢ Grouping, aggregating and applying, merging and joining
➢ Dealing with syntax errors
➢ Exceptions, Handling exceptions with try/except

Unit - III
❖ Data Handling and Use Cases
➢ RE Pattern Matching
➢ Parsing Data
➢ Introduction to Regression
➢ Types of Regression
➢ Use Cases
➢ Exploratory data analysis
➢ Correlation Matrix
➢ Visualization using Matplotlib
➢ Implementing linear regression
Unit - IV
❖ Advance Concepts
➢ Machine Learning - Algorithm
➢ Algorithms – Random forest
➢ Super vector Machine
➢ Random Forest
➢ Build your own model in python
➢ Comparison between random forest and decision tree

TEXTBOOKS-

1. Learning Python 5ed: Powerful Object-Oriented Programming by Mark Lutz


2. Python in Easy Steps by Mike McGrath
3. Python 2.1 Bible by Dave Brueck and Stephen Tanner
4. The Python Coding Book: Understanding what programming really is by Stephen Gruppetta

REFERENCE-

1.Python: The Complete Reference by Martin C. B

2. Python Pocket Reference, 5th Edition,Mark Lutz,ISBN: 1449357016, O'Reilly Media

3.Python 3 Standard Library by Example,Doug Hellman,ISBN: 9780134291055, Addison-Wesley Professional; June 11,
2017; 1456 pages

You might also like