Skip to content

Latest commit

 

History

History
45 lines (41 loc) · 1.02 KB

File metadata and controls

45 lines (41 loc) · 1.02 KB

Create 3 Lists as shown below

  • Colors = ["Blue", "Green", "Grey", "Red"]
  • Fruits=["Apple", "Banana", "Grape", "Strawberry"]
  • birds = ["Eagle", "Crow", "Parrot", "Pegion"]

Solve the below problems

  1. Write a program to find whether the given input belongs to Color/Fruit/Animal category is the input not in the given category print Unknown

    1. Sample Input
    inp = red

    Sample Output

    Given input belongs to colors category
    
    1. Sample Input
    inp = parrot

    Sample Output

    Given input belongs to unknown category
    
  2. Write a program to find whether the given two inputs given be user belongs to same category ot not

    1. Sample Input
    inp1 = red
    inp2 = blue

    Sample Output

    Given both input belongs to colors category
    
    1. Sample Input
    inp1 = parrot
    inp2 = green

    Sample Output

    Given both input doesn't belongs to same category