Get started with custom lists to organize and share courses.

Sign up

Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Python Functions, Files, and Dictionaries

University of Michigan via Coursera

0 Reviews 141 students interested
  • Provider Coursera
  • Subject Python
  • Cost Free Online Course (Audit)
  • Session Upcoming
  • Language English
  • Certificate Paid Certificate Available
  • Start Date
  • Duration 5 weeks long
  • Learn more about MOOCs

Taken this course? Share your experience with other students. Write review

Overview

Sign up to Coursera courses for free Learn how

This course introduces the dictionary data structure and user-defined functions. You’ll learn about local and global variables, optional and keyword parameter-passing, named functions and lambda expressions. You’ll also learn about Python’s sorted function and how to control the order in which it sorts by passing in another function as an input. For your final project, you’ll read in simulated social media data from a file, compute sentiment scores, and write out .csv files. It covers chapters 10-16 of the textbook “Fundamentals of Python Programming,” which is the accompanying text (optional and free) for this course.

The course is well-suited for you if you have already taken the "Python Basics" course and want to gain further fundamental knowledge of the Python language. Together, both courses are geared towards newcomers to Python programming, those who need a refresher on Python basics, or those who may have had some exposure to Python programming but want a more in-depth exposition and vocabulary for describing and reasoning about programs.

This is a follow-up to the "Python Basics" course (course 1 of the Python 3 Programming Specialization), and it is the second of five courses in the specialization.

Syllabus

WEEK 1

Files and CSV Output

In week one the video lectures and the Runestone textbook will introduce you to the idea of incorporating files into your programs as an additional source of data. You will learn how to read from a file, write to a file, and how to work with the .csv data format.

 

WEEK 2

Dictionaries and Dictionary Accumulation

In week two the video lectures and the Runestone textbook will focus on a new data type, dictionaries. You will be introduced to the mechanics of dictionaries and then get practice using them in accumulation patterns, both to build a dictionary using the pattern as well as find the best, or worst, result using the pattern.

 

WEEK 3

Functions and Tuples

In week three you will be introduced to the construction of functions. Up to this point, you have used functions in the programs before, but have not had a chance to write your own functions, including how to define a function, how to incorporate parameters, how to return data from a function, the local or global scope of variables, and potential side effects that could occur from function execution. Finally, we look at tuples more in depth, and how automatic packing and unpacking of tuples can be used in functions and in for loops.

 

WEEK 4

More Iteration and Advanced Functions

In week four the video lectures and the Runestone textbook will outline a more advanced iteration mechanism, the while loop. You will be introduced to using it when getting feedback from users, as well as applying it to the turtle module to draw images. Additionally, you will also be exposed to more advanced function concepts such as the idea of parameters being optional, not required, and anonymous functions using lambda.

 

WEEK 5

Sorting

In week five the videos and Runestone textbook will detail how to sort python objects - both the basics and more advanced forms of sorting for dictionaries and how to break a tie (if that occurs). The final course assessment will be a project that asks you to read fake, auto-generated data from a social media site to analyze social media post sentiments. You will submit a csv file as well 

 

Taught by

Paul Resnick, Steve Oney and Jaclyn Cohen

Help Center

Most commonly asked questions about Coursera Coursera

Reviews for Coursera's Python Functions, Files, and Dictionaries
Based on 0 reviews

  • 5 star 0%
  • 4 star 0%
  • 3 star 0%
  • 2 star 0%
  • 1 star 0%

Did you take this course? Share your experience with other students.

Write a review

Class Central

Get personalized course recommendations, track subjects and courses with reminders, and more.

Sign up for free

Never stop learning Never Stop Learning!

Get personalized course recommendations, track subjects and courses with reminders, and more.