Following my introduction to Java through the AP Computer Science A course I examined the use of the Scanner class, which takes in user input and stores the data in a variety of ways. In this simple exercise I imported the scanner class, instantiated a new element of it by the name of “kb” and…
Tag: Coding
Magic Five Coding Exercise
This is one of the first programs in the AP Computer Science A course at school. That course mainly focused on the basics of Java programming, following the Codeio exercises as means to practice. The magic five is an exercise in which a user inputs a number greater than 0, and through a series of…
Monopoly Bank System on Python
I’ve always played a version of Monopoly that provided the players with an in-game credit card, which could be used in transactions made on a card reader, which was also provided. I was disappointed to see that the new copy that I bought only had paper money. Because of this, I made the decision to…
Solving Factorials Using a Recursive Function
This program will print a range of factorials from 0 to the number given by the user. I begin by defining my function. Every recursive function has two major cases: a base case, and a recursive case. In this program, the base case is x being less then or equal to 1. The recursive case…
Analog Input Blink
I used an example from Arduino.cc to practice receiving analog signals through the analog inputs. In this example, the wait time between the blinks of the embedded LED are going to be sent to the Arduino UNO board from the potentiometer. The potentiometer sends voltage to the analog input, which in turn converts it to…
Finished Otto 3D Printing
This week I finished 3D printing the parts for the open source robot Otto, which I began printing last week. This was possible due to my access to the 3D printers at my school. The next step in creating Otto will be assembling.
Otto DIY – Walking Robot Project
Otto DIY is an open source robotics project. I have already 3D printed the leg parts of the pre-made model, and prepared the stl files for printing using Tinkercad. After the rest of the parts are printed, Otto will be ready for assembling. I’m planning to teach him how to walk by creating movement functions…
Nice to Meet You, GitHub!
The next stop in my programming journey is GitHub. Its a website that allows programmers to store their code safely, while also giving them the ability to easily restore every saved version of it. I recently made and account on GitHub, and began learning the git commands for working with local and non-local repositories. Knowing…
Weather API: Pulling Resources from the Web
The goal of this script is to show a six day forecast from the command line. It would include the date, temperature, and one word summary. In order to pull up the necessary information, I used an API from https://openweathermap.org/api Formatting The output of the program should be formatted as the following: **Sample Output:** date, average temp, summaryNov 30 – 23 C, sunnyDes 1 – 30 C, cloudyDes…
Bricks – Pygame
I made this project as a birthday gift to my awesome older brother, Max. He helps me learn programming in his spare time, and is always very supportive towards me. Moreover, this was a great opportunity to learn more about the structure of the PyGame library. Originally, this project came from the book “Python, PyGame…
Updatable Clipboard – Python Project
The goal of this project was to create a program that uses the shelf module in order for the user to be able to save copied text under a keyword, and then retrieve it by typing the keyword in the program – which then pastes the text in to the clipboard. As an an addition…
Regular Expressions – Date Detector
This python program used regular expressions to determine whether a given date is correct or not. Leap years and days in a month are calculated as well. First, we can import re, and any other library that might be useful. In order to check whether a date is correct, we need to know how many…
Arduino Blink
As one types in their first line of code with: print(“Hello World!”), when starting to work with Arduino the first program will be blink, which involves one of its many components – LED.
Equation Solver
As student it can be boring to do math, especially if its just repeating the same thing over and over. Well, to solve that problem, I created a function to solve many equations at a time, using well – more math. Here I use string manipulation methods in order to solve these proportion equations in…
Merry Christmas!
Merry Christmas and Happy New Year from Cubit, the little reindeer!
Buggy Code Part1
Challenge 014 Fix the code in the code tab to pass this challenge (only syntax errors). Look at the examples below to get an idea of what the function should do. Examples Solution
To the Power of _____
Challenge 013 Create a function that takes a base number and an exponent number and returns the calculation. Examples Solution
Return a String as an Integer
Challenge 012 Create a function that takes a string and returns it as an integer. Examples Solution
Convert Hours Into Seconds
Challenge 011 Write a function that converts hours into seconds. Examples Solution
Fifa Scratch Project
This year I wanted to create something special for my brother’s birthday, and decided on a scratch project about his favorite video game – Fifa. This game is only in the least bit interactive, but it was a really fun idea which turned out as a success. Happy birthday bro!
Return the First Element in a List
Challenge 010 Create a function that takes a list and returns the first element. Examples Solution
Find the Perimeter of a Rectangle
Challenge 009 Create a function that takes length and width and finds the perimeter of a rectangle. Examples Solution
Area of a Triangle
Challenge 008 Write a function that takes the base and height of a triangle and return its area. Examples Solution
Convert Age to Days
Challenge 006 Create a function that takes the age and return the age in days. Examples Solution
Return the First Element in a List
Challenge 005 Create a function that takes a list and returns the first element. Examples Solution
Convert Hours and Minutes Into Seconds
Challenge 004 Write a function that takes two integers (hours, minutes), converts them to seconds, and adds them. Examples Solution
Return the Remainder from Two Numbers
Challenge 003 There is a single operator in Python, capable of providing the remainder of a division operation. Two numbers are passed as parameters. The first parameter divided by the second parameter will have a remainder, possibly zero. Return that value. Examples Solution
Convert Minutes into Seconds
Challenge 002 Write a function that takes an integer minutes and converts it to seconds. Solution
Return the Next Number from the Integer Passed
Challenge 001 Create a function that takes a number as an argument, increments the number by +1 and returns the result. Examples Solution:
Return the Sum of Two Numbers
Challenge 000 Create a function that takes two numbers as arguments and return their sum. Examples Solution:
Line Follower
The goal of the Line Follower project is to create a Lego robot that would follow along a line. The extra challenge was to use only one color censer. The base of this robot is a simple two wheeled construction allowing a high verity of movement in all direction. It consists of the following parts:…
MESA Scratch it Up 2019-2020
The Scratch it up competition piloted in the season of 2019 – 2020. When participating, the team of two had to create a functional videogame in 60 minutes. Guidelines When submitting a game for the competition, it had to follow many criteria and guidelines in order to be qualified to enter. Here are the official…
MESA DAY 2019-20 Award.
Scratch It Up MESA DAY 2019-20 Project Award – Second Place!