CIS 15 - Cloud Programming in Python - Shared screen with speaker view
got me sweating
the testing program made the midterm very easy
well, the issue was turning in "pieces" as we went
irony like timed tests
rather than a completed project. meant we couldn't go back on anything and required we did things in order
not much of a problem, once I understood how to approach the exam
we couldn't do things in different order or correct previous things
pfft, writing for a fixed file length is *pfft*
Thats how I did it.
fin_handle = open(in_file, 'r')fout_handle = open(out_file, 'w')content = content = fin_handle.readlines()fin_handle.close()content_pos = len(content)while content_pos > 0:content_pos -= 1fout_handle.write(content[content_pos])fout_handle.close()return
BTW you forgot to close() in your example. Marked down 2 points
At first I thought that I was supposed to do it with an array/llist
Like being able to run and test my code.
also its unlikely you'll write a main() either... your first years will be writing API calls, etc :-)
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 ...
same as jacob
WAIS was your lookup tool back then ;-)
tomes from 12th century scholars were the lookup tools of ye' olde days
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...
(pre HTTP :-)
copying isn't bad... but not understanding what your copying is the problem
or what it means in regards to the rest of the code your writing
(bloatware comes from that)
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
code reviews are painful for your first or second job...
you go in happy and come out crying
a list uses an array right?
well if it was a linked list then index access would be inefficient
what does it return if it doesn't find it?
Can you get the index of the last value, if it is not a unique value in the list?
Just len() I guess?
what's better about definite loops in python than other languages?
i was just about to ask that
because there's sometimes where a foreach loop doesn't work
no ¬ or ~ or !
you forgot to thank them