Skip to content

Environmental-Informatics/building-more-complex-programs-with-python-msuherma

Repository files navigation

Environmental Informatics

Assignment 02 - Building Complex Prorgams from Smaller Parts

Reading Assignment

Practical Practice

  • If you are new to GitHUB, check out the Hello World tutorial from GitHUB to learn the basics.

Helpful Hints

  • The turtle graphics package is a standard module for current versions of Python (specifically, Anaconda). There should no longer be a need to follow the instructions for installing the Think Python swampy tools.
  • For most anaconda installations, the turtle graphics package should work correctly without any environment changes.

The Lab Assignment

Getting Started

  • Use GitHUB Classroom to download this assignment, and use "git push" to submit your programs.
  • I suggest that you work through Chapters 5, 6 and 7 prior to working on Chapter 4. The Chapter 4 assignment can be completed without completing those chapters, but information on conditionals (Chapter 5), fruitful functions (Chapter 6), and iteration (Chapter 7) will increase your understanding of the process of program development in Chapter 4.

What to turn in...

  1. Think Python Chapter 4: Exercise 4.2.

    • Note uses function developed in the Chapter to draw a set of three flowers on a single canvas.
    • Program should draw the three flowers shown in the problem statement.
    • The turtle package does not work with Jupyter Notebooks by default, instead you need to install the Notebook extension (nbextension) ipyturtle and start your program will a call to the module before you will see output from your program. I have provided instructions to help at How do I get turtle graphics to work in my Jupyter Notebook?.
    • Submit as program_4.2.py
  2. Think Python Chapter 5: Exercise 5.2.

    • Submit a program that solves Part 2 of the problem.
    • Check out the Python raw_input() function for a way to prompt the user for input.
    • Submit as program_5.2.py
  3. Think Python Chapter 6: Exercise 6.5.

    • Submit a program that prompts the user for two values and then computes the greatest common divisor (GCD).
    • Submit as program_6.5.py
  4. Think Python Chapter 7: Exercise 7.1.

    • Submit a program that produces a table similar to that shown in the problem statement.
    • It is not necessary to match the formatting of the table, but the numbers should be similar.
    • Submit as program_7.1.py

About

building-more-complex-programs-with-python-msuherma created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages