Evan's Portfolio

Number Systems

9/6/19
Today in AP Computer Science we were first intoduced into the class and given simple instructions.Today, we did a assignment that required peer programming. This taught me that I have to be able to work in a group to be successful in the assignment at hand. We worked together to create a Binary,10base, and hex table using code. In peer programming there is the navigator and the driver. The navigator is the person who tells the driver what needs to be done. The driver then inputs the data and starts to create the table. This involved alot of communication between the two. This taught me that communication is key when working with another person and is why that is a very important skill to have to be sucessful. My partner and I both had a good sense on what had to be done. We were able to stay on task which allowed us to work at a good rate. This is what we have done today and what I have learned about what happened today.

Research

9/09/19
Today I researched about Drone swarms. The information that I found on that topic was very intresting. The Drone Swarms are going to be used as a military asset for defense and attack. The drones are suppose to have capabilities that all other military assets don't have. The drones are suppose to be able to protect against missiles by "body blocking" the incoming missiles. For attacks the swarm is able to take damage and not have any affect and can work on different enviorments such as the sea, ground, and air. The swarm is supposed to be a great advancement in military technology. You can read more from click here

My classmate researched about self-driving cars which are suppose to be the future. Self-driving cars operate using sensors and cameras. The benifits to self-driving cars are less car accidents and less traffic jams when in a car. This is because with a computer drving the car there is minimal error or distractions like talking, music, looking for the right exit, etc. This shows how self-driving cars benefitcial. There are some flaws like the sensors not picking up on everthing around it. You can read more about this here click here

Straw Bridge Project

The past two days in AP Computer Science we worked in teams to create straw bridges and it was a competition between other teams to create the longest bridge without touching the floor. This was a challenge for when the straws get too long it starts to bend. With this we had to devise a plan to make the structure strong and supported we had many hurtles to over come with this project.
This project helped us with several skills like team work, logical thinking, and engineering. This was a tough challenge designing and excuting a plan. What my group came up with was a strong base that would be supported by paper wrappers that were on the straws and triangles for support. After we devised this plan it was time to execute. This was easy because we were able to work in stations making everything one by one then adding it all together to make a structure.
We were able to make the longest bridge out of our entire class which came with saying we were able to/ bragging rights. We had alot of sucess with the design we came up with. This is what we did as the group and what I learned from this activity.

Computer Program(Data Encryption)

The program I want to make this year is a data encription program. The reason I want to make this program is because I think security is very improtant and that everyone should have it. The program is suppose to protect important files you want to keep secret and can only be accessed by you. It continuously scrabbles the text until a encription key is put in so it stops. This is a very good way to protect important items. I will use a randomization program that scrabbles words that cannot be deciphered. I will also be adding a encription key which can be accessed by using a one word key. This is what my program is going to do and how it will work.

Python Data Encryption

2A) Today I started my data encryption program which I made in python. The reason I made the program in python is beacsuse I am very familiar with python. My data encryption program is suppose to make words that you know then jumbling it all up to encrypt it. This is to allow more suecurity for people such as making a password for a important account. This is what my program is aiming to do and help with.


2B) A problem I ran into was trying to use symbols in my code. The reason why this is a issue is because some of the symbols are used in python causing errors. I am not sure on how to fix this issue at this moment but I am going to continue trying. The reason I think it is a symbol that is causing an issue is because of the hashtag symbol which is used to make numbers and the / symbol which comments something. This is the issue I am having right now with my code.


2C) Another algorithm that I created is a decryption table to decrypt what I encrypted so I know what the encrypted word means. This is another Algorithm that I created in my program. The algorithm is meant to make

Learning How to do Arrays

Today We learned how to use and output arrays to make our own versions of our schedules. My program is supposed to recreate my schedule that I have for this semester. The program used a list of values that are outputted into a array which list the various classes and days. A challenge was repeating the code over and over again changing only a few letters or numbers at a time which was very annoying. This lead to really disorgaized code meaning it is hard to read. In the future I want to add a loop function to repeat the code and change the few words that need to be.

CS Innovative topic (Biometrics)

*Made Pic Myself*


The Innovation I just read about is Biometrics which is when it takes your physical traits and use them as passwords. This innovation is meant for more security and having not to worry about losing something when it is something that is about you like your eyes, walk, talk, etc. This had a great effect in society for people don't have to feel so scared about information being leaked for now with biometrics it is really hard to access peoples private things. this is how this innovation has effect people. click here

