Introductory Programming With Python

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Group

    Introductory Programming With Python - Presentation Transcript

    1. Introductory Programming with Python Brendan McCane
    2. Hitchhiker’s Guide to Programming
      • Programming is hard. You just won’t believe how vastly, hugely, mind-bogglingly hard it is. I mean, you may think making a decent sandwich is hard, but that’s just peanuts to programming.
    3. Donald Knuth says:
      • In fact, my main conclusion after spending ten years of my life working on the TEX project is that software is hard.
    4. CS1
      • Average failure rate for CS1 courses is 33% (min 0%, max 60%).
      • Most universities teach Java, C# or C++.
      • Industrially relevant and OO is more “natural” right?
    5. Design Principles
      • As simple as possible
      • Few magical incantations
      • Immediate feedback (no compile/run cycle)
      • A practical and modern language
    6. Target Audience
      • Students majoring in computer science
        • Python in semester 1 (optional)
        • Java in semester 2 (compulsory)
      • Students not majoring in computer science
        • Mostly science or technical majors
    7. Curriculum
      • We modified an open source textbook
      • How to Think Like a Computer Scientist
      • You can download our version from:
        • http://www.cs.otago.ac.nz/staffpriv/mccane/teaching.html
    8. Curriculum
      • Introduction
      • Variables, expressions
      • Python builtins
      • Functions (2)
      • Conditionals
      • More functions
      • Test Driven Development
      • Files and modules
      • Iteration (2)
      • GUI programming
      • Case study (2)
      • Strings (2)
      • Lists (2)
      • Tuples and sets
      • Dictionaries
      • System Programming
      • OOP
      • Case study
    9. Course Structure
      • Tight integration between lectures and laboratories
      • 24 lectures, 21 laboratories
      • Terms requirement – students had to submit 18 labs (not marked)
      • Labs had basic + advanced exercises
      • Lectures were programming demonstrations
    10. Assessment
      • Mid-semester test (20%) – multi-choice
      • Final Exam (60%) – multi-choice
      • Mastery tests (2 x 10%)
        • Programming problems under test conditions
        • Tests published beforehand
        • 4 sections per test, each worth 2.5%
        • Each section pass/fail
        • Graded based on doctests + code inspection
    11. Mastery Test Example (lab 9)
      • def score(numbers):
      • """
      • give the average of the numbers excluding the biggest
      • and smallest one
      • >>> score([2, 7, 9, 10, 13, 1, 5, 12])
      • 7.5
      • >>> score([3, 7, 2.5, -4])
      • 2.75
      • """
    12. Final Exam Example
      • def matrix_to_sparse(in_matrix):
      • sparse = {}
      • for row_index,row in enumerate(in_matrix):
      • for col_index,val in enumerate(row):
      • if val != 0:
      • sparse[(row_index,col_index)] = val
      • return sparse
      • matrix = [[0,0,1], [0,2,0], [3,0,0]]
      • sparse = matrix_to_sparse(matrix)
      • print sparse[(2,0)], sparse[(1,1)], sparse[(0,2)]
    13. Outcomes
    14. Outcomes
      • 172 students attended first lab
      • 28% A
      • 23% B
      • 22% C
      • 27% failed (19% failed terms)
    15.  
    16. Notable Comments
      • Easy topics: first half
      • Hard topics: second half
      • Best aspect: labs
      • I would like to change: “a move away from extensive use of programming”
      • “ F*%! Matrices”
    17.  
    18.  
    19. Statistical Results
      • Java with Python better than Java without (p=0.001)
      • Java 2009 better than Java 2008 (p=0.0007)
      • Java without Python (2009) not better than Java 2008 (p=0.18)
    20. Conclusions
      • Python is a joy to teach
      • Learning Python is a good pre-cursor for learning Java
      • Open source textbooks are fantastic
      • Mastery tests are masterful
      • Force students to attend labs

    + Brendan McCaneBrendan McCane, 2 months ago

    custom

    125 views, 0 favs, 0 embeds more stats

    Describes a first year introductory programming cou more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 125
      • 125 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 1
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags

    Groups / Events