极客战记-巫师之门

2025-10-28 01:29:53

1、选择英雄和编程语言

极客战记-巫师之门

2、选择装备

极客战记-巫师之门

3、写中文注释

极客战记-巫师之门

1、写代码

# Move to Laszlo and get his secret number.

hero.moveXY(30, 13)

las = hero.findNearestFriend().getSecret()

# 向 Laszlo 的数字中加7就能得到 Erzsebet的号码

# Move to Erzsebet and say her magic number.

erz = las + 7

hero.moveXY(17, 26)

hero.say(erz)

# 将 Erzsebet 的数字除以 4 得到 Simoyi 的数字。

# Go to Simonyi and tell him his number.

sim=erz/4

hero.moveXY(30, 39)

hero.say(sim)

# 将 Simonyi 的数字乘以 Laszlo 的数字得到 Agata 的数字。

# Go to Agata and tell her her number.

aga=sim*las

hero.moveXY(43, 27)

hero.say(aga)

极客战记-巫师之门

2、运行

极客战记-巫师之门

1、写代码

// Move to Laszlo and get his secret number.

hero.moveXY(30, 13);

var las = hero.findNearestFriend().getSecret();

// 向 Laszlo 的数字中加7就能得到 Erzsebet的号码

// Move to Erzsebet and say her magic number.

var erz = las + 7;

hero.moveXY(17, 26);

hero.say(erz);

// 将 Erzsebet 的数字除以 4 得到 Simoyi 的数字。

// Go to Simonyi and tell him his number.

var sim=erz/4;

hero.moveXY(30, 39);

hero.say(sim);

// 将 Simonyi 的数字乘以 Laszlo 的数字得到 Agata 的数字。

// Go to Agata and tell her her number.

var aga=sim*las;

hero.moveXY(43, 27);

hero.say(aga);

极客战记-巫师之门

2、运行

极客战记-巫师之门

1、写代码

# Move to Laszlo and get his secret number.

hero.moveXY(30, 13)

las = hero.findNearestFriend().getSecret()

# 向 Laszlo 的数字中加7就能得到 Erzsebet的号码

# Move to Erzsebet and say her magic number.

erz = las + 7

hero.moveXY(17, 26)

hero.say(erz)

# 将 Erzsebet 的数字除以 4 得到 Simoyi 的数字。

# Go to Simonyi and tell him his number.

sim=erz/4

hero.moveXY(30, 39)

hero.say(sim)

# 将 Simonyi 的数字乘以 Laszlo 的数字得到 Agata 的数字。

# Go to Agata and tell her her number.

aga=sim*las

hero.moveXY(43, 27)

hero.say(aga)

极客战记-巫师之门

2、运行

极客战记-巫师之门

1、写代码

-- Move to Laszlo and get his secret number.

hero:moveXY(30, 13)

local las = hero:findNearestFriend():getSecret()

-- 向 Laszlo 的数字中加7就能得到 Erzsebet的号码

-- Move to Erzsebet and say her magic number.

local erz = las + 7

hero:moveXY(17, 26)

hero:say(erz)

-- 将 Erzsebet 的数字除以 4 得到 Simoyi 的数字。

-- Go to Simonyi and tell him his number.

local sim=erz/4

hero:moveXY(30, 39)

hero:say(sim)

-- 将 Simonyi 的数字乘以 Laszlo 的数字得到 Agata 的数字。

-- Go to Agata and tell her her number.

local aga=sim*las

hero:moveXY(43, 27)

hero:say(aga)

极客战记-巫师之门

2、运行

极客战记-巫师之门

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