IB Computer Science Unit 1
IB Computer Science Unit 2
IB Computer Science Unit 3
IB Computer Science Unit 4
IB Computer Science Unit 5
IB Computer Science Unit 6

IB Computer Science Practice Java Evaluation 2

Question 1

Consider the shape below. Write a program that will

  • Ask the user to input A, B, and C as integers.
  • Output the Area and Perimeter of the entire shape and the Product of all the angles in the triangle rounded to the nearest decimal place.
  • Pay attention to the side lengths that are the same size
  • The arc can be treated as circular.

Question 2

You have been assigned the task of helping a grade 9 math class with developing equations of linear graphs.


Write a program that will allow the user to enter the (x,y) coordinates of two points on a cartesian plane and output the equation of the straight line that passes through both of those points.

  • You should display the equation in both slope / y intercept form and in standard form
  • The points entered must be integers.
  • Slope – y intercept form is 𝑦=π‘šπ‘₯+𝑏
    • π‘š is the slope of the line and 𝑏 is the y intercept
    • Display π‘š and 𝑏 as a decimal numbers rounded to two decimal spots and as fractions
  • The fractions do NOT have to be in lowest terms
  • You don’t need to worry where the negatives show up as that will depend on how you code it. (You need additional programming concepts to make it look pretty)
  • Standard form 𝐴𝑦+𝐡π‘₯=𝐢
    • A, B, and C are always integer values.

Question 3

You been assigned the task of determining how fast you need to shoot a projectile from a cliff in order to hit a target a certain distance away.

Using some crazy physics and calculus skills you come up with the following equation for the initial speed of that projectile

Write a program that randomly generates a target distance and cliff height and then uses the equation to determine the launch speed.

  • The launch angle can be controlled through user input.
  • The initial speed can be displayed to one decimal spot.

Question 4

You have been assigned the task of helping a grade 10 math class with some quadratics.

Your program should be able to take the factored form of a quadratic and

  • Convert the Quadratic to Standard Form
  • Display the Vertex of the Quadratic function

Example: Given 𝑦=(2π‘₯βˆ’3)(4π‘₯+5)

  • Standard form 𝑦=8π‘₯2βˆ’2π‘₯βˆ’15
  • Vertex (0,-15)

Hint: The x coordinate will be halfway between the two roots since it is symmetric. The y coordinate can be found by plugging the x coordinate back into the equation.

Looking to Learn More about Computer Science and Coding?

Check out our programing in python courses that focus on high school level coding.Β Β 

  • Grade 11 Computer Science ICS3U
  • Grade 12 Computer Science ICS4U

These courses are complete with interactive coding lessons, teacher led videos, and more practice questions with complete solutions