Functions in Python are very easy to use, they do specific actions with the value you call them. The function substitute a value into a block of code and the returns the calculation (or sometimes they do nothing). For example, you have probably used before the print function:
This quiz made me think a little, I had problems first at creating the list and ask the user when to stop but I solved it in the end.The link to my quiz on Github is this:https://github.com/Jocapear/TC1014/blob/master/Quiz08.py
My quiz is in github on the next links (both activities are in the same file)https://github.com/Jocapear/TC1014/blob/master/Quiz07.py
Hello here is my code: And here is the second:If you want to see my code on Github i will post the link here:https://github.com/Jocapear/TC1014/blob/master/Quiz06
This WSQ was kind of tricky for me, im kind of new into loops so I need a little bit more of practice with them. I had to look for a factorial number on google because i didn´t know what a factorial number was.
This is the program working:
If you want to get the code from Github here is the link:
https://github.com/Jocapear/TC1014/blob/master/WSQ09.py
This is my WSQ08This one was really easy, its the basic use fo a function, nothing hard or complex. I used a lot of functions on this excersise but I think that it could be done with only one function. Here is my code: And this is the program work…
I know how to use loops, its really simple. I will show you a WHILE loop that I used in the WSQ07:This loop makes posible the constant repetition of one statement, it can also work with variables and numbers thats why I put the counter inside. The WHIL…
Here I will show you that I know how to use IF and ELSE stamentes.This is the basic form, I put it simple to understand the syntax quickly. Here are some works that I made using IF and ELSEs.If you want to know more check my WSQs.
Mastery 07 – Use of comments
Look now I know how to write comments in Python 3: