}

Uniform movement

1990/10/01 Arrojeria, Eustakio - Elhuyar Zientziaren Komunikazioa | Lizaso, Pili - Informatika SailaElhuyar Fundazioa Iturria: Elhuyar aldizkaria

In the program of this issue we wanted to perform a simulation of the uniform movement and for this we have selected as an example the test they put in different psychotechnical tests.

The program of this issue is framed in a simulation of great importance today in teaching programs. We wanted to simulate the uniform movement and for this we have selected as an example the test that is placed in several psychotechnical tests.

This test is very simple. In the center of the screen appears a tunnel and at one end appears a mobile. The mobile leaves at constant speed towards the tunnel. When we enter the tunnel it is hidden and taking into account the speed it carried, when we think it has reached the exit of the tunnel, we must indicate it by pressing a key (in this case F10). At the same time that we press the key, the mobile stops and if it was hidden it will appear on the screen. In addition, two of the three parameters involved in the uniform movement will be given and the value of the third one will be calculated. Don't forget the uniform motion formula:

s = v * t
s: space
v: speed
t: time

The speed of the mobile and the parameter to be asked will be selected randomly.

See if you pass the test! News

Description of the program

10-40: Program initialization

50-330: Main program cycle

60-140: Tunnel and mobile representation. The speed and question that will take the mobile are defined randomly.

150-230: The movement of the mobile is controlled. Before entering the tunnel you will be able to see it on screen (180-190), but once you access the tunnel you will have to be hidden so it is enough to save the position (220).

240-320: If the mobile by pressing the F10 key has reached the left edge of the screen, it will automatically appear on the screen.

1000-1300: This subroutine will run when the F10 key is pressed. It
is displayed on the screen where the mobile is and checked if the question asked has been answered correctly or incorrectly.

NOTE:

This program has used a previously unused sentence, TIME$. By this sentence we can set the system time:

TIME$ =”00:12:00”

The function of the same name returns the time of the system. The combination of this sentence and this function allows you to easily obtain the time that elapses in the development of a set of actions. To do this, just start the system time with TIME$=”00:00 hours” at the beginning of this set. In this way we can know the time spent through TIME$.

Gai honi buruzko eduki gehiago

Elhuyarrek garatutako teknologia