View Full Version : Lab 2

04-20-2017, 07:15 PM
I have completed Lab 2, albeit a bit late.

But, I was assigned to create a program in which I requested input from the user in how many times a character spins and then asked the user if it wanted to run the program again. The program would run until the user does not input "yes." Some extra mechanics I have added to the program is an equation to determine how many seconds each spin lasts for: no matter how many times the character spins, it only spins for 5 seconds.

The Math: seconds per spin = 5 / spins.

Ex. if a user wanted to have the character spin 10 times, it would be 0.5 seconds per spin (5 / 10).

It was also helpful to add comments in the code to keep track of what the program does.

It was a great refresher course on loops as I have learned this in a Java course I took in high school.