Ratheshprabakar / Mini-Projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Miniproject

(Beginner Level)

Project 1 : Armstrong Number Finder

  • Define a function that allows the user to check whether a given number is armstrong number or not.

  • Hint: To do this, first determine the number of digits of the given number. Call that n. Then take every digit in the number and raise it to the nth power. Add them, and if your answer is the original number then it is an Armstrong number.

  • Example: Take 1634. Four digits. So, 1^4 + 6^4 + 3^4 + 4^4 = 1 + 1296 + 81 + 256 = 1634. So 1634 is an Armstrong number.

Project 2 : Pythagorean Triples Checker

  • Allows the user to input the sides of any triangle in any order.

  • Return whether the triangle is a Pythagorean Triple or not.

  • Loop the program so the user can use it more than once without having to restart the program.

Project 3 : Multiplication Table Generator

  • Allows the user to input the table number.

  • Generate and print the tables upto 50 values.

  • Loop the program so the user can use it more than once without having to restart the program.

Project 4 : Change Calculator

  • Imagine that your friend is a cashier, but has a hard time counting back change to customers.

  • Create a program to calculate how much change is needed, allow him to type in the amount of money given to him and the price of the item. The program should then tell him the amount he needs like usual.

  • To make the program even easier to use, loop the program back to the top so your friend can continue to use the program without having to close and open it every time he needs to count change.

Project 5 : Mean, Median and Mode Calculator

  • In a set of numbers, the mean is the average, the mode is the number that occurs the most, and if you rearrange all the numbers numerically, the median is the number in the middle.

  • Create a function that allow the user to find the mean, median, and mode of a list of numbers. If you have access or know of functions that already complete these tasks, do not use them.

  • Subgoals (Pending)

    • In the mean function, give the user a way to select how many decimal places they want the answer to be rounded to.
    • If there is an even number of numbers in the list, return both numbers that could be considered the median.
    • If there are multiple modes, return all of them.

Project 6 : Higher Lower Prediction Game

  • Create a simple game where the computer randomly selects a number between 1 and 100 and the user has to guess what the number is.

  • After every guess, the computer should tell the user if the guess is higher or lower than the answer.

  • When the user guesses the correct number, print out a congratulatory message.

  • Subgoals:

    • Add an introductory message that explains to the user how to play your game.
    • In addition to the congratulatory message at the end of the game, also print out how many guesses were taken before the user arrived at the correct answer.
    • At the end of the game, allow the user to decide if they want to play again (without having to restart the program).

About


Languages

Language:C 74.8%Language:Python 25.2%