Hello!
This is a photo I am definitely not very content with. I took plenty of shots from different sides of the plant. But still struggled with everything from lighting to composition. I just couldn't seem to get it right. Everything failed.
I feel like giving up.
Changing the subject...
Parenting / Programming Bash
A few days ago I taught Miro some programming, using the Bash command shell. We wrote a number guessing game together. I told him what to write line by line in an editor, and told him what each line will do.
Here's my version of the program:
#!/bin/bash
# Satunnaislukupeli
satLuku=$((RANDOM%100+1))
echo -n "Arvaa luku (1-100): "
while read arvLuku
do
# echo $satLuku
if [ $arvLuku -gt $satLuku ]
then
echo "Liian suuri luku!"
elif [ $arvLuku -lt $satLuku ]
then
echo "Liian pieni luku!"
else
echo "Arvasit aivan oikein!!!"
break
fi
done
Translations:
"Satunnaislukupeli" = "Random number game"
"Arvaa luku" = "Guess a number"
"Liian suuri/pieni" = "Too large/small"
"Arvasit oikein" = "You guessed correctly"
Miro made some (mainly linguistic) changes to his code though, but it worked too.
He was very impressed about what you can make the computer do.
Should I teach him the same in Python or Javascript? Maybe something else?
See ya!
Next |
---|
Daily and Fresh π· #232 |
Daily and Fresh π· #233 |
Daily and Fresh π· #234 |
Daily and Fresh π· #235 |
Daily and Fresh π· #236 |
Previous |
---|
Daily and Fresh π· #230 |
Daily and Fresh π· #229 |
Daily and Fresh π· #228 |
Daily and Fresh π· #227 |
Daily and Fresh π· #226 |
Weeklies |
---|
Weekly and Fresh πΈ #32 |
Weekly and Fresh πΈ #31 |
Weekly and Fresh πΈ #30 |
Weekly and Fresh πΈ #29 |
Weekly and Fresh πΈ #28 |