954,558 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

March Madness Program Help

Here is another INPUT information output program. The first 3 select cases work correctly. I attempted the 4th and 7th select cases but they are not working correctly, i would appreciate any feedback i get, even if it's "I don't have a freaking clue." Could you guys help a girl out?

Thanks,

Ananda

Here is the code so far: (The NCAAdata.txt file and a more thurogh description of the program and it's perametors are attached)

'Ananda Bennett
'11/29/06
'NCAA


OPEN "c:\ncaadata.txt" FOR INPUT AS #1

'VARIABLE DESCRIPTIONS:
'Year           Columns 1-4
'Winning School Columns 6-24
'Winning Score  Columns 25-27
'Losing School  Columns 29-47
'Losing Score   Columns 48-50

'Numeric Variables:  Year, Winning Score, Losing Score
'String Variables:  Winning School, Losing School

'SPECIAL NOTES:
'The last game listed for each year is the championship game.
LET lowscore = 1000
PRINT"**********************************************************************************************************************************************************************************************"
PRINT"***** 1 - Total number of games where losing team scored more than 100 pts                                                                                                               *****"
PRINT"***** 2 - Total number of games where a team scored more than 100 pts     ***** *****"
PRINT"***** 3 - Total number of games won and lost by Kentucky (games won - games lost)*****"
PRINT"***** 4 - Lowest total points scored by both teams in a single NCAA Tournament game*****" '(include game information)
PRINT"***** 5 - Highest number of points scored by a single team in a game*****" '(include game information).
PRINT"***** 6 - Largest margin of victory*****" '(include game information)
PRINT"***** 7 - Average score of winning team and average score of losing team*****" '(avg winner - avg loser)
PRINT"***** 8 - Average points scored per game from 1975-85 versus 1985-95*****"
PRINT"***** 10 - What decade had the most total NCAA Tournament games*****" '(give all decades and the number of games played in each)
PRINT"***** 11 - List these teams: UCLA, North Carolina, Kentucky, and Kansas - With each team give the total number of appearances in NCAA Tournaments (wins and losses) and championships won*****"
PRINT"***************************************************************************"
INPUT "What information would you like search for? "; schoice

DO WHILE EOF(#1) <> -1
INPUT #1, year, winningschool$, winningscore, loosingschool$, loosingscore

SELECT CASE schoice
    CASE 1
        IF loosingscore > 100 THEN
        LET count = count + 1
        END IF

    CASE 2
        IF loosingscore > 100 THEN
        LET count = count + 2
        END IF

        'IF winningscore > 100 THEN
        'LET count = count + 1
        'END IF

    CASE 3
        IF winningschool$ = "KENTUCKY" THEN
        LET kwincount = kwincount + 1
        END IF

        IF loosingschool$ = "KENTUCKY" THEN
        LET kloosecount = kloosecount + 1
        END IF

        IF EOF(#1) = -1 THEN
        PRINT kwincount; " - " ;kloosecount

        ELSE
        END IF

    CASE 4
        LET totalscore = loosingscore + winningscore
        IF totalscore < lowscore THEN
        LET winner$ = winningschool$
        LET looser$ = loosingschool$
        LET lowestscore = lowscore
        LET lowscore = lowestscore
        PRINT "Winning school: " ;winningschool$; " Loosing school: " ;loosingschool$

        ELSE
        END IF

    CASE 7
        LET count = count + 1
        LET wscoreaverage = (winningscore + winningscore)/ count
         wscoreaverage
    PRINT wscoreaverage; " " ;winningscore; " + " ;winningscore; "/ " ;count


END SELECT
LOOP
CLOSE #1
Attachments March_Madness.doc (26KB) ncaadata.txt (54.97KB)
anandarose
Newbie Poster
20 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

I really need some help with this! I'm lost!

anandarose
Newbie Poster
20 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

The 4th thru 7th are calculated values from all the scores in the file. You can't print them out in the case statement, instead print them out after all the rows in the file have been read. You will probably have to add another case statement to do that.

For example, #4
Lowest total points scored by both teams in a single NCAA Tournament game (include game information

You need to have a variable that keeps track of the row with the lowest score. Than after all rows have been read, using another case statement print out the required information.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

I really hate asking this but could someone do this for me? I absolutely despise programing. I don't want to be a programer! The only reason i'm taking it is because it's required for the Web Technologies degree. I have checked with the other curiculum and I will not have any other programing classes. This is my last program before the final. If I don't get a C or higher i won't pss. I had all intentions of finishing the program myself but mmy dad's PC unexpectedly had to go get repaired this week. I don't have any other PC'S available because all we have are Macs. I can't go to the public library tonight because I don't have someone available to take me. (i'm a quadrapelegic so I can't do anything without some assistance. Please! I'm begging for help! If you help me, after this class is over, i will never post on this part of the forum again.

Thanks,

Ananda

anandarose
Newbie Poster
20 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

>>I really hate asking this but could someone do this for me? I absolutely despise programing

Nope. If you don't want to do it then drop the class and take something else, such as basket weaving, that you might enjoy better. No point in doing something that you hate.

>>i'm a quadrapelegic
Quadriplegia, also known as tetraplegia, is a symptom in which a human experiences paralysis of all four limbs, although not necessarily total paralysis.

If that is true, how do you do computer programming? If have seen films on TV about quadrapelegic using a computer with something in the mouth to control the keyboard, but it is highly unlikely they can program computers.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 
but it is highly unlikely they can program computers.

I wouldn't be so sure! There's a device in development that can interface with a human brain (motor control area), and someone whos paralysed (or just interested in the idea) can move a mouse around and select things. With a bit of work on the resolution of the device; i suppose you could map a full keyboard ^_- Just a brain controlled mouse would be convenient.

MattEvans
Veteran Poster
Moderator
1,386 posts since Jul 2006
Reputation Points: 522
Solved Threads: 64
 
I wouldn't be so sure! There's a device in development that can interface with a human brain (motor control area), and someone whos paralysed (or just interested in the idea) can move a mouse around and select things. With a bit of work on the resolution of the device; i suppose you could map a full keyboard ^_- Just a brain controlled mouse would be convenient.

I said it is highly unlikely, and you just reinforced my statement. If that device is still under development than it is next to impossible for the general public to have it. But it has great possibilities for those that need it.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

>>I really hate asking this but could someone do this for me? I absolutely despise programing

Nope. If you don't want to do it then drop the class and take something else, such as basket weaving, that you might enjoy better. No point in doing something that you hate.

If I don't pass this class I can't get my degree. Trust me, i wouldn't take this class unless it was absolutely necessary.I would love to be basket weaving instead. >>i'm a quadrapelegic


If that is true, how do you do computer programming? If have seen films on TV about quadrapelegic using a computer with something in the mouth to control the keyboard, but it is highly unlikely they can program computers.

I am a C1/C2 quadrapelegic from a brain stem stroke in the year 2000. My computer interface is a joystick that I push with my chin. It "talks" to the computer via an infrared display module that is attached to my chair. That enables me to move the mouse as effortlessly as you do. As for typing and clicking, Google "Keystrokes". You can see my chin switch in the pictures on my homepage: www.homepage.mac.com/rosiebennett


Ananda :twisted:

anandarose
Newbie Poster
20 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You