CS Innovative Topics (3D Printing)

This innovation is a great thing to have. The reason why is it can replace any body part once the technology is fully developed meaning it can reduce the amount of people with disabilities for we can make new limbs for them to have that are fully functioning and that are made from real cells. This can be great for society to have for this is a great medicial innovation that can be used in multiple application. This is how it relates to society. click here

How a Computer is Setup

Spaceship Builder

My program is supposed to display the different parts of the spaceship from the nose to the thrusters. The program displays multiple shapes to form the shape of the spaceship. A problem we ran into was finding the correct x and y coordinates to display each shape to make it as close as possible to the image we are trying to recreate. We were able to get a mouse recorder which shows the x and y coordinates of the mouse to be able to find where we need to put the shapes.

Spaceship Essay

The program used to make this spaceship builder is in java and using different shapes and functions to make the spaceship This program uses sub algorithms to make shapes into objects that have a resembelance to a spaceship. The program takes the sub algorithms to make another sub algorithm that makes a shape ontop of the already made shape from the sub algorithms lready made. The program makes new parts of the spaceship through all the different sub algorithms that are named ship ith a different number for each. This allows the code to be more organized because you know what sub routine does what meaning you don't have to endlessly look through code to find a certain sub routine.

A problem that I found pretty difficult was finding the exact coordinates of where each of the different shapes/parts of the spaceship should go for I had to take a long time to guess and check. But, then I found a really helpful solution which tracked my mouse when I hover over a area on the screen which provided the x and y coordinates for the mouse curser. This was a big help in coding this program. Another problem was re-organizing my code for all my functions and sub routines were everywhere maeaning that I could not find any of my code I was looking for. A solution that I found was putting all the functions into sub algorithms to be able to look through the code easily.


This shows a some of the sub algorithms that I used in my program. Each of the sub algoithms use the algorithm before to make a new algorithm that includes another shape with the image before. This allows for mulitple ships each having different parts of the spaceship. Each algorithm includes the fill function to color the shapes. The x and y values of the new shapes are the x and y value to move the whole object together. In order for the new shape to say in the same place I had to take the x and y variables that I change to move it's location and add or subtract for the number inputted to get the exact location for that shape.

As in the picture sub algorithm called ship 3 takes in the code from sub algorithm ship 2 and adds ontop of it a new shape. The way I added the new shape allows the shape to move based on the x and y coordinates that I use but to make sure it stays in place in the peice of the spaceship I have to add or subtract from the given coordinates to make it stay in shape.
This is the abstraction used to make this program. The abstraction is seaperated into different sub algorithms to allow for maxium effeciency for now I am able to call each routine individually moving the whole object all together. This makes the program a bit more complex for you have to know how to seaperate functions and combined them into algorithms to make all the shapes needed for that one part to come together. This allows for more sub algorithms making this program more complex.

Scratch Robot Program

The robot for the apprentice program moved in a square formation. You were able to use the function over and over again for different parts of the program you are trying to make. A heuristic program is a program where the object that is used to move learns or progresses through out the program which is basically like a level based game.

Smart Cities: :The Future of Urban Development

This innovation is turning a city into a smart city. What that means is being able to use the technology we have today and use that technology for the city. Some of those things are sensors which collect important data for the city like air quality, water, electrical, etc. The data from these sensors can be used for the city and the people living there. Another thing is with technology in the smart city can connect people from all around the city such as public wifi everywhere. This will allow everyone to be connected. This can help with social and economics for we can put algorithms to count and give data to the government such as the economy and things like that.

Converting Binary Numbers into Hex and Ten base

Today we had to create a program that can convert binary numbers into ten base. This was a very difficult challenge and took me and my partner a while to figure out. First we had to figure out how to change the output before the input to zero so that it is zero everytime. The way we did this was by making a button to click to reset the values in the table. Another issue was to figure out the numbers and so what we came up with was filling in the number slots with the powers of 2 all the way up to 128 to account for ten base. After that it would add all of it up and give back the output. This is as far we have gone with the program and hope to make it more advance in the future.

Learning Scratch

