/
A set of slides summarising class lectures for CS101, Spring Semester 2015 A set of slides summarising class lectures for CS101, Spring Semester 2015

A set of slides summarising class lectures for CS101, Spring Semester 2015 - PowerPoint Presentation

olivia-moreira
olivia-moreira . @olivia-moreira
Follow
370 views
Uploaded On 2018-03-18

A set of slides summarising class lectures for CS101, Spring Semester 2015 - PPT Presentation

Arya Vipin Lilian More slides will follow Lecture 5 Introduction 3 Strategic Goals of this course 4 Tactical Goals of this course What is Computation Philosophy 2 forms of knowledge ID: 655204

python lecture exceptions lists lecture python lists exceptions functions objects minutes section modules method arguments files class amp oop

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "A set of slides summarising class lectur..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

A set of slides summarising class lectures for CS101, Spring Semester 2015

Arya, Vipin, Lilian:More slides will followSlide2

Lecture 5 - Introduction

3 Strategic Goals of this course4 Tactical Goals of this courseWhat is Computation – Philosophy – 2 forms of knowledge

Sequence of instructions as a recipe in form of primitives to solution of a problem

3 broad types of languages – why Python?

Meaning of Syntax and SemanticsSlide3

Lecture 6: Variables

Variables and associated conceptsOperators, operands, expressions, statementsStringsIntegers

Other forms of numbers

Comments

Zen of PythonSlide4

Lecture 7: Conditional Executions, User Inputs

Boolean expressionsLogical operatorsConditional executions – if, else &

elif

Chain of conditions, Nesting

Accepting user inputs Slide5

Lecture 8: Iteration

While loopInfinite loops,

break

,

continueFor loopFor

loop complexities in other languages, naturalness in Python – closeness to NL

Loop patterns

Elementary debugging – method of bisectionSlide6

Lecture 9: Functions - 1

Beyond Turing completeness – Decomposition, AbstractionSpecific task pattern appearing more than once

Syntax and semantics of functions

Argument basics

Returning from functions, fruitful & void functionsSlide7

Lecture 10: Functions - 2

Recursive functions – examplesDefault arguments, P

ositional arguments

Keyword arguments

Mixing Positional and Keyword argumentsAccepting arbitrary number of argumentsSlide8

Lecture 11: Lists

Concept of Lists – naming and definingAccessing individual items in lists, looping through lists

Common operations on Lists

Numerical Lists

String Lists - basicsSlide9

Lecture 12: Lists (contd.),

Tuples, FilesComprehensions in lists – numerical & literalTuples – concepts and accessing elements

Files – concepts, text files, lines, naming

Reading files

Searching filesWriting into filesSlide10

Lecture 13: Dictionaries

Concepts, general syntaxCommon operations with dictionariesLooping through a dictionary

NestingSlide11

Lecture 14: Mapping scientific problems into computation

Taking example of a problem (yet to decide which)Generating at least two algorithms to solve it

Converting algorithms into codes

Analysing computation and results.Slide12

What are exceptions

Examples

Built-in exceptions in

Python

Handling exceptions

Raising exceptions

User-defined

exceptions

Section 1, 50 minutes

Exceptions and

HandlingSlide13

Python modules

The

main

module

Importing modules

Standard Python modules

s

ys

os

The

dir

()

function

Packages

Section 1, 50 minutes

ModulesSlide14

The

“OOP”

philosopy

The

class

The object

Examples

Features of OOP

Encapsulation

Polymorphism

Inheritance

Section 1, 50 minutes

Object Oriented ProgrammingSlide15

Python

Classes

Class attributes

The

__

init

()__

method

Objects

Class Objects

Instance objects

Method objects

Creating and destroying objects

Section 1, 50 minutes

OOP using PythonSlide16

Encapsulation

Data hiding

Inheritance

Multiple inheritance

Polymorphism

Function overloading

Operator overload

Method objects

Section

2

, 50 minutes

OOP using Python