Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
"a" to the power of "b"
Old
SammeStar
Junior Member
 
Status: Offline
Posts: 2
Join Date: Nov 2011
Default "a" to the power of "b" - 11-28-2011, 01:12 AM

Hello,
I have to write a program using recursion so that a robot will tell me the value of "a" raised to the power of "b".

No matter what I do, the program stops and says it has an error when I get to the answer part.

Can anyone help me with the formula?
Attached Files
File Type: a2w Power Robot.a2w (1.41 MB, 6 views)
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 11-28-2011, 08:30 AM

Got it.

I deleted 2 lines from the world.power function, though. Your job is to figure out what those lines were.
Attached Files
File Type: a2w Power Robot Fix.a2w (1.41 MB, 12 views)


(')>
   
Reply With Quote
Thank You!!!
Old
SammeStar
Junior Member
 
Status: Offline
Posts: 2
Join Date: Nov 2011
Default Thank You!!! - 11-28-2011, 11:58 AM

Thank you so much, I figured it out and it works. Yay, I won't fail.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 11-28-2011, 12:31 PM

Glad to hear it.


(')>
   
Reply With Quote
Reply

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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.