EdX

Computing in Python II: Control Structures (edX)

Computing in Python II: Control Structures (edX)

Learn about control structures, one of the most powerful parts of programming. This course covers conditionals, loops, functions, and error handling, specifically in Python but with broader applicability to other languages as well. Building on your prior knowledge of variables and operators, this course gets into the meat of programming. Organized into five chapters, this course starts by covering the fundamentals of what control structures are and what they do, then moves on to four common control structures in Python.

Class Deals by MOOC List - Click here and see EdX's Active Discounts, Deals, and Promo Codes.

Conditionals let you modify what your program does based on the values of incoming variables. Loops let you repeat tasks for multiple values or while certain conditions hold true. Functions let you encapsulate complex reasoning into reusable chunks of code. Error handling lets you intelligently recover from anticipated and unanticipated glitches.
By the end of this course, you'll be able to write complex programs in Python that perform useful reasoning. For example, you could write a program that calculates your weight on other planets, calculates the standard deviation of a series of numbers, or checks for the validity of an incoming password.
Structurally, the course is comprised of several parts. Instruction is delivered via a series of short (2-3 minute) videos. In between those videos, you'll complete both multiple choice questions and coding problems to demonstrate your knowledge of the material that was just covered.
This course is part of the Introduction to Python Programming Professional Certificate.

What you'll learn

  • How control structures can affect how other lines of code run.
  • Conditionals, including if, else-if, and else, for complex reasoning.
  • Loops, including for loops, for-each loops, and while loops for repeated behaviors.
  • Functions, for encapsulating code into reusable chunks.
  • Error handling, for anticipating and resolving expected errors.

Syllabus

Chapter 1: Control Structures. The basic role of control structures in general: lines of code that control other lines of code, determining when they execute.
Chapter 2: Conditionals. Building complex reasoning into our code by letting it make decisions based on the changing values of variables, like recommending a raincoat if it's going to rain or issuing a passing grade if a student's average is over 70.
Chapter 3. Loops. Building even more complex reasoning with for loops and while loops, both of which repeat certain lines of code over and over for every value in a list or while some condition is true.
Chapter 4. Functions. Encapsulating blocks of code into reusable functions that can be called as needed, including specifying their input and dictating their output.
Chapter 5. Error Handling. Reacting gracefully when anticipated or unanticipated errors occur during your program's execution.

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

Related Courses

Statistical Predictive Modelling and Applications (edX) EdX
University of Edinburgh,EdinburghX

Statistical Predictive Modelling and Applications (edX)

Learn how to apply statistical modelling techniques to real-world business scenarios using Python. In this course, you will learn three predictive modelling techniques - linear and logistic regression, and naive Bayes - and their applications in real-world scenarios. The first half of the course focuses on linear regression. This technique allows you to model a continuous outcome variable using both continuous and categorical predictors. This technique enables you to predict product sales based on several customer variables.

Jan 18th 2022
5-12 Weeks
Python for Data Science (edX) EdX
University of California, San Diego,UC San DiegoX

Python for Data Science (edX)

Learn to use powerful, open-source, Python tools, including Pandas, Git and Matplotlib, to manipulate, analyze, and visualize complex datasets. In the information age, data is all around us. Within this data are answers to compelling questions across many societal domains (politics, business, science, etc.). But if you had access to a large dataset, would you be able to find the answers you seek?

Self Paced
Self-Paced
Introducción al desarrollo de aplicaciones web (edX) EdX
Universidad Autonoma de Madrid

Introducción al desarrollo de aplicaciones web (edX)

Aprende a desarrollar una aplicación web desde cero con diferentes tecnologías como HTML, CSS, Python, JSON, JavaScript y Ajax. Hoy en día utilizamos la web para todo tipo de tareas: buscar un vuelo, comprar entradas, ver el pronóstico meteorológico, leer noticias, etc. Todo esto es posible gracias a las aplicaciones web creadas para darnos estos servicios.

Self Paced
Self-Paced
Introduction to Computational Thinking and Data Science (edX) EdX
MIT,MITx

Introduction to Computational Thinking and Data Science (edX)

This course is an introduction to using computation to understand real-world phenomena. This course will teach you how to use computation to accomplish a variety of goals and provides you with a brief introduction to a variety of topics in computational problem solving. This course is aimed at students with some prior programming experience in Python and a rudimentary knowledge of computational complexity.

Mar 20th 2024
5-12 Weeks
Probability and Statistics in Data Science using Python (edX) EdX
University of California, San Diego,UC San DiegoX

Probability and Statistics in Data Science using Python (edX)

Using Python, learn statistical and probabilistic approaches to understand and gain insights from data. The job of a data scientist is to glean knowledge from complex and noisy datasets. Reasoning about uncertainty is inherent in the analysis of noisy data. Probability and Statistics provide the mathematical foundation for such reasoning.

Self Paced
Self-Paced
Computing: Art, Magic, Science (edX) EdX
ETH Zurich,ETHx

Computing: Art, Magic, Science (edX)

Learn the basics of Information Technology and how to write quality programs in this introductory computer science course. Information Technology (IT) is everywhere. Every aspect of human activity depends on it. All IT processes, whether they drive mobile phones, the Internet, transportation systems, enterprise systems, publishing, social networks or any other application, rely on software.

No sessions available
4 Weeks
Statistics Using Python (edX) EdX
University of Wisconsin–Madison,WisconsinX

Statistics Using Python (edX)

Learn the fundamentals of statistics using Python. This course is a compact primer in statistics as a foundation for data-driven business analysis. A selection of concepts include descriptive statistics, probability, inference, correlation, and regression. The course also exposes students to basic Python programming for use in statistics.

Jan 23rd 2024
5-12 Weeks