This website works better with JavaScript.
Home
Explore
Help
Sign In
E2L_Ivry
/
cours-python
Watch
5
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
numbers.py: split code with and without classes
master
Dimitri Merejkowsky
5 years ago
parent
f6eacb9f90
commit
e5a4f6d3e7
2 changed files
with
14 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+0
-0
sources/numbers/numbers_object.py
+14
-0
sources/numbers/numbers_proc.py
sources/numbers/numbers.py → sources/numbers/numbers_object.py
View File
+ 14
- 0
sources/numbers/numbers_proc.py
View File
@@ -0,0 +1,14 @@
import sys
import urllib.request
def main():
number = sys.argv[1]
with urllib.request.urlopen("http://numbersapi.com/" + number) as request:
response = request.read().decode("utf-8")
print(response)
if __name__ == "__main__":
main()