Skip to content

Instantly share code, notes, and snippets.

@xyos
Created September 13, 2016 15:41
Show Gist options
  • Save xyos/b91c0eb08494832ae557adeadc3a87b8 to your computer and use it in GitHub Desktop.
Save xyos/b91c0eb08494832ae557adeadc3a87b8 to your computer and use it in GitHub Desktop.

Revisions

  1. xyos created this gist Sep 13, 2016.
    7 changes: 7 additions & 0 deletions suma_cuadrados.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # python3 suma_cuadrados.py
    # Nombre del archivo:test1.txt
    # 13
    with open(input("Nombre del archivo:"), 'r') as archivo:
    num1 = int(archivo.readline().strip())
    num2 = int(archivo.readline().strip())
    print(num1*num1+num2*num2)
    2 changes: 2 additions & 0 deletions test1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    2
    3