In this challenge you are going to use Python code to score a goal in a game of Water Polo. To do so you will use the code given below. You will pass the ball from one player to another…
Learning Objectives In this post you will predict the output of logic gates circuits by completing truth tables. First you need to learn the basic truth tables for the following logic gates: AND Gate OR Gate XOR Gate NOT Gate…
The purpose of this challenge is to understand how subroutines (functions/procedures) are used in Python to create sections of code that can be called/reused many times within a program. Subroutines mean that a section of code can be identified using…
Angles are often used in Computer Science especially when creating 2D or 3D user interfaces. Angle measurements are given in either radians or degrees. In this blog post we will use degrees. As the angle increase, the name of the…
Variables are used in nearly every single computer program. They are an essential concept and can be used and manipulated using many different techniques. The following spider diagram summarises the key computing concepts linked to the use of variables in…
Weather Data for Quebec City, Canada For this challenge we will use a two-dimensional array (in Python a list of lists) to store the average temperature (in Celsius degrees) and the rainfall (in mm) for each of the twelve months…
In Mathematics, the factorial of n is denoted by n! and calculated by the product of integer numbers from 1 to n. For instance: In this challenge you will write a program using Little Man Computer to ask the user…
Write an LMC program to let the user enter two numbers, num1 and num2. The program should output the results of multiplying these two numbers: num1 x num2. LMC Simulators Online LMC Simulator Alternative LMC Simulator Solution While checking the…
Write an LMC program to let the user enter a number n. The program should calculate the output n + (n-1) + (n-2) + … + 3 + 2 + 1. For instance if the user enters the value 5.…
Write an LMC program to let the user enter a PIN code to deactivate a burglar alarm. The program should let the user have up to 3 attempts to enter the correct PIN code before starting the alarm. The correct…