#Mastery07 – Use of comments in Python #TC101 @PablO_CVi
Comments are tracks that the programer can add to the code, this won`t change anything in the program, this is just for helping the person that is going to use the code. For adding a comment in Python you just have to put a hashtag like this: #here goes your comment. This is how you can add comments to your code in python. Here you can see that this does not modify the program.
Here is the code i used for this program: https:/
#WSQ09 – Factorial Calculator #TC101 @PablO_CVi
Create a program that asks the user for a non-negative integer (let’s call that number x) and display for them the value of x! (x factorial).
After showing them the answer, ask them if they would like to try another number (with a simple y/n response) and either ask again (for y) or quit the program and wish them a nice day (if they answered x).
]]>#WSQ08 -Fun with numbers 2 #TC101 @PablO_CVi
Write a function for each calculation. Each function should define two parameters (in this example of type int) and return the correct value as an integer as well.
Here is my code: https:/
]]>
#Mastery17 – Use of “elif” with a conditional #TC101 @PablO_CVi
The keyword elif
is short for ‘else if’, and is useful to introduce lots of if in the code.
my code is: https:/
]]>
#Mastery18 – Nesting of conditional statements #TC101 @PablO_CVi
My code is: https:/
]]>
#Mastery10 – Basic output (print) in Python #TC101 @PablO_CVi
Here is my code: https:/
]]>
#Mastery04 – Submit work via Blog RSS and GitHub #TC101 @PablO_CVi
This is the use of while.
]]>