
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||
| > > |
Repetition, files, and ColorsLearning Objective(s)
Overview of the ProgramThe program is to allow the user to guess colors in a file. The file contains numbers representing colors with 4 per row. The program is to allow the user to guess each color and output the number correct.Details
Example program dialogue:These are not meant to be sufficient testing. Nor must you follow the exact wording. They are just to demonstrate what an acceptable program might do for certain inputAn example of the data file is: 1 1 1 1 2 2 2 1 1 2 3 4An example of an acceptable dialogue: What is the name of file? datafile What is your guess for the next color on this line? 1 You got that one right! What is your guess for the next color on this line? 2 You did not get that one right :(. What is your guess for the next color on this line? 1 You got that one right! What is your guess for the next color on this line? 2 You did not get that one right :(. You got 2 right for that line. What is your guess for the next color on this line? 2 You got that one right! What is your guess for the next color on this line? 2 You got that one right! What is your guess for the next color on this line? 2 You got that one right! What is your guess for the next color on this line? 2 You did not get that one right :(. You got 3 right for that line. What is your guess for the next color on this line? 1 You got that one right! What is your guess for the next color on this line? 2 You got that one right! What is your guess for the next color on this line? 3 You got that one right! What is your guess for the next color on this line? 4 You got that one right! You got 4 right for that line. Overall, you got 9 colors correct. Submission
Hints
Optional improvementsOptional improvements should ONLY be worked on once the program is completing working. In addition, the work is to be done on your own with little if any help for lab assistants or the instructor.
| |||||||