What component? I thought it was pretty typical for an object oriented language. Although to be fair I was taught that alongside several others in a supplementary called Vocational Languages.
well i'm creating a program that randomly selects a number out of 3 (1,2,3) if you choose that number by random you lose. if you don't, you win. The problem i am having is saving the "score" in a file that can be edited as it goes on. so say you win you get +1 and when the program restarts the score is win 1 lose 0
Well, as I don't know the precise nature of your problem, whether you're having problems outputting, or reading the values back in afterwards, or if Python doesn't close out the file and there's some hoops you have to jump through to do it the "right" way so program won't complain.
Oh, and if this turns out to be stuff you've already seen, I apologize. I'm used to having reams of exceptions and program line pointers to direct my correctional efforts in debugging programs. My best advice for any language, is to keep documentation and API's near at hand and throw the subject of your problem at google. There have been millions of programmers asking hundreds of questions each so the web is awash with advice and examples.
Not to mention the encyclopedic overview the online API provides..
Just sounds like a nested bunch of while loops that retain the score from 2 separate counters.
I mean hypothetically you could filestream the score to a text file if the language allows it for saving outside the program, however the program looks like it could be easily contained within
that and using SRAND against the system clock to randomize the roll of 1 through 3 of the losing number is what you should go with.
any chance you be willing to take a peak at my code. i am really confused and ready to submit it as is but if there is a chance of fixing it i'd really like to know how XD
Only reason I mentioned input-output was based upon what I thought was project/assignment requirements set by your professor.. But if you want I could take a look at it, seeing as I'm fully awake right now.
For an I/O intro to Python, I'd suggest you go here: http://docs.python.org/2/tutorial/inputoutput.html
Not to mention the encyclopedic overview the online API provides..
I mean hypothetically you could filestream the score to a text file if the language allows it for saving outside the program, however the program looks like it could be easily contained within
that and using SRAND against the system clock to randomize the roll of 1 through 3 of the losing number is what you should go with.