An open API service indexing awesome lists of open source software.

https://github.com/zipcodecore/data2-2q1


https://github.com/zipcodecore/data2-2q1

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# PyQuiz1

**Carefully** Read this README.

Attempt to get this code completed within 2 hours. Remember, this is just a quiz, it is not an exam/assessment. Its goal is to give you and me an honest estimation of your progress. Be sure at the end of each exercise to push your commits to your repo.

Make your first commit as soon as you start and push as follows:

* Change the text on this line in this file to your name. (Your Name Here).
* Make a commit, call it "First Commit".
* Push it to your repo.

Now, you have a start-time commit. Try to get all 4 exercises finished, passing all the tests, within 2 hours.

Write code in the various files to pass all the unit tests. *Do Not Modify any Tests.* Run all the unittests; your score on the quiz is the number of correct tests your code passes. (Which if I counted right should be 28.)

In any event, make a final commit when you are finished or at a point in time just before 2 hours elapses.
Make the comment on that last commit "Final Commit (XX of 28 tests passing)" where you replace XX with the number of tests you have passing
at or before the 2 hour mark when you finish. Be sure to submit your repo URL to the portal as well.

You may use any resource (google, stack overflow, books, etc) you need to complete these exercises, including your own code from your own repos.

You
* **may not** use any other Zipcoder's code.
* **may not** communicate with any other Zipcoder past or present.
* **may not** communicate with each other.
* **may not** communicate with anyone who's a coder today or previously.

In short, do your own work quietly without asking anyone for help.

Take a deep breath. Focus. You'll be fine.

## Exercise 1

Open the program called *converter.py*

* Remove the line containing the pass statement and implement the functionality described in the docstring.
* Run the unit tests to validate that the implementation passes unit tests.

```
python3 -m unittest quiz1.test_converter
```

## Exercise 2

Open the program called fibonacci.py

Requirements

* Given a term (n), determine the value of x(n).
* In the fibonacci.py program, create a function called fibonacci. The function should take in an integer and return the value of x(n).
* This problem must be solved WITHOUT the use of recursion.

Constraints
n >= 0

```
python3 -m unittest quiz1.test_fibonacci
```

## Exercise 3

Open the program called *palindrome.py*

* implement palindrome()

```
python3 -m unittest quiz1.test_palim
```

## Exercise 4

Open the program called *tuple_utils.py*

* For each function, remove the line containing the pass statement and implement the functionality described in the docstrings.
* Run the unit tests to validate that the implementation passes unit tests.

```
python3 -m unittest quiz1.test_tuple_utils
```

## Exercise 5

Open the program called *groceries.py*

* For each function, remove the line containing the pass statement and implement the functionality described in the docstrings.
* Run the unit tests to validate that the implementation passes unit tests.

```
python3 -m unittest quiz1.test_groceries
```