In my sound project I tried making the school fire alarm. I wanted to use the 3 sounds and edit them to make the different components to make the fire alarm. I was able to find all the sounds I wanted and all I had to do is to edit the sounds. When I was editing it I ran into an issue when I did not know when to delete a part of the clip to make the sound complete. I fixed it by putting my curser on the sound to find the exact location. This is what I did today.

Scratch (day 2)

I have further developed my program that I was working on Friday. I am trying to create a alarm system where if you click a sprite and it plays a alarm for fire or a different sound signaling that you have to leave the buliding. I wanted to be able to create a program to play abunch of different sounds together at once. also to make a sub algorthim that stops all alarms/sounds. I found that if I attach the sound to different sprites I can play mulitple sounds at once. I used my block to create a algorithm where if the sprite is clicked the sound will play and the sprite will say to leave or if there is a fire.

Programming Ideas

The First program I am thinking about doing is the data encrytion program. I am planning to make a number/letter swapper to make the letters and numbers of each word or sentence used encrupted. Also I would add a decryption program so you are able to read a message for someone maybe like a friend. Also this program can be used to protect your information and to send secrets to people.

Another idea I thought about doing is a random anything generator which will take a topic like letters, numbers, books, etc. and out put a random one. I am planning to do this with multiple list and making them equal to a different number so that when I run the program and a randum number is picked it will out put the word that it is equal to. I will take information and use it to make the list for my program. i will be able to make the program have a search bar for a random topic they want a randomizer for.

The last idea I might want to make is a weather app. This app will take data straight from a weather station and sort the information into different labels like storms, rain, snow, and so on. The way I will make this is making a sub algorithm that takes the information and outputs it to different list. Then with each list it will sort it from high to low regarding temperature. This is how I will display the weather on the weather app and how I will make it.

Problem/Opportunity

A problem I encountered was how to make the temperature number or the number to represent the temperature. I thought being able to show the temperature was going to be hard. But, then I remembered that this is only a test and not a actual program needing realistic data.
The way I fixed this issue was by making the numbers random but also in a general range that is known for that area of the country to make it somewhat realistic. I would add 6 things to the list to represent the 6 places that I put into my list.

Factorio Project (Day 1)

We were trying to make the coal mining automated and that it can supply the coal for the other machines. Due to having to manually mine iron was a pain for it mined one at a time and broke only after a few swings. finally we were able to make the machines neccessary for the automation of the coal mining. By the end of class we were able to set up a automated stone miner and a automated coal miner.

Factorio Project (Day 2)

We were able to automate the coal process and a automatic transport to the machines that need coal. This allowed for the auto mation of the iron and copper mining areas. Then we moved into trying to make power. We ran into some issues such as the way the pipes and the machines should face and then the steam engine for some reason not getting power. So we used the wiki for Factorio which is “Tutorial:Quick Start Guide.” Tutorial:Quick Start Guide - Factorio Wiki, wiki.factorio.com/Tutorial:Quick_start_guide. This helped with figuring out the power issue for the machines.

Factorio Project (Day 3)

We were able to create the water pump and steam engine system and expand on it by adding steam engines to provide more eletricity. The materials requried to make the amount we wanted took alot of time. We were unable to make as many as we wanted to due to the fact we needed alot of resources which at the time we did not have enough of. So we did with what we had and made all the steam engines we can make which provided more eletricity leading us to want to upgrade our machines into ones that use eletricity.

Factorio Project (Day 4)

Today we were able to complete our automatic steel making area leading to us wanting to make plastic. While we were reseraching we had to make many potions so we invested research in making a auto assembly maker. We were able to finish it very fast. We were able to make the coal mine more efficent for we replaced the coal burner mines with a eletric one allowing for more coal. While in the process I was attacked by aliens and died once so we made measures against this by using turrets which protected our base. This allowed us to work more effiecently because we know we won't be attacked.

Factorio Project (Day 5)

we were able to create a home base now that is safe and secure with many turrets with upgraded ammo we also set up a defesnse line and was able to fight off the aliens. With the aliens attacking us we figured out the polution and now are trying to research for things that reduce polution so that we don't get attacked. This led to the use of measures such as getting rid of the burner miners and switching to eletric ones to clean the air. We set up our oil pumps now and are looking at ways to use it.

Factorio Project (Day 6)

