Hello, curious readers! Welcome to my sixth program, which is very interesting. Basically , it´s a factorial calculator. A factorial is the result of multiplying a sequence of descending natural numbers down to 1 (such as 4 × 3 × 2 × 1).
-For example : 4! = 4 × 3 × 2 × 1 = 24
In this program below, user is asked to enter a POSITIVE integer. Then the factorial of that number is computed and displayed in the screen. Specifically in my program , I found the factorial of a non-negative integer (entered by the user) using recursion.
Remember that a function that calls itself is known as a recursive function. And, this technique is known as recursion.
Hello programmers. This is my fifth program using Atom and ubuntu bash on windows. This is a very important code , because I did all of the math operations using functions. I defined my own functions, I didn´t use libraries, so it is a user-defined function, which groups code to perform a specific task and that group of code is given a name(identifier).
When the function is invoked from any part of program, it all executes the codes defined in the body of function.
I did WSQ01 – fun with numbers again , but now I needed to ask the user for the input and then call each function to calculate the answer for each of the parts.
¡Hello , programmers and curious friends! This is my fourth program , created using Ubuntu bash and Atom. For this task , my classmates and I were instructed to create a program that asks for a range of integers and then prints the sum of the numbers in that range (inclusive).
For example, the sum from 6 to 10 would be 0 + 6 + 7 + 8 + 9 + 10.
I decided to use a loop to calculate the sum, because my programming teacher Ken Bauer, wanted us to practice repetitive work.
The third task was to create a program that picks a random integer in the range of 1 to 100. After that , the game starts when the user has to guess which number does the program picked, with hints of ’too high’ or ’too low’.
The program continues to run until the user guesses the integer.
I added some extra steps, because I wanted to show more information to the users , like:
¿How many guesses they had to make to get the right answer?