Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   The Lounge (http://www.alice.org/community/forumdisplay.php?f=4)
-   -   Lab 2 (http://www.alice.org/community/showthread.php?t=11711)

thegreatnico97 04-20-2017 07:15 PM

Lab 2
 
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.


All times are GMT -5. The time now is 03:34 AM.

Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.