Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 682 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 682 Bytes

Python Programming Basics - Assignment

Problem Statement:

With a given integral number n, write a function to generate a dictionary that contains (i, i*i) such that is an integral number between 1 and n (both included).

  1. Number should not be less than 0 and should not be greater than 100.
  2. Calculate square of all number from 1 to n and store in dict.
  3. Function should pass all test cases.

Instructions:

  • Program should be written in file square_of_numbers.py

  • Function name should be squareOfNumbers.

  • Input

     Type:  Integer
     Value: 5
    
  • Expected Output

      Type:  Dictionary
      Value: {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}