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
Please keep in mind, that you are only allowed to use the python functions that have been discussed in class. Using other things you might find on the internet will invalidate your solution.
A1 – Data Sequencing
A2 – Selection and Repetition Structures
A3 – Modular Programming
B3 – Algorithm Design
File Name: “ICS3UhexNibbles.py”
Write a function that takes as an argument, a 4 bit binary nibble represented as a string, and returns its hex equivalent value as a String
Use that function to write a program that accepts an entire string of binary nibbles entered from the keyboard and prints out the full hex equivalent. The nibbles in the input must be separated by spaces.
For Example:
File Name: “ICS3UcubeMe.py”
Write a function that takes as an argument, an integer number with a maximum of 8 digits, and returns the sum of the cubes of the digits in the number
For Example:
Write a program that accepts an integer number from the keyboard and then uses the function above to test if the inputted number has the property that the sum of its cubed digits equals the number itself.
For Example:
Allow you program to continue forever until an input of 0 is made. A simple “Yes” or “No” is sufficient as output in this program
File Name: “ICS3UtheNthMax.py”
Write a function that accepts a list of integers, and returns True or False depending on if the integers in the list are all unique or not
Write another function that generates a unique list of random integers and returns a list of those values. Use the previous function to help you with that task. The function should accept 3 arguments: The number of values to generate, and the starting and ending values for the random numbers.
Write another function that can determine the nth largest number from a unique list of integers. It should accept the list and the value of n as arguments, and return the required maximum.
For Example:
Main Program.
You should ask the user to input the following:
Output: