Skip to content

Practice your Python skills with this review exercise.

License

Notifications You must be signed in to change notification settings

msilve160/python-prep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%