No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Fork Truck Driver / Shipping
- Interests
- I like all kinds of sports
13 Posted Topics
Hi, I am trying to average student GPA. I thought I had this problem solved but then I ran it and the GPA did not come out correct. Can anyone give any suggestions? [CODE]import string import math class Student: def __init__(self, name, hours, qpoints): self.name = name self.hours = float(hours) … | |
Hi, I did get the problem fixed with my "break" not working properly but now my ValueError will not work properly. If you enter a number that is not a floating number it should create a value error(as a matter of fact it did before I fixed my other problem … | |
Hi, I am trying to extend my "Student with the best GPA" program so that it allows the user to sort a file of students based on gpa, name, or credits. The program needs to prompt for the input and output files and also the field to sort on (gpa, … | |
I am having a problem getting my "break" to work correctly in this program. Can anyone help me see what I am doing wrong? This is my program: [code]import string import math class Student: def __init__(self, name, hours, qpoints): self.name = name self.hours = float(hours) self.qpoints = float(qpoints) def getName(self): … | |
Hello, I am trying to create a program that uses a dictionary to associate American states with their capitals. It has an interactive loop that exits when the user enters "quit". The user types the name of the state and the program responds with the state's capital. I will show … | |
Hi, I cannot figure out why my fib problem is giving me the output below. I just want it to print when the fib is called and the value of n, when it returns and with what value of n, and the return value. This is what I have so … | |
Hi, I am trying to figure out how to print tracing information for Fibonacci numbers. output = Computing fib(4) Leaving fib(4) returning 3 Can anyone steer me in the right direction? This is what I have: [code]import math def fib(n): if n < 3: return 1 while n >= 3: … | |
Hi Everyone! I need a little help with this problem. I am trying to import a class -- Student with object makestudent but I keep getting this error: [CODE]This program sorts student grade information Enter the name of the data file: p2sortin.py Traceback (most recent call last): File "C:\Python23\p2sort.py", line … | |
This is what I have come up with but it seems like there should be a more simple way of programming it. [CODE]import string import math class Student: def __init__(self, name, hours, qpoints): self.name = name self.hours = float(hours) self.qpoints = float(qpoints) def getName(self): return self.name def getHours(self): return self.hours … | |
Help! I am trying to enter characters (for classroom grades) into my program and convert them to numeric values so I can get gradepoint averages. I can't figure out how to convert A-, A+, B-, B+, etc... Can someone help? This is what I have: [code]class Student: def __init__(self, name, … | |
HI, I HAVE BEEN TRYING TO FIGURE THIS PROBLEM OUT ALL DAY LONG. CAN SOMEONE PLEASE HELP ME ALONG? I WILL TELL YOU THE PROBLEM AND THEN SHOW YOU WHAT I HAVE SO FAR. I AM TRYING TO MODIFY THIS RECURSIVE PROGRAM: [code=python] def fib(n): if n < 3: return … | |
O.K. This is what I have changed in my [URL="http://www.daniweb.com/techtalkforums/thread65045.html#"]program[/URL]: import string import math class Student: def __init__(self, name, hours, qpoints): self.name = name self.hours = float(hours) self.qpoints = float(qpoints) def getName(self): return self.name def getHours(self): return self.hours def getQpoints(self): return self.qpoints def gpa(self): return self.qpoints/self.hours def addLetterGrade(self, LetterGrade, credits): … | |
Hi, I need help please. At first I was understanding the Python language but I got lost somewhere along the line. Can someone please guide me through implementing an addLetterGrade method? I am not very good with computers and I am having a very hard time. This is my first … |
The End.