From eba71606e73aba0fa3af1d54fe18a659f0a8cf6d Mon Sep 17 00:00:00 2001 From: PawanMathur Date: Wed, 6 Sep 2017 04:35:40 +0000 Subject: [PATCH] Done --- square_of_numbers.py | 11 +++++++++++ square_of_numbers.pyc | Bin 0 -> 786 bytes tests/__init__.pyc | Bin 0 -> 157 bytes tests/test_squareOfNumbers.pyc | Bin 0 -> 1398 bytes 4 files changed, 11 insertions(+) create mode 100644 square_of_numbers.pyc create mode 100644 tests/__init__.pyc create mode 100644 tests/test_squareOfNumbers.pyc diff --git a/square_of_numbers.py b/square_of_numbers.py index e69de29..dee6028 100644 --- a/square_of_numbers.py +++ b/square_of_numbers.py @@ -0,0 +1,11 @@ +def squareOfNumbers (n): + if n <= 0 or n > 100: + print "Input n should be greater than 0 and upto 100" + return {} + return {i:i*i for i in range(1,n+1)} + +if __name__ == "__main__": + print squareOfNumbers (5) + print squareOfNumbers (0) + print squareOfNumbers (100) + print squareOfNumbers (101) diff --git a/square_of_numbers.pyc b/square_of_numbers.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c12407d8cee6ba6fb8ba706974a5c1ead74367b GIT binary patch literal 786 zcmcIhOHRWu5FMvUp?t&wB-kLCT{k7^zCuVK(Jm;6E)Ym4GKov05<}RZcn7!zkPK1=a}UfZNZj{e z$>3~AX{$;7CJpLTA)yVE?h1+}41prRIKi+3gatBCnStG_au4P{m;=&18)g8L)F%%P zX+cE@V0Y=kDfXXq+bA$b5-+|G3QnDTqcAB+@E8t!I7@rVnR^0IK6 z_oJxtL?inc6O!0RKt;55w+(L$7S*$Z%ZCR~Gz$`-2Kvwu97c`?%bIs~gmpO6xePDG zvry;4%}NtqYcscnNMxAkREAO1@1fjX{^fpUK)E?yx28V8xS+m zd2vJsXsK@pGV0qUaI|ZLdXRNVd+NUoxh+($onB1GwNGkjR}p~iv4Hu^Q4z wWUu*EnZ$D3r6I29?0>mR`WgATsrmtl<%xN| zi6t4OMf&0SMcKs#iOH$@$@wX%`UVDux+$5-CA#@(y2XX1iAAZ!`X#BwCB^#j@tJv< cCGqik1(hWnK%;DO^HWN5Qtdz%76UN@0Cg%PNB{r; literal 0 HcmV?d00001 diff --git a/tests/test_squareOfNumbers.pyc b/tests/test_squareOfNumbers.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd78bc26066718e95267eaac8607044b7769201d GIT binary patch literal 1398 zcmcgsO>fgc5S_J?v`xQKs47)(LE_*`NqYvNLZK1|3UVry=3*Ipt-7^$!|qzBQp=_M zAN~~o0C9#lYt#nc!SPOZpU1oJ&6_0ru{!*szny0E=L+$?k6{lHa@>L{qFT^Ykl=Md zRX}w}(~#;OO?y=LY1+rLkffkOP~M}jL^njI(*fmunnVL^RsO;i3C!Fg!m+gOAhj~$ z^V|Z0ZL&J0VRi=%RnM-uzW{q0HX~9!k&$RCp5I zLnV*qEMMo!{_Rr9ZBTOg%YZ|V13OVJaqw-xrj*+pd<#A18TU%L$6+5K=9Fj!!S_ge zMxu*EwY}hTou!!^XF8YT-QB$%roE$!omQwFJG6frlTLk~%r4y~w&jfOGv;8qnj}Io5-Va| zY<50d!KPRhTNtefb}LC#TFWHybxM+2=S_uW%wFAz`Im}ft|eP;*@l5Qinty8KT4xY n$6C3R-0b+pvo+Sc=w0(J`5pcbSx@U(TczjROP1M>#KZ76mw79I literal 0 HcmV?d00001