This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Educators
  •  » How do I Raise one number to the power of another number?

#1 2009-08-13 14:43:02

siderits
Scratcher
Registered: 2009-04-26
Posts: 21

How do I Raise one number to the power of another number?

Hello:
I need to convert a negative thermister probe reading from a PicoBoard into a postive linear temperature reading.  To do that I need to raise one variable to the power of a number.  Could someone give me some pointers on doing this?

THANKS

Sid

Offline

 

#2 2009-08-13 19:42:38

mrswanson
Scratcher
Registered: 2007-05-01
Posts: 8

Re: How do I Raise one number to the power of another number?

How about...

for y as the answer, x as the number, and i as the power being raised to...
[blocks]<set{ y }to( x)>

<repeat( (( i <-> 1 )))>
<set{ y }to(( y <*> x ))  )>>
[/blocks]

Last edited by mrswanson (2009-08-13 19:52:37)

Offline

 

#3 2009-08-13 19:53:05

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: How do I Raise one number to the power of another number?

This should also be moved to All about Scratch...

Offline

 

#4 2009-08-21 01:08:47

DanielAjoy
Scratcher
Registered: 2009-08-10
Posts: 7

Re: How do I Raise one number to the power of another number?

siderits wrote:

Hello:
I need to convert a negative thermister probe reading from a PicoBoard into a postive linear temperature reading.  To do that I need to raise one variable to the power of a number.  Could someone give me some pointers on doing this?

THANKS

Sid

Yes. Try this project:

http://scratch.mit.edu/projects/DanielAjoy/654552

Offline

 
  • Index
  •  » Educators
  •  » How do I Raise one number to the power of another number?

Board footer