Thanks Keith. I think it was harder working out how to do the video than it was to do the homework! Fingers crossed I'll be able to keep up as things get a bit harder in the lessons...
Excellent 👍 Writing "len(3)" in your for loops is unnecessary, you can just write "3". So: for i in range (0,3,1) Is: repeat from 0 to 3 in steps of 1 👍 Here's how the "len()" function works: Word = "mum" Length_Of_Word = len(Word) Print (Length_Of_Word) This will print the number 3 as the word "mum" contains 3 characters 👍 So you see the "len()" functions is as to ask, what is the length of something. The answer will be held in the variable that you declared before asking for the length. Excellent work anyhow, your recording quality is exceptional 👌 👏 👍 🙌 😀 😎 👌
Hi BBF, thanks for the comments. I used the len( ) so that I could add the morse for other letters and numbers, which are different quantities of dots and dashes, and to make it easy to copy and just change the letter without having to worry about whether it had more or less dots and dashes. The digit in the len brackets is actually the letter (S) or (O), not just a number. Both are three dots or dashes, but in this case the len( ) returns 6, as it's also counting the gaps between the digits and letters. Thank you for the compliment about the video as well 😊
Thanks Charlotte, it only took me 158 attempts to get it right! 😉 But seriously, I've been typing for many years, but I think you'll find I still made a few mistakes somewhere in the middle😊. Glad you liked the video.