These ICS3U Grade 11 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
YOU ARE NOT ALLOWED TO USE ANY FUNCTIONS OR DATA TYPES OR OBJECTS NOT TAUGHT IN THE COURSE (THAT INCLUDES SORTING FUNCTIONS, DICTIONARIES, FRACTION OBJECTS) TO SOLVE THESE PROBLEMS.
A1 – Data Sequencing
A2 – Selection and Repetition Structures
A3 – Modular Programming
A4 – Code Maintenance
B1 – Problem Solving Strategies
B2 – Planning
B3 – Algorithm Design
The following 2 Questions MUST be completed.
File Name: “ICS3UbestComputer.py”
When determining which computer to buy, you narrow your search categories to :
The most preferred machines will have larger values of P where
Your task will be to read a given list of computers and output the TOP 2 computers.
Input:
Ask the user how many computers they are going to compare (this is an integer) Then for each computer the following will be entered all on the same line from the user (Separate values using a comma)
Output:
File Name: “ICS3Uintersection.py”
You are designing a program that can find the point of intersection of 2 straight diagonal lines You don’t need to consider vertical or horizontal lines
Input
Output
Complete as many of the questions as you are able to or have time to finish. Your teacher will use his professional judgement to evaluate your programming skills and assign the last 40% of your assignment grade based on the solutions you create.
File Name: “ICS3UEmiliaNumbers.py”
A positive Integer will be an “Emilia Number” if it has at least two sets of factors where the sum of one set equals the difference of another set.
For Example:
Display all the Emilia #’s from 1 to 1000 (Make sure to display the two sets of factors)
File Name: “ICS3UfourFive.py”
I want to know how many ways a certain number can be formed using a sum of only 4’s and 5’s.
For example, the number 14 has only 1 way to form it using 4’s and 5’s
For example, the number 20 has 2 ways to form it using 4’s and 5’s
For example, the number 40 has 3 ways to form it using 4’s and 5’s
Output the total # of ways along with printing all possible sequences as shown in the examples
File Name: “ICS3UrepeatCipher.py”
You are sending a message to your friend. Instead of sending the actual message, you send a set of consecutive characters that represent the real letter. The number of consecutive characters determines the real letter.
If you sent the message:
It would decode to HELLO because there are
You need to write a program that DECODES messages
File Name: “ICS3UrebelAllianceCipher.py”
You are in charge of breaking Encrypted Rebel Communications for the Empire.
You have managed to plant an Imperial Spy inside the Alliance and every morning they manage to steal some very valuable information. They manage to steal both an encrypted message and its decoded equivalent. They have also figured out that the Rebel Alliance used a simple one to one code map to encrypt their messages. That means that each letter in the message was substituted for a different letter for the encryption. Simply comparing the two messages together you can see what letter was substituted.
You want to use this information decode all rebel communications for the rest of the day until they switch out to a new substitution.
If you acquired a message from your spy with the entire alphabet, then you can fully decode all the rebel communications because you have a complete mapping of the alphabet they used.
If you acquired a message that only had some of the letters, there will be a limit on how much you can decode.
Notice the decoded message is incomplete because the stolen encoded message didn’t have any mappings for the letters M, E, H back to the real message, so there is no way to tell what they represented.
What do you need to do?
Input:
Output:
Although not required you might want to write a program to encode messages as well so you can test using data other than my examples.