Skip to content

This Python script prompts the user to input three numbers, and then determines and prints the largest number among the three.

Notifications You must be signed in to change notification settings

MMTalal/ComparingThreeNumbers-FindingLargest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Comparing Three Numbers and Finding the Largest

This Python script prompts the user to input three numbers, and then determines and prints the largest number among the three.

Features

  • Accepts three floating-point numbers as input from the user.
  • Compares the three numbers and determines the largest number.
  • Handles cases where two or all three numbers are equal.
  • Prints the largest number and any relevant information about equal numbers.

Usage

  1. Clone the repository or download the Comparing Three Numbers and Finding the Largest.py file.

  2. Open a Python environment (e.g., terminal, Jupyter Notebook).

  3. Run the script by executing the following command:

    python compare_numbers.py
    
  4. When prompted, enter three numbers (e.g., 5.2, 7.8, 3.4).

  5. The script will output the largest number and any relevant information about equal numbers.

Example Output

Please input your first number: 5.2
Please input your second number: 7.8
Please input your third number: 3.4
The biggest number is 7.8
Please input your first number: 10.0
Please input your second number: 10.0
Please input your third number: 10.0
Your first, second and third number are the same number.
The biggest number is 10.0
Please input your first number: 8.5
Please input your second number: 8.5
Please input your third number: 6.2
Your first number is equal to your second number.
The biggest number is 8.5

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

About

This Python script prompts the user to input three numbers, and then determines and prints the largest number among the three.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages