Scratch Modules Gallery

幂 (乘方)

计算 a 的 b 次幂

数学

Contributors: LuYifei2011

Scripts

主脚本

define (a :: custom-arg) ^ (b :: custom-arg)
set [a^b v] to (1)
repeat (b :: custom-arg)
  set [a^b v] to ((a^b) * (a :: custom-arg))
end

Variables / Lists

NameTypeScope
a^bVariableSprite