Learn to Program with Scratch by Majed Marji

Learn to Program with Scratch by Majed Marji

Author:Majed Marji
Language: eng
Format: epub
Tags: COMPUTERS / Programming Languages / General
ISBN: 9781593275785
Publisher: No Starch Press
Published: 2014-02-20T00:00:00+00:00


Figure 6-10. The main script of the Tutor sprite

After asking the user to enter a choice, the Tutor sprite waits for the user’s input and uses three if/else blocks to process it. If the user entered a valid choice (that is, 1, 2, or 3), the script calls the appropriate procedure to calculate the area of the indicated shape. Otherwise, the script invokes the say command to inform the user that the choice entered is invalid. The procedures for calculating the areas of the three shapes are shown in Figure 6-11.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.