You are browsing as a guest. Sign up (or log in) to start making projects!

jonathanrobin13

@jonathanrobin13

Joined June 1st, 2026

  • 9Devlogs
  • 3Projects
  • 1Ships
  • 15Votes
A 7th grader who likes to code and plays basketball and volleyball
Open comments for this post

1h 34m 36s logged

Handling Errors for Input

Today I created options if the user typed in wrong data, they could change it. I also created options if the user typed in something that was not supposed to be typed, an error message would appear.

Program running

  • Now the program runs forever until you type exit
  • The program always clears the terminal when a new question comes and prints “NASA-Missions” at the top
  • I made the program run forever by using while loop

Error Handling

  • When users types in an option not in the options, the program shows an error message
  • If the user types in data, the program asks the user for confirmation. If the user says no, the user can change the data.

Learned

  • Learned about While loops
  • learned about how continue and break work
  • also learned the .lower() method

Took a very long time, and used a lot of if/elif/else statement. You can see in the picture just a glimpse of the hundreds of if/else.

Handling Errors for Input

Today I created options if the user typed in wrong data, they could change it. I also created options if the user typed in something that was not supposed to be typed, an error message would appear.

Program running

  • Now the program runs forever until you type exit
  • The program always clears the terminal when a new question comes and prints “NASA-Missions” at the top
  • I made the program run forever by using while loop

Error Handling

  • When users types in an option not in the options, the program shows an error message
  • If the user types in data, the program asks the user for confirmation. If the user says no, the user can change the data.

Learned

  • Learned about While loops
  • learned about how continue and break work
  • also learned the .lower() method

Took a very long time, and used a lot of if/elif/else statement. You can see in the picture just a glimpse of the hundreds of if/else.

Replying to @jonathanrobin13

0
1
Open comments for this post

23m 56s logged

Created option for Moon

Now you can choose between a planet and a moon. The program asks the user input for these things:

  • moon name
  • mission name
  • gravity
  • extra info

Then this is stored into a dictionary. Then this puts the data into an excel spreadsheet.

Improvements

I still need to ask the user for the distance of the planet/moon from earth. Then I can calculate the fuel needed to get there.

Maybe use SQL for data?

The user of dictionaries helped a lot in this program. Now I fully understand how it works.

Created option for Moon

Now you can choose between a planet and a moon. The program asks the user input for these things:

  • moon name
  • mission name
  • gravity
  • extra info

Then this is stored into a dictionary. Then this puts the data into an excel spreadsheet.

Improvements

I still need to ask the user for the distance of the planet/moon from earth. Then I can calculate the fuel needed to get there.

Maybe use SQL for data?

The user of dictionaries helped a lot in this program. Now I fully understand how it works.

Replying to @jonathanrobin13

0
1
Ship Changes requested

This program runs through an excel file that has a products with prices and creates a new column with a discount. It can also find the minimum and maximum of the products. In this product I learned about classes and unpacking in python. It was a challenge to debug, but most of the time the errors were value errors. I learned how to use github more properly too.

  • 4 devlogs
  • 5h
Try project → See source code →
Open comments for this post

3h 34m 5s logged

Min/Max function

Made a new function that finds the minimum and maximum of the data.

How it works

  1. The program asks the user to type 0 or 1 for min/max
  2. The program uses a for loop and goes through each row finding the maximum and minimum or what the user chose.
  3. In each cell in the sheet, the program checks if that cell is less/greater than the current min/max using the min()/max() function.
  4. The function then returns a tuple of the price of the product that was the min/max and the name of that product.
  5. The result is printed using a formatted string.

Debugging

While creating the function, there was some errors with the if statement.

  • The if statement checks if the user typed 0 or 1, but the user input was not converted into an int. So the min max function was skipped.

  • The function started to return the minimum price but the name of that product was different.

  • The fix was simple - there was an if statement that checked if the min/max was the current cell but the part where it assigns the product_name was not indented, so it was out of this if statement

  • Had a few errors with unpacking, but the changes were made to fix it

Min/Max function

Made a new function that finds the minimum and maximum of the data.

How it works

  1. The program asks the user to type 0 or 1 for min/max
  2. The program uses a for loop and goes through each row finding the maximum and minimum or what the user chose.
  3. In each cell in the sheet, the program checks if that cell is less/greater than the current min/max using the min()/max() function.
  4. The function then returns a tuple of the price of the product that was the min/max and the name of that product.
  5. The result is printed using a formatted string.

Debugging

While creating the function, there was some errors with the if statement.

  • The if statement checks if the user typed 0 or 1, but the user input was not converted into an int. So the min max function was skipped.

  • The function started to return the minimum price but the name of that product was different.

  • The fix was simple - there was an if statement that checked if the min/max was the current cell but the part where it assigns the product_name was not indented, so it was out of this if statement

  • Had a few errors with unpacking, but the changes were made to fix it

Replying to @jonathanrobin13

0
1
Open comments for this post

16m 49s logged

Day 1 of Race Countdown Game

This is my first hardware project

LEDs

  • LED starts as a countdown, so each light represents a number counting down from 3
  • Example: red represents 3, yellow, represents 2…

Connected the LEDs to the breadboard and used 220 ohm resistors. Then I connected the breadboard jumper wires to the I/O pins.

The Ultrasonic

My idea is that a person will start the game and there will be a countdown. This game will be a reaction game. The person will put their car behind the ultrasonic sensor.
If the person launches the car after the green, they win, but if they do it to early, they lose.

Display Module

  • Shows 3, 2, 1
  • Shows you lost or won
  • the shows your reaction time

Need to create more code to use display and sensor

Day 1 of Race Countdown Game

This is my first hardware project

LEDs

  • LED starts as a countdown, so each light represents a number counting down from 3
  • Example: red represents 3, yellow, represents 2…

Connected the LEDs to the breadboard and used 220 ohm resistors. Then I connected the breadboard jumper wires to the I/O pins.

The Ultrasonic

My idea is that a person will start the game and there will be a countdown. This game will be a reaction game. The person will put their car behind the ultrasonic sensor.
If the person launches the car after the green, they win, but if they do it to early, they lose.

Display Module

  • Shows 3, 2, 1
  • Shows you lost or won
  • the shows your reaction time

Need to create more code to use display and sensor

Replying to @jonathanrobin13

0
1
Open comments for this post

30m 37s logged

Created a new project and allowed user to create a new mission and set some key values for the mission.

Created a new project and allowed user to create a new mission and set some key values for the mission.

Replying to @jonathanrobin13

0
1
Open comments for this post

28m 35s logged

Now users can type in letters that represent each column instead of typing numbers

Now users can type in letters that represent each column instead of typing numbers

Replying to @jonathanrobin13

0
1

Followers

Loading…