Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Erweitertes "Hallo Welt" mit Text und Farben [Mu: Pygame Zero]
- # Copyright 2022, 2023 Roland Richter
- # Erzeuge ein rechteckiges 800×500 Fenster
- WIDTH = 800
- HEIGHT = 500
- def draw():
- # Setze den Hintergrund auf "Pansy purple"
- # TIPP Farbnamen gibt's auf http://latexcolor.com/
- # oder https://www.w3schools.com/colors/colors_names.asp
- screen.fill("#78184A")
- # Begrüße alle in der Mitte der Leinwand
- screen.draw.text("Hallo Welt!", (300, 300))
- screen.draw.filled_rect(Rect((100, 200), (150, 40)), "blue")
- # PROBIERE den Text besser lesbar zu machen
- screen.draw.text("Es ist spannend,", (280, 340))
- screen.draw.text("Python zu lernen", (320, 380))
- # QUIZ Wo siehst du die Ausgabe des print(...)-Befehls?
- print("Hallo Konsole!")
- def update():
- pass
- # ----------------------------------------------------------------------
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program. If not, see <https://www.gnu.org/licenses/>.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement