Ministério da Educação
Brasil um país de todos
Personal tools
You are here: Home Members Cicero Garrozi Disciplinas 2014 em diante Introdução à Programação Arquivos 2014-2 Algoritmos exercicio-arquivos-for.py
Navigation
Log in


Forgot your password?
 
Document Actions

exercicio-arquivos-for.py

by Cicero Garrozi last modified 2014-11-20 07:19

Click here to get the file

Size 1 kB - File type text/python-source

File contents

f = open("readlines.txt", "r")
str = ""
for l in f:
    str = str+ l[:-1]+" %d\n"%(int(l.split(" ")[-1])**2)
f.close()
f = open("readlines2.txt", "w")
f.write(str)
f.close()

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: