ICS3U Python Programming Evaluation 8

UNDER CONSTRUCTION

Questions in this assignment are not finalized yet.  DO NOT COMPLETE

ICS3U Python Programming Evaluation Question X

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).

  • The answer, an (x,y) ordered pair, should be displayed as both decimal and fractional values.
  • You are NOT allowed to use the built in Fraction function that exists in python.
  • The fractions do NOT have to be in lowest terms.
  • The first equation will be entered by inputting values (A,B,C) using the standard form of a linear equation Ax + By + C = 0
  • The second equation will be entered by inputting values(m,b) using the slope-intercept form of a linear equation y = mx + b

You will need to get the inputs for TWO linear equations in order to solve the problem

ICS3U Python Programming Evaluation Question X

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:

  • 6 is an Emilia Number.  It has a sets of factors (6,1) and (2,3) where 2 + 3 = 6 – 1
  • 30 is an Emilia Number.  It has sets of factors (10,3) and (15,2) where 10 + 3 = 15 – 2
  • 84 is an Emilia Number.  It has sets of factors (21,4) and (28,3) where 21 + 4 = 28 – 3

Write a function that finds Emilia Numbers, and then use it to count how many Emilia numbers would you find for the numbers from 1 to 1000

ICS3U Python Programming Evaluation Question X

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.

  • A single consecutive character represents the letter “A”
  • Two consecutive characters represents the letter “B”
  • Three consecutive characters represents the letter “C”
  • etc

If you sent the message:

  • ********bbbbb&&&&&&&&&&&&999999999999zzzzzzzzzzzzzzz

It would decode to HELLO because there are

  • 8 “*” characters in a row -> H
  • 5 “b” characters in a row -> E
  • 12 “&” characters in a row ->L
  • 12 “9” characters in a row ->L
  • 15 “z” characters in a row ->O

You need to write a program that DECODES messages