Mathematical and Physical Journal
for High Schools
Issued by the MATFUND Foundation
 Already signed up? New to KöMaL?

# Problem I. 303. (October 2012)

I. 303. In this task you are going to use the Imagine Logo programming environment to draw one side of a street based on a list containing its description.

First you should create the procedures ház :m, háztömb :m :hsz, zebra :m and park :m (where ház'' is translated as house, háztömb'' as block of flats and zebra'' is pedestrian crossing). Then by using these, you should create the procedure utca :sor :m, where utca'' means street, :m'' refers to the size, and :sor'' is a list describing the structure of the street.

The elements of this last list are as follows:

hx - the number of block of flats, with x being an integer between 1 and 9;
z  - pedestrian crossing;
p  - park.

Block of flats and parks are surrounded by a pavement. Colors can be chosen arbitrarily.

Your solution should only use the automatic and functional parts of the programming language. Variables should not be used, only parametrization.

The project file together with the source code (i303.imp) should be submitted.

(10 pont)

Deadline expired on November 12, 2012.

Sorry, the solution is available only in Hungarian. Google translation

Megoldásokról

A feladatra sok jó megoldás érkezett. Különösen értékesek azok a megoldások, ahol kizárólag a logo programozási nyelv automata és funkcionális eszközeit használta a versenyző.

Sokan nem ismerték, illetve nem használták a többirányú elágazás nyelvi eszközét, amellyel tömörebb, áttekinthetőbb kódot írhatunk.

### Statistics:

 10 students sent a solution. 10 points: Dobos-Kovács Mihály, Fehér Balázs, Fényes Balázs, Forrás Bence, Gema Barnabás, Jákli Aida Karolina, Kalló Kristóf, Qian Lívia, Tegzes Tamás. 6 points: 1 student.

Problems in Information Technology of KöMaL, October 2012