When we logged in we were attacked by the aliens again and we were finally able to hold them off with all the new advancements we made such as gun turrets with new ammo which can kill them faster. We then ran into a issue where we have to keep on crafting the saming thing over and over again. So we made assembly machines mark 2 and upgraded it so that we were able to make automatic potions. We ran into a issue where we ran out of power and did not make enough. We now have over 30 steam engines to supply power to our base. But, with this we now have to deal with polution in the future. We replaced almost every mine with eletric using mines also for faster research we now have 6 labs to increase it by x6 which is really fast for not having any speed modules. This is how far we are now and will be progressing more in the future.

Tic Tac Toe

I played Tic Tac Toe against a AI and won. I clicked on the boxes I wanted to mark leading me to victory. The code has a function were it lets the player win.

To change the background color under the size statement I used the background function and RGB colors to change it to a light blue. Under the mouse relase line I put a fill function which allowed it to change the colors of the x's, o's, and the rectangles. I took pity on the computer and lost.

Tic Tac Toe (day 2)

I played Tic Tac Toe against a AI and had a tie. The boxes I clicked allowed for a stalemate due to nethier side getting 3 in a row. This was possible because the AI is avoiding my X or blocking it off before I can get 3 in a row meaning it can tie with me. This function allowed for me to get a tie with the AI.


I added images to the canvas that can potentially replace the x and o of the Tic Tac Toe game. The way I did this was using the image function to get the image onto the screen. First I used the Void setup to load the image first. Then used the variable attached to draw out the image then moved the image and changed its size using height and width. Also the X and Y coordinates so that it can look like it is in the places of X and Y.

Tic Tac Toe (day 3)

I added the new variables that relate to the wins, losts, and ties scored during the game. these variables will change everytime you win, lose, or tie with the AI. Then it will display the number of times you won, lost, and tied with the AI.

Tic Tac Toe (day 4)

The tie function is called when the AI and the player reach a point where either both win or neither win leading to a stalemate (tie) So the function is called which changes the amount of ties in total you have. After recording it it will reset the board to make it so you can play again.


I replaced the if won function with this new function which adds a point to the total ammount of wins earned while playing against the AI. After it resets the board with the resetBoard() function which clears the board so that you can play again and maybe win again.

Tic Tac Toe (day 5)

The take the win function in the program now is able to get a really good win to losses percentage and can win on its own. The stratgy used to see if their are two spaces occupied by the same marker then fill in the last one to make it a win for the computer.

Bounce Project (Day 1)

Today edited my bounce project and changed the colors to what I wanted. First I changed the first ball to a light pink color. Second I changed the other ball to a royal blue color. Then I changed the background color to a lime green color to make it stand out more. Then I posted it on my portfolio.


Today I also edited the assignment of the balls. First I changed the numb. Second I changed the otheer to 1 which represents the first ball.Then the second ball to ball 3 which represents it. Then I posted it on my portfolio.

Bounce Project (Day 2)

Today I added more toys to the program by expanding the number of toys and the amount size and color. I first made 5 new toys. After I resized them to be 30 px in size. After I changed the color of each one to make it unique so that all the balls are able to be recognized. Then I added each of the draw functions in to make all the balls appear at the same time on the screen.

Bounce Project (Day 3)

Today I added a few lines of code to the bounce project. I added the code under the first part of the script. Then I looked at the output which showed a nice light pink color and then took a screenshot to post on to hear. This is what i did today to the bounce project.

Bounce Project (Day 4)

Today for the bounce project I replaced some lines of code to change its outcome. I changed the sizes and the amount of toys that will be displayed. Now the maximum toys is 10 and there is a random size between 200 and 300 px. This is what I changed and how it looks for I took a screenshot of the outcome as you can see above.

UML Design

Today I watched a tutorial video on a UML Class Diagram which showed the different parts to it such as sub classes and superclasses also the different symbols that mean different things. Public Visability means that the part is able to be viewed by many people with no restriction. Private visibilty is so that no one can see that part of the design except for you. A method is a way to set something or like a function. Inheritance is a way to have a parent class (super class) to give what it has in its attributes to the child class(sub class).DRY is so that the code does not repeat itself. To find this information go to Lucidchart. “UML Class Diagram Tutorial” YouTube, 21 Jul. 2017,https://www.youtube.com/watch?v=UI6lqHOVHic. This is what I learned today from UML design.