Question and Answers: Block Programming Basics

 Grade 6 and above:

1. what is block programming?


- Block Programming is a method of programming where code is built by dragging and dropping blocks or puzzle-like pieces of code rather than writing lines of text.

2. Give some examples of Block Programming Software/applications.


- Examples of Block programming applications are:

  •  mocks
  • Scratch
  • PictoBlox etc
3. What is a Block palette?
-Block palette refers to a collection of blocks that are available for use in a programming environment.



4. What is the X-axis?
- The x-axis is a horizontal line spanning from left to right in a graph.


5. What is the Y-axis?
-The y-axis is the vertical line spanning top to bottom in a graph.

6. What is a Sprite?
-a sprite refers to an image or graphical object that can be moved, animated, and interacted with within a digital environment. for eg: Characters, Buttons, Skins, etc.



7. What is the purpose of block programming?
-Block programming helps users learn programming concepts and create programs by visual and DRAG DROP methods


8. What are real-world applications of block programming?
- It can be used to control robots, create interactive games, and build quick software prototypes.


9. What do these codes do:
  •    When Green Flag is clicked- Starts the Game/Code

  • Move [10] Steps- Sprite moves 10 steps in the direction it is pointing

  • Forever( )- Inside this loop code will run until we stop the game.

  • When [Space] key Pressed- Runs code when the Space key is pressed

  • If [ key<Space>Pressed] then[Hide]- Sprite hides when Space Key is Pressed

  • Switch costume to [Costume 1]- changes the costume of the sprite to Costume 1

  • Say[Hello !! ] for [5] Seconds - Says Hello !! for 5 seconds.

  • Create a clone of [Myself]- Creates the clone of Sprite.


10. Write a code to switch between two states of costumes.
                        or
            Write a code to animate a sprite having two costumes.
        - When Greenflag clicked
        -Forever[
                        Switch costume to [costume 1]
                        Wait [1] seconds
                        Switch costume to [costume 2]
                        Wait [1] seconds
                       ]

11. Write a code to print Hello, How are you today? , Let's do some DragDrop for 3 seconds each and end it with a Goodbye
        
         - When Greenflag clicked
                -Say[Hello] for [3] Seconds
                -Say[How are you today?] for [3] Seconds
                -Say[Let's do some DragDrop] for [3] Seconds
                -Say[Bye] for [1] seconds

12. Write code to move a sprite left and right using the left and right arrow keys.
        
         - When Greenflag clicked
                -go to x (0) y (-200)
                -Forever[ If [<Left arrow> pressed] then
                [Change x by (-10)]
If [<Right arrow> pressed] then
                [Change x by (10)]
]

13. Write code to move a sprite up and down using the W and S keys.
        
         - When Greenflag clicked
                -go to x (0) y (0)
                -Forever[ If [<W> pressed] then
                [Change y by (10)]
If [<S> pressed] then
                [Change y by (-10)]
]

14. Write code to hide and show a sprite using the Q and E keys.
        
         - When Greenflag clicked
                -Forever[ If [<Q> pressed] then
                Hide
If [<E> pressed] then
                Show
]
                        
15. Write code to move a sprite up and fall back down using Spacebar.
        
         - When Greenflag clicked
                -go to x (0) y (-200)
                -Forever[ If [<space> key pressed] then
                Repeat [10]
[Change y by (10)]
                Repeat [10]
[Change y by (-10)]
]

16. Draw a sprite of your choice and color it appropriately
-
17. Draw a dessert background with cactuses and hills.
-
18. What game will you make and how players will get the score in the game?
-
19. How to create your own sprites?
-
20. What is an animation?
-
21. What is the core idea behind line following car game(Grade-9)
    /Shark game(Grade-9)
    /Snake game(Grade-9)
    /Bounce the Ball game(Grade-9)
    /chrome dinosaur game(Grade-6 to 9)
    /Jumping Horse Game(Grade-5)
    / Self-driving Car Game(Grade-9)
 
what does these blocks do:
 
  • Motion Blocks:

    • "Move [ ] steps": This block moves the sprite (character) a specified number of steps in the direction it is facing.

    • "Turn [ ] degrees": The sprite rotates a certain number of degrees clockwise or counterclockwise.

    • "Go to x: [ ] y: [ ]": This block moves the sprite directly to specific coordinates on the screen.

  • Looks Blocks:

    • "Say [message] for [ ] seconds": The sprite displays a text message for a specified duration.

    • "Show" and "Hide": These blocks control the visibility of the sprite on the screen.

    • "Switch Costume to [ ]": Allows the sprite to change its appearance to a different costume.

  • Sound Blocks:

    • "Play Sound [ ]": This block plays a sound effect or recorded audio.

    • "Play Drum [ ] for [ ] beats": Allows the sprite to play a specific drum sound for a certain number of beats.

    • "Stop All Sounds": This block stops all sounds currently playing.

  • Events Blocks:

    • "When Green Flag Clicked": This block starts the program when the green flag is clicked by the user.

    • "When [key] key pressed": Triggers an action when a specific key on the keyboard is pressed.

    • "When Sprite Clicked": The sprite performs an action when it is clicked by the user.

  • Control Blocks:

    • "Repeat [ ]": This block allows a specific set of actions to be repeated a certain number of times.

    • "Forever": Creates a loop that repeats indefinitely until the program is stopped.

    • "If [ ] Then" and "Else": These blocks control the flow of the program based on specific conditions.

  • Sensing Blocks:

    • "Touching [ ]?": Checks if the sprite is touching another sprite or object.

    • "Ask [ ] and wait": Allows the sprite to ask the user a question and wait for a response.

    • "Mouse X" and "Mouse Y": These blocks provide the x and y coordinates of the mouse cursor.



    Post a Comment

    0 Comments

    Comments