$$
\newcommand{\floor}[1]{\left\lfloor{#1}\right\rfloor}
\newcommand{\ceil}[1]{\left\lceil{#1}\right\rceil}
\renewcommand{\mod}{\,\mathrm{mod}\,}
\renewcommand{\div}{\,\mathrm{div}\,}
\newcommand{\metar}{\,\mathrm{m}}
\newcommand{\cm}{\,\mathrm{cm}}
\newcommand{\dm}{\,\mathrm{dm}}
\newcommand{\litar}{\,\mathrm{l}}
\newcommand{\km}{\,\mathrm{km}}
\newcommand{\s}{\,\mathrm{s}}
\newcommand{\h}{\,\mathrm{h}}
\newcommand{\minut}{\,\mathrm{min}}
\newcommand{\kmh}{\,\mathrm{\frac{km}{h}}}
\newcommand{\ms}{\,\mathrm{\frac{m}{s}}}
\newcommand{\mss}{\,\mathrm{\frac{m}{s^2}}}
\newcommand{\mmin}{\,\mathrm{\frac{m}{min}}}
\newcommand{\smin}{\,\mathrm{\frac{s}{min}}}
$$
Uspešno ste prijavili problem!
Status problema i sve dodatne informacije možete pratiti klikom na
link .
OK
Nažalost nismo trenutno u mogućnosti da obradimo vaš zahtev.
Molimo vas da pokušate kasnije.
OK
Library
Textual Programming in Python
Graphics Programming with Pygame
А very simple game
А very simple game
The final version of the game
This is what our final mini-game should look like.
Loading and showing the rocket
As the first step, just load the image of the rocket and show it on
the screen.
Show the rocket on the bottom of the screen
Now adapt the program so that the rocket is shown in the bottom of the screen.
Draw the planets
Let us draw a row of planets at the top of the screen. Hint: use a
loop to make the code shorter.
Animate the martian
Let us now animate the martian that moves under the planets, from the
left to the right of the screen and back.
React to user commands
Now enable moving the rocket to the left or to the right using the two
arrow keys.