USE OF LOOPS WITH WHILE:
So here it is a loop with while.
While is used to repeat a specific block of code an unknown number of times, until a condition is met.
USE OF LOOPS WITH WHILE:
So here it is a loop with while.
While is used to repeat a specific block of code an unknown number of times, until a condition is met.
Comments Off on Mastery 19
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #Mastery19, #TC1014, Uncategorized
USE OF ELIF WITH A CONDITIONAL:
The elif statement : this one is like the another two conditionals, like they were together forming a new statement. This one allows you to check multiple expressions for truth as soon as one of the conditions used before were fake.
USE OF ELSE WITH A CONDITIONAL:
This is pretty simple I ask for the grade of someone, then after they introduce the grade I used an if to make a statement, if the grade is lower or equal to 6 there is going to be a message and this one is going to say “Boo! you failed the test” and here comes the else (drum roll…..) this one is used if the IF is not met so if this one is true (else) the message is going to say “OMG! congratulations you passed your test”. That’s all folks.
In a very summary way the else is the other conditional if the first one isn’t true.
Comments Off on MASTERY 16
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #Mastery16, #TC1014, Uncategorized
USE OF THE CONDITIONAL IF:
Here is a really simple program that shows you how to use the conditional if. First of all I asked the user for his age if the user is greater than 17 it is a grown-up and then the program will sent a message that says “You’re a grown-up, be happy or sad that’s your choice” but if the user types he is 6 years old for example the program will sent the message “You’re young be happy”. Very simple don’t you think so ?
But wait what is an if ?
Is a programming conditional statement that, if proved true, performs a function or displays information.
Comments Off on MASTERY 15
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #Mastery15, #TC1014, Uncategorized
USE OF COMMENTS IN PYTHON:
In the previous screenshot I made a simple explanation of the uses of comments in python it’s really useful and helpful if you have to do a long program and you don’t remember something then with the comments just using this symbol “#” you can do the comment and remember one or many important things. xoxo
Comments Off on MASTERY 07
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #Mastery07, #TC1014, Uncategorized
WSQ07
What this program does is ask for two numbers to the user, the first number is used to start adding and the second one to finish the addition, for example if the user types that wants to start adding with number 1 and ending on the 5th what the program does is: 1 + 2 + 3 + 4 + 5 and the result would be 15.
EXAMPLE:
In the previous example i used an accumulator and a counter. I name the accumulator as “s” and the counter as “count”. First of all I equal the counter to the first number the user gave me, so this means the counter is going to be the same as the first number they type, then i used a loop (while) and I put a statement that the counter has to be less or equal than the second number the user gave me, so practically this is used for the program to ends the addition. Then I equal the accumulator to “0” and then I gave the program the instruction of accumulate s= s+ count if they type the number 1 the counter is going to be 1 and the same for the accumulator cause’ s= s+ count this is the same like s=0+1. Finally i put the counter for the program to do the loop and that’s all.
Comments Off on SUM OF NUMBERS!
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #TC1014, #WSQ07, Uncategorized
WSQ06
This program allows an user to enter random numbers in the range of 1-100, so the user has to guess a number. If the number you enter in the program isn’t the correct one you have to try more times until you guess the number, if the number you picked is too low the program will send you a message “Too low” and if the number you picked is too high the program will send you “Too high”, basically the program give you clues to guess the number, it’s like a game, have fun.
Comments Off on RANDOM NUMBERS!!
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #TC1014, #WSQ06, Uncategorized
Comments Off on Flippled Classroom? #WSQ02 #TC1014
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #TC1014, #WSQ02, Uncategorized
Comments Off on Fun with numbers #WSQ03 #TC1014
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #TC1014, #WSQ03, Uncategorized
Here are my code of this wsq, https://github.com/ErickViz/WSQ05/blob/master/Temperature%20%23WSQ05%20%23T1014
Comments Off on Temperature #WSQ05 #TC1014
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #TC1014, #WSQ05, Uncategorized