fb pixel

Introduction to Python

  • Profound Academy

    • Status
      • 1
        Input and Output
      • 2
        Variables and Integer Arithmetic
      • 3
        Conditional Operators
      • 4
        Advanced Conditions - Nesting
      • 5
        Types and Variables
      • 6
        Strings
      • 7
        Lists
      • 8
        For Loops
      • 9
        While Loops
      • 10
        continue, break, while...else
      • 11
        String and List methods
      • 12
        Nested Loops
      • 13
        List Comprehension
      • 14
        Tuples and Sets
      • 15
        dict
      • 16
        Functions
      • 17
        Functions 2
      • 18
        Lambda and higher-order functions
      • 19
        Files

  • # Equal numbers

    Given 3 numbers, our task is to determine how many of those are equal to each other.
    • If all 3 of those are equal, the program should output 3.
    • If two of those are equal and one is different, the program should output 2.
    • If all of the numbers are different, the program should output 1.
    Input
    Output
    4 3 3
    2
    10 1 0
    1
    Tip: You can use the transitivity of comparison operators.
     
    To check your solution you need to sign in
    Sign in to continue