Maverick Pulse

Filed under Features

Lessons On the Illegal Actions

Hang on for a minute...we're trying to find some more stories you might like.


Email This Story






Coding is the future. Students are learning coding in every school with many different lessons and figuring out patterns of what is going around. They figure out how to move things around in videos or form their own virtual lives.

Coding brings depth, not only to a screen, but also to real life transactions, making them much easier to understand.

Roger Mayo, Computer Science teacher, mentioned that his class has recently been working on learning how to make code repeat.

“There’s something called recursion, that we learned how to use. Then we found out about loops that makes looping a lot easier,” Mayo said.

He has, then after, introduced his students to files and has them “…reading stuff from a file and doing stuff to it.”

To make a lesson for his students in this form of coding, he had them do three simple parts.

The first one is simply a bank account. The students protect it from being hacked and cannot deposit a negative number or withdraw more money than they already have in the account. They are taking a code that they were given and adding conditions to it to make sure nothing illegal happens.

With the bank account portion of this lesson, they found they were able to have a starting value and deposit and withdraw money.

There is a system statement which these students are using called a ‘try’ and a ‘catch.’ The ‘try’ is king of like, a default statement. With ‘try,’ the students write out what they want the code to test out first. They enter an initial value for the bank account and check to see if something illegal happens.

“If you enter in a negative value for the initial notes, then it’s gonna take that ‘try’ statement and move over to the ‘catch’,” Jordan King explained.

They are always checking to see if an illegal argument exception is coming in.

“You can’t deposit negative numbers,” King continued.

The second part is called average, which entails file organization. There is a file the students must read. They have no idea how many numbers there are in the file and are given a bunch of random numbers. The program goes through each line and determines how many lines there are. Each line has one number. The students read all the numbers and connect the average of all of them, then put it back into the file.

The last part is called compression. The students take a file and a file writer. They read all of the spaces within a file at the beginning of the file and get rid of them through compressing. They also count how many spaces there were and how many spaces there would have been. The numbers then line up on the side of the screen and students are able to redeem the big file and write back a smaller file.

This part of the lesson is how the students make files and do errors.

“It takes code that we’ve been learning and applies it to more realistic conditions… You actually take that code, analyze files, analyze websites, and check for illegal conditions,” junior Tristan Walley explained.

Mayo’s class is preparing students for the future, giving them a glimpse into the cheat codes of the digital age.

Print Friendly, PDF & Email
About the Contributor
Natalie Maldonado, Cub Reporter

I’m a freshman here at A-TECH. I’m artsy, creative, athletic, and overall just a weird child. I like sports and music. I watch Netflix and movies way...

Navigate Left
  • Lessons On the Illegal Actions

    Features

    Family Pests

  • Lessons On the Illegal Actions

    Features

    Christmas Favorites

  • Lessons On the Illegal Actions

    Features

    Christmas Do’s and Don’ts

  • Lessons On the Illegal Actions

    Features

    Maverick Winter Season Fashion

  • Lessons On the Illegal Actions

    Features

    National Birthdays

  • Lessons On the Illegal Actions

    A&E

    Fallout 76: Review

  • Lessons On the Illegal Actions

    Features

    A-TECH’s Thoughts on a Family Support System

  • Lessons On the Illegal Actions

    Features

    Overachievers

  • Lessons On the Illegal Actions

    Features

    After 17 Years, Super Smash Bros. Melee is Still One of the Biggest Fighting Games

  • Lessons On the Illegal Actions

    Features

    Stressed Out: Class of 2020 Edition

Navigate Right