Similar Posts
Where can I find the code for the Tower of Hanoi?
Hello, I'm looking for code/instructions for the game simulation "Tower of Hanoi." Ideally, it would be for the programs Psychopy or Python. I've included a link below so you can see what I mean. https://www.mathematik.ch/spiele/hanoi_mit_grafik/ thanks in advance
As a project manager, which programming language should I learn?
BypaulFE
Hello, Which programming language is good to learn as a program manager? It's not about learning Excel/Power BI or something like that, but about understanding a bit of real technical programming language and building up knowledge that way. I was just thinking about Java, C#, Python, and SQL… what do you think? I think you…
Where can I learn to program (Python)?
ByStk88
Hello everyone, A little about me: Years ago, I completed the VBA programming course at ils. I received a job offer pretty quickly. It was totally boring, but as a career changer at 32, I was happy to get a job in IT and as a programmer. The plan now is to learn Python. Definitely…
Is the Mimo app good for learning programming?
ByEddyk66
Hello, I want to learn programming as a hobby and I currently have the Mimo app and am currently learning HTML. I plan to expand and am wondering whether I should buy the Pro version. Or do you know where you can learn to program well, simply and quickly? Maybe apps, websites, YouTubers??
How long would it take you (Python/PHP)?
Since you don't know my learning speed, time, etc., I would like to know how long it would take you to learn Python or PHP again to a level where you could confidently program the following: Contact form Newsletter User logins Shop systems
Programming Logical (Game) with JavaScript?
Bystzpy112
I have to program a game for school, and I've decided on a logical game. I've already programmed the grid for placing the crosses and circles, and now I'm moving on to the part where I'll add a "correct" button to check the answers. If the answer is wrong, the goal is for the affected…
Du kannst das Programm oder einzelne Anweisungen in der Python-Sandbox ausprobieren. Dazu sind ein paar Änderungen nötig, weil “import … as …” und exitonclick() dort nicht funktionieren:
Das Programm erzeugt folgende Ausgabe:
Der Anfang der Linie ist im Punkt (0|0),
Wenn du den “Animate”-Modus durch Klicken auf den grünen Button rechts unten in der Sandbox aktivierst, läuft die Ausgabe verlangsamt ab.
Einfach Schritt für Schritt den Code durchgehen
Verstehe trotzdem nicht
Ab welchem Punkt kommst du denn nicht weiter?
Welche Anweisung verstehst du denn nicht?
Mit dem Aufruf von alpha(60) geht’s los.
Da musst du dann in die alpha Funktion springen, als Parameter x wird 60 übergeben.
Dann wird drei mal wiederholt:
– Male eine x (=60) Einheiten lange Linie (in die Richtung, in die der Roboter gerade schaut)
– Drehe dich um 90 Grad nach links
Dann dreht er sich um 90 Grad nach rechts
Dann malt er eine 2*x lange Linie in die Richtung.
Fertig.
Nun wird dieser aus der alpha-Funktion herausgesprungen, dort hin, von wo sie ausgerufen wurde.
Als nächstes folgt eine Drehung um 60 Grad nach links.
Dann wird wieder alpha aufgerufen, diesmal mit 50.
Etc.
Einfach Schritt für Schritt den Code durchgehen, wie es auch der PC machen würde, echt nicht so schwer.
Es lädt noch 🙁
Wo, ich seh sie nicht?
Hab oben meine Lösung hochgeladen, kannst du einmal prüfen ob die richtig oder falsch ist?:(
Als nächstes folgt eine Drehung um 90 Grad nach links.*
90, nicht 60, hatte mich verlesen. Aber you get the point.