Tag Archives: Uncategorized

Mastery 19

USE OF LOOPS WITH WHILE:

Mastery 19

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.

Mastery 19

MASTERY 17

USE OF ELIF WITH A CONDITIONAL:

MASTERY 17

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.

MASTERY 17

MASTERY 16

USE OF ELSE WITH A CONDITIONAL:

MASTERY 16

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.

MASTERY 16

MASTERY 15

USE OF THE CONDITIONAL IF:

MASTERY 15

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.

http://www.computerhope.com/jargon/i/ifstatme.htm

MASTERY 15

MASTERY 07

USE OF COMMENTS IN PYTHON:

MASTERY 07

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

MASTERY 07

SUM OF NUMBERS!

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:

SUM OF NUMBERS!

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.

SUM OF NUMBERS!

RANDOM NUMBERS!!

WSQ06

RANDOM NUMBERS!!

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.

RANDOM NUMBERS!!

Flippled Classroom? #WSQ02 #TC1014

https://www.youtube.com/watch?v=G_p63W_2F_4&spfreload=10

Flippled Classroom? #WSQ02 #TC1014

Fun with numbers #WSQ03 #TC1014

Here are my link of fun with numbers

https://github.com/ErickViz/-WSQ04/blob/master/%23WSQ04

Fun with numbers #WSQ03 #TC1014

Temperature #WSQ05 #TC1014

Here are my code of this wsq, https://github.com/ErickViz/WSQ05/blob/master/Temperature%20%23WSQ05%20%23T1014

Temperature #WSQ05 #TC1014