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…
Category: Coding
Python HTML CSS JavaScript
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…
Integrated Chat GPT using the AI Assistant Feature
Ever since it’s debut on November 30, 2022, chat
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…
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…
Climbing Snail – Python Challenge
A snail climbs a pole, “H” meters in height. It climbs up “A” meters during the day, and slides down “B” meters during the night. It is known that A > B, and B is greater than or equal to 0. On which day, will the snail reach the top of the pole? My solution…
Digital Clock Python Challenge
The goal of this Python challenge was to create a program which would convert the amount of seconds given by the user (starting from 0:00), to an h:mm:ss notation. The amount of hours must not go over 23, just like on a digital clock. My solution is displayed below. First, the program takes in the…
Arduino Traffic Light
In this project I created a traffic light prototype with an Arduino UNO. The LEDs would have to light up at the sequence of a real traffic light and work in a constant loop. Materials used in the project: Arduino UNO breadboard 5mm LED 220 ohm resistors wires I used the Arduino programming software to…
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 Expression for Contact Information
This is yet another project using regular expressions that will help us find all phone numbers and emails on a page which is posted in the clipboard; the search result will be put in to the clipboard as a string. To start, we need to import the libraries that we need – in this case…
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…
MESA Project 2020-2021
This year dates the time when the MESA project held the Scratch-it up competition during MESA day for the second time. Although due to the circumstances which we all know as COVID – 19 prevented the competition from being held in CSU-LA ‘ s campus, the rules were adapted to the current situation. General Rules…
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
Maximum Edge of a Triangle
Challenge 007 Create a function that finds the maximum range of a triangle’s third edge, where the side lengths are all integers. 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:
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…