Sign In | Create an Account | Welcome, . My Account | Logout | Subscribe | Submit News | Facebook | Twitter | Home RSS
 
 
 

Rock, paper, scissors, lizard, Spock

Gruwell teaches Python programming to passionate pupils in Studio 12

March 19, 2018
Amy H. Peterson - Staff Writer (apeterson@esthervillenews.net) , Estherville News

Mark Gruwell told a group of students ranging from tweens to adults, "Python is a very powerful language. It has a lot of commands. So sometimes we have to import sets of commands from a library," to complete the task of creating a text-based game.

Gruwell spent little time lecturing and had students, who brought their own laptops, dive right in to programming a simple game to calculate the square of a given number.

Using the web-based CodeSkulptor, Gruwell taught students a function, which is a way to provide information to the software, from which it will return a result.

Article Photos

"A function has to return something," Gruwell said.

From squaring numbers and guessing a number between one and ten, the class moved on to a modification of a classic rock, paper, scissors game made famous by the TV show "Big Bang Theory" with the addition of lizard and Spock.

"With programming, you take a big problem, decompose it, and solve a series of small problems through which you ultimately solve the big problem," Gruwell said.

"What if I told you there's a mathematical solution to rock, paper, scissors, lizard, Spock?" Gruwell asked.

By creating a string, students Dillon Lundgren, Parker Duitsman, and Anthony Rivera created variables by which the computer responded to the user's selections in predetermined ways. Paper covered rock, rock, smashed scissors, scissors cut paper, lizard poisoned Spock, and scissors, as in the show, decapitated lizard.

Dillon Lundgren said, "It's pretty cool."

The class continues Saturday, March 24 with a visual game resembling the arcade favorite Asteroids.

 
 
 

 

I am looking for:
in:
News, Blogs & Events Web