Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.
 
 

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open in GitHub Codespaces

Python Prep

This set of exercises is to help review some of the basic Python skills required in our course.

There are three parts to this review assignment.

Exercise 1

In exercise_1, add up the numbers provided in the list S. This must be done using a for-loop, and the sum should be returned by the function.

Exercise 2

In exercise_2, add up the numbers provided in the list S using at most two lines of code. The sum should be returned by the function.

Exercise 3

In exercise_3, create a dictionary to store the values for the following list of points when input to the function f(x,y) = 8x + 3y. For example, if your dictionary is called f you should have an entry f[(0,0)] = 0 and an entry f[(1,1)] = 11, and so on. The dictionary should be returned by the function.

Points to include:

  • (0, 0)
  • (1, 1)
  • (2, 2)
  • (3, 3)
  • (4, 4)
  • (5, 5)

Hint: Consider using a for-loop to run through the list of points.

License

Released under the Apache License 2.0. See LICENSE file.

About

Practice your Python skills with this review exercise.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages