Skip to main content

Logo

CIS 15 - Cloud Programming in Python (Shared screen with speaker view)
Marcos Della
18:56
blah
kyle b
18:58
got me sweating
Marcos Della
18:59
:-)
Jacob Rosen
19:07
the testing program made the midterm very easy
Marcos Della
19:09
well, the issue was turning in "pieces" as we went
kyle b
19:17
irony like timed tests
kyle b
19:23
*i don’t
Marcos Della
19:32
rather than a completed project. meant we couldn't go back on anything and required we did things in order
Cameron Kochan
19:40
not much of a problem, once I understood how to approach the exam
Marcos Della
19:45
we couldn't do things in different order or correct previous things
Marcos Della
20:33
pfft, writing for a fixed file length is *pfft*
Samuel Gibson
21:13
Thats how I did it.
Marcos Della
21:13
fin_handle = open(in_file, 'r')
Unknown Speaker
00:00
fout_handle = open(out_file, 'w')
Unknown Speaker
00:00
Unknown Speaker
00:00
content = []
Unknown Speaker
00:00
content = fin_handle.readlines()
Unknown Speaker
00:00
fin_handle.close()
Unknown Speaker
00:00
Unknown Speaker
00:00
content_pos = len(content)
Unknown Speaker
00:00
while content_pos > 0:
Unknown Speaker
00:00
content_pos -= 1
Unknown Speaker
00:00
fout_handle.write(content[content_pos])
Unknown Speaker
00:00
fout_handle.close()
Unknown Speaker
00:00
return
Marcos Della
21:16
.
Marcos Della
21:27
BTW you forgot to close() in your example. Marked down 2 points
Samuel Gibson
21:49
At first I thought that I was supposed to do it with an array/llist
Neil Routley
22:31
Like being able to run and test my code.
Marcos Della
24:28
,
Marcos Della
24:51
also its unlikely you'll write a main() either... your first years will be writing API calls, etc :-)
Jacob Rosen
25:06
my first thought on the calculator one was that we would have to parse the operator to use it for the calculation... which I quickly realized was beyond what we've learned so far, so I figured you'd want us to do if else if else if else ...
Samuel Gibson
25:19
same as jacob
Marcos Della
26:11
WAIS was your lookup tool back then ;-)
Jacob Rosen
26:37
tomes from 12th century scholars were the lookup tools of ye' olde days
Marcos Della
26:54
its challanging because too much code is "copied" not actually understood. too many code reviews we've had to deal with new students that way...
Marcos Della
27:14
(pre HTTP :-)
Marcos Della
27:56
copying isn't bad... but not understanding what your copying is the problem
Marcos Della
28:06
or what it means in regards to the rest of the code your writing
Marcos Della
28:12
(bloatware comes from that)
Jacob Rosen
31:12
Jeff is an if it works it works guy too but Steve definitely isn't so be careful if you're going onto second semester programming in one of Steve's classes
Marcos Della
33:50
code reviews are painful for your first or second job...
Marcos Della
33:57
you go in happy and come out crying
Jacob Rosen
47:39
a list uses an array right?
Jacob Rosen
48:58
well if it was a linked list then index access would be inefficient
Jacob Rosen
53:08
what does it return if it doesn't find it?
Jacob Rosen
53:09
-1?
Jacob Rosen
53:21
ah
Tasha Bales
54:25
Can you get the index of the last value, if it is not a unique value in the list?
Tasha Bales
54:59
Just len() I guess?
Carter Frost
57:08
foreach
Jacob Rosen
58:37
what's better about definite loops in python than other languages?
Jacob Rosen
01:01:57
more clear
Jacob Rosen
01:01:59
yeah
Jacob Rosen
01:02:25
i was just about to ask that
Jacob Rosen
01:02:31
because there's sometimes where a foreach loop doesn't work
kyle b
01:59:10
0\
Carter Frost
01:59:12
0
Neil Routley
01:59:30
Thanks
Neil Routley
01:59:32
0
Carter Frost
02:03:06
no ¬ or ~ or !
Jacob Rosen
02:08:12
great game
Jacob Rosen
02:10:34
you forgot to thank them