This lesson is in the early stages of development (Alpha version)

Projects

Overview

Teaching: 10 min
Exercises: 10 min
Questions
  • What is the purpose of using projects in an IDE?

  • How to create and use a project in an IDE?

Objectives
  • Understand the usefulness of using projects in an IDE

  • Know the basic tools that allow you to create and use projects in Spyder.

Projects

In a IDE, a project is a way of indicating that your work is organized within a directory, under which there is supposed to be a known file structure.

Spyder allows users to associate a given directory with a Project, which offers several main advantages:

Play Bingo

Finally you will write a program that simulates a game of Bingo for a single card. Begin by generating a list of all of the valid Bingo calls (B1 through O75). Once the list has been created you can randomize the order of its elements by calling the shuffle function in the random module. Then your program should consume calls out of the list and cross out numbers on the card until the card contains a winning line. Simulate 1,000 games and report the minimum, maximum and average number of calls that must be made before the card wins. You may find it helpful to import your previous code when completing this exercise.

Let’s create and organize our project

How would you organize the files on this project?. Let’s think about the way we usually find them in public repositories. It’s basically a matter of both ourselves and our colleagues finding things where we expect them to be.

Let’s run the static analyzer and profiler again.

Key Points

  • There are standards and good practices for organizing the files of our programs. And they are worth keeping in mind, especially if we work in collaboration with others.