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.
# 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment