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…
Binary trees are useful data structures used to solve specific computational problems. They provide a visual representation of how data can be stored and linked. Computers use linked lists to store the information of binary trees. This blog post will…
A binary expression tree is a specific kind of a binary tree used to represent expressions. Two common types of expressions that a binary expression tree can represent are algebraic expressions and boolean expressions. These trees can represent expressions that…
In this blog post we will investigate four key algorithms used to read through the content of a binary tree: Breadth-First Traversal Algorithm Depth-First Algorithms: Pre-Order Traversal In-Order Traversal Post-Order Traversal Binary Tree? A Binary Tree is a data structure…
In this challenge we will use the print() instruction in Python to create an ASCII-bot: A robot made of ASCII characters, in other words characters that you can type with a standard QWERTY keyboard. Python Code This is what your…
An Italian Takeaway is asking you to write a computer program to facilitate the ordering process and automatically calculate the total cost of an order. They have stored their menu and all prices into a text file with the following…
A cinema has created a booking system for their main theatre which consists of 48 seats, organised in 6 rows of 8 seats. To store information as to whether a seat is booked or available, the program uses a 2-dimensional…
In this challenge, you will create a computer program to ask the end-user to try to guess the top 10 largest countries per area. To do so you will use a list in Python, containing the top 10 countries as…