Tags

,

Today we had the weekly check-up on the programming course to see if we had done all the assignments and unfortunately hadn’t done one of the assignments because it was added mid-lecture so I guess I was too focused on my own code to realize there was a new assignment to do. But now after about 30 min of coding I’m done with it! Yay for me!

 

The assignment was to let the user input a string of text and the let the program translate it to “rövarspråk”, I think it’s called robbers language in English. but anyway I tried to keep my main as empty as possible and then doing all the work in a function. I got a little feedback today at the gather up that I needed to put things into loops instead of repeating myself. So in my function translate() I both had two for-loops that were checking if the characters in the string were a consonant or a vowel. I also coded so the program would allow spaces. and in these loops the program also printed out the translated text.

Over all, I’m really pleased with my solution 😀 Bild