RSS Forums RSS
Please support our Python advertiser: Programming Forums

Help with programming assignment

Join Date: Apr 2005
Posts: 8
Reputation: mneaker is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mneaker mneaker is offline Offline
Newbie Poster

Re: Help with programming assignment

  #7  
May 1st, 2005
Thank you so much for your help! It really helped me figure out almost the rest of the program. But I am stuck again. On this part I have an array with GPA's for the students and I need to print a list of students who are on the Dean's List. This is what I thought would do it:

GPA = ['3.2', '4.0', '3.8', '1.2', '3.5', '4.0', '3.4', '1.4', '3.6', '2.7']

Name = ['John Smith', 'Nancy Doe', 'Eric Adams', 'Homer Simpson', 'Marilyn Monroe', 'Rory Gilmore', 'Gavin Degraw', 'Ashley Simpson', 'Brad Paisley', 'Dr. Phil']

if task == 3 :
count = 0
while (count < len(GPA)) :
index = count
if 3.4 < GPA[index] :
print Name[index]
print GPA[index]
count = count+1

It keeps printing out the entire list though. Thanks for any help you can give!
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:05 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC