These ICS4U Grade 12 Computer Science python coding questions will form a part of your final grade for this course and are to be handed in for grading.
For all of the following questions:
Your grade will be based on your ability to demonstrate the overall expectations from the Ontario Computer Studies Curriculum
A3 – Designing Algorithms
A4 – Code Maintenance
Since you will be using File Input and Output in these questions, store the name of your data file in a variable in the very first line at the top of your program. Then use that variable in your code to open the file.
The reason for this is so that I can easily change the file name with my own test data when grading. I won’t have to go and change anything in your code other than the first line.
#Example
inputPath = "dataFileIN.txt"
outputPath = "dataFileOUT.txt"
#Use that variable in your code
file = open(inputPath,"r")
File Name: “ICS4UcardDeck.py”
Decks of cards have suits and card values associated with them
For example, a normal deck of 52 playing cards has:
Some games might have a different deck of cards with different suits and different card values.
We want to write a program that, if it was given a file with a list of the suits and a list of the values, it will
File Name: “ICS4UfindThatMine.py”
If we would represent the same mine field with the hints, then we would end up with
Your job is going to be to write a program that generates those hint numbers given any mine field of any size.
The input for your program will be from a file that contains the mine field image.
The output for your program will be the mine field image with all the empty spaces replaced by their hint values (which are the number of adjacent mines).
Return to ICS4U Main Page