Today I started off with writing algorithms. I thought of some simple game ideas and broke those down into algorithms. I wrote them on paper before finding draw.io and started to use that instead. Afterwards, I settled on making a hangman game and wrote the algorithm for it before I started building it. First off, I made a list with as many words as I could think of(this took more time than writing the actual program) and then started building the basics. I used for loops to replace the letters in the word with underscores and made a guess variable for the user to guess a letter. If it was in the word, the underscore would be replaced with the letter and if it wasn't the user would either lose a life or if the letter has already been guessed they wouldn't but would be told that they have already guessed it. All this was placed into a while loop that would run until the user guess the word or lost all their lives. Overall, it was quite a fun little project.
🔧 Programmierung 🕛 vor 8 Monaten 1 Min Lesezeit
Day 7 of 100
Vollständiger Original-Artikel
Den kompletten Beitrag mit allen Details direkt auf dev.to lesen.
Wie bewertest du diesen Beitrag?
1 Klick Feedback Teilen mit Netzwerk & Team:
Hat Ihnen dieser Tipp / Anleitung geholfen?
Community-Analysen & Experten-Meinungen 0
Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf „ Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum 🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Tipp: Mit Pfeiltasten [ ← ] und [ → ] blättern
SOCIAL SHARE CARD GENERATOR