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

  • Harsh conditions

    A group of hikers takes on a journey to climb one of the highest mountains. To be able to make it to the top, each of them needs to have appropriate equipment.
    Our task is to tell if a specific person would make it to the top.
    notion image
    A hiker makes it to the top if any of these conditions hold:
    • The person has hiking shoes and a coat
    • The person has hiking shoes and a tent
    • The person has hiking sticks, a coat, and sunglasses.
     
    The input consists of 3 essential belongings the person has.
    The program should output Yes if the person would make it to the top and No otherwise.
    Input
    Output
    hiking shoes coat tent
    Yes
    sunglasses jacket coat
    No
     
    To check your solution you need to sign in
    Sign in to continue