ICS3U Python Programming Evaluation 1

Instructions

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:

  • Use a python IDE of your choice (Spyder, IDLE, Pycharm, etc) and create a coded solution to the given problem.
  • Hand in the .py files for your solution.

Your grade will be based on your ability to demonstrate the overall expectations from the Ontario Computer Studies Curriculum

A1 – Data Sequencing 

  • Use variables to carry out mathematical calculations in a computational proble

B3 – Algorithm Design

  • Design and implement algorithms that solve problems

ICS3U Python Programming Evaluation Question 1

File Name:  “ICS3Umouse.py”

Create a program that draws the image below on the screen.  You are only allowed to use 1 print statement.  (The quotes for the feet are double quotes)

ICS3U Python Mouse Drawing

ICS3U Python Programming Evaluation Question 2

File Name:  “ICS3UtriangleArea.py” 

Write a program that asks the user to enter 3 sides lengths of a triangle and then displays the area of that triangle rounded to 2 decimal spots.  You can use the Heron’s formula to calculate the area.

$$ area = \sqrt{s(s-a)(s-b)(s-c)} $$

$$ s = \frac{a + b + c}{2} $$

Be aware when testing your program that not any 3 random side lengths will actually form a triangle.  (You don’t have to take that into account when writing this program)

ICS3U Python Programming Evaluation Question 3

File Name: “ICS3Ubudget.py”

Your program is going to display a persons budget for the month.  Generate realistic random values for the following budget items.

  • Food
  • Clothing
  • Entertainment
  • Rent

Your program needs to output the $ value of each budget item, along with the percentage of the total for each budget item.  Those percentages should be rounded to the nearest whole percentage.  You need to make sure that the displayed percentages always display to 100% each time the program is run.  That might require some creativity for doing the calculations.