Skillshare – Advanced Python Skills Become a Better Python Developer
$99.00 Original price was: $99.00.$33.25Current price is: $33.25.
In this course, you will learn a lot of built in functionalities for you to become a better Python developer. You will also learn how to implement best practices and some unit testing
File size: 1.07 GB
Skillshare – Advanced Python Skills Become a Better Python Developer
Project Description
The class project is going to be a series of exercises where you will need to use what you learn in this course. Avoid the use of for loops.
- Write a function that sums two numbers like in school. This means, that you should sum digits from right to left and carry 1 if the sum of two digits is greater than or equal to 10. HINT: you should use the zip_longest function and the modulo operator (%).
- In school, you may have done this without knowing that this algorithm also works for numbers in any base. Refactor this function in order to sum two numbers in any given base. HINT: your function should now receive the base as an argument. Your function should sum like in the first point if you pass 10 as the number base. If you pass 2, then you will be able to sum binary numbers!
- Remember that we said that in TDD, we should first write a failing test and then start writing code. We are going to break this rule for a moment. Implement some tests with pytest in order to show that your function works perfectly. Make sure to write tests for differente number bases.
The second exercise is related to generators! In this course you learned how to build them. Now let’s implement two generators that are interesting.
- Implement a generator that yields the Fibonnaci numbers. Take advantage of the fact that local state is rememberd on subsequent calls to the generator. Remember the definition of Fibonacci numbers in this Wikipedia article: Fibonacci Numbers
- Make a generator that yields prime numbers. Remember the definition of prime numbers in this article: Prime numbers
- Now instead of returning the number, return also the time it took to yield the next prime number. Store the numbers and times in such a way that you can make a simple scatter plot where you will put the prime numbers in the x-axis and the time in the y-axis. You can see an example of how to do this with Matplotlib and Numpy in this article: Scatterplots
Read more here!
Get Skillshare – Advanced Python Skills Become a Better Python Developer download immediately on AMZLibrary.com!
Q & A
Ask a question
Your question will be answered by a store representative or other customers.
Thank you for the question!
Your question has been received and will be answered soon. Please do not submit the same question again.
Error
An error occurred when saving your question. Please report it to the website administrator. Additional information:
Add an answer
Thank you for the answer!
Your answer has been received and will be published soon. Please do not submit the same answer again.
Error
An error occurred when saving your answer. Please report it to the website administrator. Additional information:
Related products
Other Courses
Other Courses
Other Courses
Other Courses
Other Courses
Reviews
There are no reviews yet