Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Tags
Member Avatar for checker

so here is my code [CODE]from math import sqrt class ageName: "class to represent a person" def _init_(self): self.name = "" self.age = 0.0 self.sqrtage = 0 g = ageName() g.name = raw_input("Enter a name, or stop to exit: ") g.age = int(raw_input("Enter an age: ")) g.sqrtage = sqrt(g.age) list1 …

Member Avatar for Gribouillis
0
2K
Member Avatar for checker

[CODE]reader = csv.reader(open('new_mondy_csc_data_revise.csv'), delimiter=',', quotechar='"') header = tuple(reader.next()) print "%-14s|%-10s|%-5s|%-5s|%-11s|%-11s|%-11s|%-11s|%-11s|%3s" % header # read header line from csv print "-" * 45[/CODE] There are a total of 10 fields in the header across a csv file I want to print the first three instead, how can I do that?

Member Avatar for checker
0
101
Member Avatar for checker

[CODE]class Database(Student): def __init__(self): g = [] choice = ['Basketball','Football','Other','Baseball','Handball','Soccer','Volleyball','I do not like sport'] data = student.sport k = len(student.fname) print k freq = {} for i in data: freq[i] = freq.get(i, 0) + 1 for i in choice: if i not in freq: freq[i] = 0 for i in …

Member Avatar for checker
0
204
Member Avatar for checker

[CODE]element = {'H': 1, 'N': 6, 'F': 7, 'Cl': 7} i = input("Enter: ") dots = '*' totalDots = (dots * i)[/CODE] Enter: H Traceback (most recent call last): File "D:/Python26/lewisdot.py", line 4, in <module> i = input("Enter: ") File "<string>", line 1, in <module> NameError: name 'H' is not …

Member Avatar for jimothy
0
143
Member Avatar for checker

This is what I intended to do [CODE] class person: "class to represent a person" def _init_(self): self.name = "" self.age = 0.0 self.sqr_age = 0 class ageName: def listAgeName(x,y): # x is name # y is age x = 0 y = 0 listAgeName = [('John', 18)] p = …

Member Avatar for fallopiano
0
118
Member Avatar for checker

Hi. Since my layout does not fit 1024 x 768 (it was designed for 1284), I created another css that would fit 1024 resolution. However, I need to replace images with smaller size. It was only index, a few images. I cannot reduce the image size with css because it …

Member Avatar for MidiMagic
0
124
Member Avatar for checker

[CODE]<div id="background"> <img src="images/bg.jpg" class="stretch" alt="" /> </div> #background { width: 100%; height: 100%; position: absolute; overflow: hidden; left: 0px; top: 0px; z-index: 0; } .stretch { width:100%; height:100%; }[/CODE] I put this background the very first div container. It totally covered up my other pictures. I want to force …

Member Avatar for MidiMagic
0
124