Talk:CSC 117 Sp08

From Computer Science Wiki
Jump to: navigation, search

Contents

Put Course Stuff Here

If 117 students put useful stuff here, they get credit, somehow. Oldham 13:01, 1 February 2008 (CST)

What is the difference between deep and shallow copies? Nick.thompson 11:26, 27 April 2008 (GMT-5)


I am trying to center my GraphWin object on my screen and I don't know the code to do it. I am also trying to find a command that will send focus to a particular GraphWin object so that when I have two open at the same time I can specify which one is active and on top. If anyone knows these codes please post them.--Mike.sivley 01:58, 9 March 2008 (GMT-5)

Thomas.curry 01:19, 23 April 2008 (GMT-5) I'm having some trouble with the clock (classes are rough for me). I'll take another look, and maybe I'll understand it before later and have it done, but it'd be great if someone could help me tonight if I don't. Thanks.

Preparing for Exam 1 Wed Feb 27

the course web page (near the bottom of the page.) If you look at this then the exam should be less surprising than it might ptherwise be. If you like surprises, well, have fun with that.

Feb 25.Oldham 01:32, 24 February 2008 (GMT-5)

Problems With Coding

User input to List

I thought I'd post this particular issue I'm having on THW1. I'm having a lot of trouble assigning the user-input into a list which can then be sorted. Any suggestions from the peanut gallery? Kurtis 23.32, 14 February 2008 (EST)

   mylist = input("Enter a list: ") ''user enters'' [1,2,3] (ex. input() can read a list literal)

When I try to write my entries to a file, I either get all the elements in os.environ and each sub-element or I get only the last element and the last sub-element I want (i.e. PATHEXT and .MSC). Any help? --Nicola.klein 06:43, 25 February 2008 (GMT-5)

In regards to your second issue, be sure that you don't have your fout = open() and fout.close() commands inside your loop. If so, each time your loop runs it will reopen your file for writing which will clear everything that was there. That would be a cause for getting just the last entry.

On your first issue (not sure why I put them backwards), what you need to do is run through your os.environ variable without changing its format. ex:

n = os.environ
List = []
for x in n:
  List.append(x)


n = os.environ
for (name, val) in n.items():
   print "the name:", name
   print "the value:", val
   print ""
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox