Lesson 6: Python For Kids (Part 6: FUN With Words)

Lesson 6: Python For Kids (Part 6: FUN With Words)

For a complete table of contents of all the lessons please click below as it will give you a brief of each lesson in addition to the topics it will cover. https://github.com/mytechnotalent/Python-For-Kids

Today we are going to have FUN with our little friend and work with words and have him type our name and say hi to us!

We will use a word variable which we call a string to customize our little friends ability to say hello to us.

Instead of typing my name in STEP 2 on line 3, as you can see below, type in your own name instead.

STEP 1: Open Mu IDE

No alt text provided for this image

STEP 2: Type Code

No alt text provided for this image

STEP 3: Click Save

No alt text provided for this image

STEP 4: Save File - main.py - Desktop

No alt text provided for this image

STEP 5: Click Flash

No alt text provided for this image

STEP 6: SEE THE FUN AS OUR NEW FRIEND SAYS HI TO US!

(Look at the front of the badge to see the image.)

Now that you taught our little friend to say hi to us how about you try some other words and have him say different things to us. You can try changing the below statement to something like this on line 6 to which you will SAVE and FLASH as described above.

display.scroll(name + ', thank you for learning Python with me!  I cannot wait to see all the fun things we make!')

Feel free to share your code in the comments below! I would LOVE to see what YOU create!

In our next lesson we will have some FUN with word lists!

要查看或添加评论,请登录

Kevin Thomas的更多文章

社区洞察