Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Thread Tools Display Modes
Lab 2
Junior Member
Status: Offline
Posts: 6
Join Date: Jan 2017
Default Lab 2 - 04-20-2017, 08: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.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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