Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #4K
~8K People Reached
Favorite Forums
Favorite Tags

8 Posted Topics

Member Avatar for eva yang

Hi,there, I need to definea function make_tree(preorder, inorder). This function returns the Node which is the root of a binary tree with the pre-order and in-order traversals given as lists of values in the parameters. If either preorder or inorder is empty, the other must also be empty, and the …

Member Avatar for bron92
0
207
Member Avatar for eva yang

Hi, I don't know the difference between class variables and instance variables. Can anybody give me an example? Thank you so much:)

Member Avatar for eva yang
0
161
Member Avatar for eva yang

class Toy(object): def play(self, toy): ''''Print squeak''' print 'Squeak!' class Dog(object): def __int__(self, name): '''Name a dog''' self.name = name def call(self, shout): '''Return true if shout is exactly 'Here, n!', otherwise return False''' return shout == 'Here, ' + str(self.name) + '!' def play(self, toy, n): '''Print 'Yip! ' …

Member Avatar for eva yang
0
109
Member Avatar for eva yang

Hi,there, assert pop == "berg", "Item removed from the stack was not \"berg\"." why using '...' can avoid syntax error ? Thank you :)

Member Avatar for eva yang
0
316
Member Avatar for eva yang

Hi there, Can anybody tell me what is[B] internal documentation[/B] and what is[B] external documentation[/B] based on the following example: def is_palindrome(s): '''If the str is a palindrome which is a phrase that reads the same \ forwards and backwards return True; otherwise, return False.Assume that\ there are only lowercase …

Member Avatar for vegaseat
0
105
Member Avatar for eva yang
Member Avatar for eva yang
0
102
Member Avatar for eva yang
Member Avatar for vegaseat
0
138
Member Avatar for rajeshwari_ib

hi can anybody tell me what does the following code mean?Thank you [B]import[/B] sys [B]print [/B]>> sys.stderr, 'Fatal error: invalid input!' logfile = open('/tmp/mylog.txt', 'a') [B]print[/B] >> logfile, 'Fatal error: invalid input!' logfile.close() Editor's note: Please don't hijack someone else's unrelated thread, start your own thread with the proper title.

Member Avatar for eva yang
0
7K

The End.