Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ibensusan/algorithm-to-find-the-maximum-number

Algorithm to compare 3 predefine numbers and determines which one id the largest using Python
https://github.com/ibensusan/algorithm-to-find-the-maximum-number

python3

Last synced: 25 days ago
JSON representation

Algorithm to compare 3 predefine numbers and determines which one id the largest using Python

Awesome Lists containing this project

README

        

# Largest of Three Numbers - Python Project

This Python program determines the largest of three user-inputted numbers using a simple comparison algorithm. The program prompts the user to enter three numbers, compares them using conditional statements (`if-elif-else`), and prints the largest one.

## Project Description
The program asks the user to input three numbers. It then uses a series of `if-elif-else` statements to compare the numbers and determine the largest. This solution is implemented using basic control flow logic, making it efficient for simple numerical comparisons.

## How the Project Works
1. The user is prompted to enter three numbers.
2. The program compares the first two numbers to identify the larger value.
3. It then compares the larger of the first two numbers with the third to find the overall largest number.
4. The largest number is printed as the output.

## Example Output
```bash
Enter the first number: 12
Enter the second number: 45
Enter the third number: 32
The largest number is 45