Tag Archives: #66757f

def Factorial!

 – Factorial Calculator                                                                                             @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).

Fun With Numbers(Pro Version)

 -Fun with numbers 2                                                                                          @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.

 

  • The sum of the two numbers.
  • The difference of the two numbers.
  • The product of the two numbers.
  • The integer based division of the two numbers (so no decimal point). First divided by second.
  • The remainder of integer division of the two numbers

Here is my code: https://github.com/PablOCVi/WSQ/blob/master/WSQ08.py  

Using elif…

 – Use of “elif” with a conditional                                                                   @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://github.com/PablOCVi/Mastery/blob/master/Mastery17.py

If into a While

 – Nesting of conditional statements                                                                   @PablO_CVi

My code is: https://github.com/PablOCVi/Mastery/blob/master/Mastery18.py

Using Print

 – Basic output (print) in Python                                                                      @PablO_CVi

Here is my code: https://github.com/PablOCVi/Mastery/blob/master/Mastery10.py

Featuring the Work

 – Submit work via Blog RSS and GitHub                                                          @PablO_CVi

This is the use of while.

 

 

 

 

While…(Loop)

 – SUse of loops with “while”                                                                        @PablO_CVi

Here is the code: https://github.com/PablOCVi/Mastery/blob/master/Mastery19.py 

Using While (LOOP)

 – Sum of Numbers                                                                                            @PablO_CVi

Here you can find the code: https://github.com/PablOCVi/WSQ07/blob/master/WSQ07.py

Can you guess the number ? … Prube that

 – Pick a Number                                                                                               @PablO_CVi

Here is the code: https://github.com/PablOCVi/WSQ/blob/master/WSQ06.py

About me…

– An About Page                                            #TC1014                                                          @PablO_CVi