Today I wish share with you my solution to solve the wsq17.
I started to create a function to read the file and create a dictionary:
Then I created each function to solve the problem.
Afterwards I created my main menu.
Here is my code:
https://github.com/aureliemartinet/TC101/commit/01bc06b6310ec70db2ae31f043801e436d110f3d
]]>I write this bonus article because I would like to share my experience with you about this Python classe.
According to me the Python classe with Ken Bauer is the best way to learn a programmation langage. You have to do some exercise each week to improve like an exponential function
Ken let you free , he is here if you need but it’s not always just closed to you to check if you do or not your work.
Learn if only for us, if you are not passionate you can do the minimum. In the other case you can take some advance with the homework and read all of the text book online that ken recommends. As you want ..
The goal to study a computer langage is to developed your logical, this classe really helped me even if I’m not passionate at 100% to be honnest.
I don’t code everyday but thanks to Ken I was more curious than usually about programmation stuff
Thank you so much,
Aurélie
]]>Today it’s the last mastery that I posted
So, I have to explain you how it’s possible to read and write of files in Python.
It’s really easy you have just to write the name of your file and the mode that you want to used.
For example:
open (« nameofmyfile » , « r ») if you want to read it !
OR
open (« nameofmyfile », « w ») if you want to write it !
Have a good day !
]]>Today , I’m explaining you how validate an user input in Python.
We can focus on the WSQ06.
The user has to find the good number provides by the random function.
If the input is less, it’s indicated. The same case happened if the input is above.
The loop finish itself only if the number is found.
Have a good day !
]]>
Today I want to show you the range function.
We can see it mostly in the for loop.
It works like this: range(start,stop,step)
The goal of this function is to do an arithmetic progression.
Have a good day !
]]>
Today I want to explain you the concept of a tuple in python.
A tuple is a sequence of immutable Python objects.
The difference with the list is the syntaxe.
A list is with brackets whereas tuples with are parenthesis.
But be careful to access to one value you have to use some brackets as well !
list = [1,2,3,4]
tuple=(1,2,3,4)
tuple[0] = 1
Have a good day !
]]>Here is my method to choose between all of types of repetition in a program.
Well, when I know the number of times for the repetition; I used the for loop.
When I don’t know but I know the condition to stop the repetition I used the while loop.
The recursive method is a little bit more tricky. I used it generally in the math exercise whose I know the formula. For example: fibonacci or the greatest common divisor. (We can check the codes on my others articles in this blog)
Have a good day !
]]>Here is the steps to install Linux on your own computer:
Have a good day !
]]>Today I’m going to explain you why is interesting to use Linus during exam or quizzes.
According to me it’s interesting to know this operative system.
Have a good day !
]]>
Today, I want to show you the ability to create Python project in IDE and run inside the IDE.
In this classes I used Atom but for other projects I used Ecclipse. Some IDE are specific for one programmation language.
The goal of all of the IDE is to help the programmer to code faster.
Advantages:
Have a good day !
]]>