2014-05-02

posted May 2, 2014, 5:44 AM by Samuel Konstantinovich   [ updated May 2, 2014, 6:39 AM ]
Goals:
I. How to work remotely and get stuff done.
II. Work on baseball website.


For now work on this:
II: Complete these problems on looseleaf:
1. What is stored in c.txt after the code is run

a.txt contains:
Think what will 
happen when you
run the code

b.txt contains:
1 4 5
2 5 3
8 7 1 

x = open('a.txt','r')
y = open('b.txt','r')
z = open('c.txt','w')
g = x.read().split()
h = y.read().split()
x.close()
y.close()
for y in range(len(g)):
    if y%3==0 and y>0:
        z.write('\n')
    z.write(g[y]*int(h[y])+" ")
z.close()

I. Working remotely.
Tools: 
 Filezilla, 
 Putty / SSH, 
 Gedit.

-Filezilla for transfering files
-Filezilla settings for executeable.
-Gedit for windows newlines
-Testing with 3 lines before you add more python code.
-Testing your python code in IDLE or Putty/SSH 


Comments