Learning Python- Intermediate course: Day 12, Summary of the week

Aatmaj - Aug 21 '21 - - Dev Community

Today let us revise whatever we have learnt so far in this week.


Summary of the week

Day 9, Complex numbers part 1

In this part we explored the cmath module. The cmath module in Python s a built in module which contains mathematical functions related to operations of complex numbers. Complex numbers can be created in the following manner z= complex(x,y) z.real and z.imaginary provide us with the real and imaginary parts.

We also saw how easily we can operate complex numbers in Python. We can do operations like addition, product and raising to a power, simply with the use of operators. Unlike other languages, we do not require any other functions for these simple operations.

Day 10, Complex numbers part 2

This part was reserved for cmath module functions. We covered functions like phase() and polar() which are frequently used while operating with complex numbers. After that, we saw how we can use the methods in the cmath library for more complicated mathematical operations. Entire list of functions with documentation can be found here

Complex numbers are useful in many branches of programming. We checked out a few in this part. For those who are not comfortable with the use of complex numbers might like this video series

Day 11, Random numbers

In this part we focused on the Python random module. Just like the math and cmath modules, the 'random' module is built in into Python, so we do not need to take any extra efforts to download or install it. We saw how to cover complex numbers in the range 0-1 by using the random() method. The randint() method generates a integer between a given range of numbers. We also covered methods to return a list of random numbers.

Thank you ! That was all for this week πŸ‘ Meet you next Tuesday 🀠


For those who have not yet made account in Dev.to, you can have a free easy sign-up using your mail or GitHub accounts. I would suggest the budding developers to create your GitHub free account right away. You would require to register sooner or later anyways

πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯
Follow me on GitHub for updates.........

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player