-- Pasirinkite --
MOKYKLOS NAUJIENOS
Technologijų mokyklos mokiniai sveikina visus mokytojus

Technologijų mokyklos mokiniai sveikina visus mokytojus

Technologijų mokyklos Palangoje mokiniai sveikina visus mokytojus Tarptautinės mokytojų dienos proga ir siunčia šias, Minecraft Education Edition aplinkoje pačių programuojant sukurtas gėles.

Robotikos ir programavimo užsiėmimai
Robotikos ir programavimo užsiėmimų metu mokiniai konstruoja ir programuoja robotus, taip pat mokosi programuoti įvairiose aplinkose.
Ernesto Daukanto programos (GĖLĖ) kodas

class Leaf:
DarkColor = LIME_TERRACOTTA
MidColor = LIME_CONCRETE
BrightColor = LIME_WOOL

DarkColorSlot = 1
MidColorSlot = 2
BrightColorSlot = 3

class Flower:
DarkColor = RED_TERRACOTTA
MidColor = RED_CONCRETE
BrightColor = RED_WOOL

DarkColorSlot = 4
MidColorSlot = 5
BrightColorSlot = 6

def build_flower():
#Leaf
agent.set_slot(Leaf.DarkColorSlot)
agent.move(UP, 1)
agent.place(DOWN)
for _ in range(4):
agent.place(FORWARD)
agent.move(UP,1)
agent.place(FORWARD)
agent.move(DOWN,1)
agent.turn(TurnDirection.Left)
agent.move(UP, 1)
agent.set_slot(Leaf.MidColorSlot)
agent.place(DOWN)
agent.move(UP, 1)
for _ in range(4):
agent.place(FORWARD)
agent.move(UP,1)
agent.place(FORWARD)
agent.move(DOWN,1)
agent.turn(TurnDirection.Left)
agent.set_slot(Leaf.BrightColorSlot)
for _ in range(2):
agent.place(DOWN)
agent.move(UP, 1)
agent.set_slot(Leaf.MidColorSlot)
agent.place(DOWN)

for _ in range(2):
agent.move(FORWARD, 3)
agent.move(UP, 2)
agent.set_slot(Leaf.DarkColorSlot)
agent.place(FORWARD)
agent.move(BACK, 1)
agent.set_slot(Leaf.BrightColorSlot)
agent.place(FORWARD)
agent.set_slot(Leaf.DarkColorSlot)
for q in range(2):
agent.move(DOWN, 1)
agent.place(FORWARD)
agent.move(DOWN, 1)
for w in range(2):
agent.place(DOWN)
agent.move(UP, 1)
agent.move(BACK, 1)
agent.set_slot(Leaf.BrightColorSlot)
for e in range(2):
agent.place(FORWARD)
agent.move(DOWN, 1)
agent.move(BACK, 1)
agent.set_slot(Leaf.MidColorSlot)
agent.place(FORWARD)
agent.turn_left()
for _ in range(2):
agent.move(FORWARD, 2)
agent.move(UP, 5)
agent.set_slot(Leaf.BrightColorSlot)
for q in range(2):
agent.place(FORWARD)
agent.move(DOWN, 1)
agent.set_slot(Leaf.MidColorSlot)
agent.place(FORWARD)
agent.place(UP)
agent.move(BACK, 1)
agent.set_slot(Leaf.BrightColorSlot)
for w in range(2):
agent.place(FORWARD)
agent.move(DOWN, 1)
agent.move(UP, 1)
agent.set_slot(Leaf.DarkColorSlot)
agent.place(UP)
agent.move(DOWN, 1)
agent.set_slot(Leaf.MidColorSlot)
agent.place(UP)
agent.move(FORWARD, 1)
agent.move(DOWN, 2)
agent.set_slot(Leaf.DarkColorSlot)
for e in range(2):
agent.place(DOWN)
agent.move(UP, 1)
agent.set_slot(Leaf.MidColorSlot)
agent.move(BACK, 1)
for r in range(2):
agent.place(FORWARD)
agent.move(DOWN, 1)
agent.move(BACK, 1)
agent.move(UP, 1)
agent.set_slot(Leaf.BrightColorSlot)
for t in range(2):
agent.place(FORWARD)
agent.move(DOWN, 1)
agent.turn_left()
agent.set_slot(Leaf.MidColorSlot)
for _ in range(2):
agent.move(UP, 1)
agent.place(DOWN)
agent.move(UP, 1)
agent.set_slot(Leaf.BrightColorSlot)
agent.place(DOWN)
agent.move(UP, 1)
agent.set_slot(Leaf.MidColorSlot)
agent.place(DOWN)
#Flower
agent.move(UP, 1)
agent.set_slot(Flower.DarkColorSlot)
agent.place(DOWN)
for _ in range(4):
agent.place(FORWARD)
agent.turn_left()
agent.move(UP, 1)
for _ in range(2):
agent.place(FORWARD)
agent.turn_left()
agent.set_slot(Flower.MidColorSlot)
for _ in range(2):
agent.place(FORWARD)
agent.turn_left()
agent.move(UP, 1)
for _ in range(4):
agent.place(FORWARD)
agent.turn_left()
agent.set_slot(Flower.BrightColorSlot)
agent.place(DOWN)

def on_on_chat():
agent.set_item(Leaf.DarkColor, 64, Leaf.DarkColorSlot)
agent.set_item(Leaf.MidColor, 64, Leaf.MidColorSlot)
agent.set_item(Leaf.BrightColor, 64, Leaf.BrightColorSlot)

agent.set_item(Flower.DarkColor, 64, Flower.DarkColorSlot)
agent.set_item(Flower.MidColor, 64, Flower.MidColorSlot)
agent.set_item(Flower.BrightColor, 64, Flower.BrightColorSlot)

build_flower()

player.on_chat(„run”, on_on_chat)

Naujienų prenumerata

Sužinokite mokyklos naujienas pirmi.