Ver a proveniência

numbers.py: split code with and without classes

master
Dimitri Merejkowsky há 5 anos
ascendente
cometimento
e5a4f6d3e7
2 ficheiros alterados com 14 adições e 0 eliminações
  1. +0
    -0
      sources/numbers/numbers_object.py
  2. +14
    -0
      sources/numbers/numbers_proc.py

sources/numbers/numbers.py → sources/numbers/numbers_object.py Ver ficheiro


+ 14
- 0
sources/numbers/numbers_proc.py Ver ficheiro

@@ -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()