Computer Science - Beginner Level Notes

Computer Science - Beginner Level Notes

Class Details

  • Subject: Computer Science

  • Level of Difficulty: Beginner

  • Duration: 45 minutes

Objectives

By the end of class, students will be able to:

  • Identify various ways computer programs are used in daily life.

  • Define computer programming.

  • Describe characteristics of a block-based programming language.

  • Examine an existing mBlock project.

  • Identify and explain the mBlock workspace.

  • Create, edit, run and save an mBlock project.

Lesson Overview

The lesson introduces the concept of what a computer program is through the lens of a computer game. Students are engaged in a game with minimal instructions, allowing them to deduce how the game functions by utilizing logic and observation skills. They will also become familiar with basic commands in the mBlock software.

Key Focus

  • Identify and utilize the basic features of the mBlock software.

Pre-lesson Checklist

For Teacher:
  • A computer with mBlock software installed.

  • mBlock software website access.

  • Slides Presentation: Lesson 1 – Get to Know mBlock.

For Student:
  • A computer with mBlock software installed or access to the mBlock software website.

Standards

  • CSTA 2-IC-20: Compare tradeoffs associated with computing technologies affecting daily activities and career options.

  • CSTA 2-AP-13: Decompose problems and subproblems into parts for facilitating program design, implementation, and review.

  • ISTE-1D: Students understand fundamental technology operations, choose, use, and troubleshoot current technologies, and explore emerging technologies.

  • ISTE-5C: Students break problems into components, extract key information, and develop models for understanding complex systems or facilitating problem-solving.

  • ISTE-6A: Students choose appropriate platforms and tools for their creation or communication objectives.

Lesson Plan

Warm-Up [5 min]

  • Computer Programming in Our Daily Lives

    • Discuss the following questions:

    1. What is your favorite activity to do on a computer or smartphone? (e.g., watching videos, playing games)

    2. How are these apps and games created?

    3. What is computer programming?

      • Examples include mobile software, apps, designing computer games, controlling robots, etc.

    4. What else can computer programming do? Consider applications in healthcare, education, manufacturing, transportation, retail, and entertainment.

Game Time [20 min]

Explore a mBlock Project - Space Adventures
  • Instruct students to open the example program, Space Adventures:

    1. Double-click the mBlock software icon or access it through the website.

    2. Click on the upper right corner and select Example Program.

    3. Locate Space Adventures and click OK.

  • Tell students to use the arrow keys and space bar to play the game.

  • Review buttons for starting and stopping the game:

    • Green Flag: Start the program

    • Stop Button: Stop the program

    • Full Screen: Enter full screen mode

    • Exit Full Screen: Exit full screen mode

  • Allow 3 minutes for students to play Space Adventures.

Space Adventures - Competition
  1. Pair students to play against each other. If pairing is unviable, have students time themselves.

  2. Each plays the game for one minute:

    • The player with the highest score wins.

    • In case of a tie score, the player with the most health points wins.

    • If scores and health points are identical, the game results in a draw.

  3. Have students explain the game to classmates.

  4. Instruct students to write an explanation of the game with guidance:

    • What is the goal of the game?

    • How does the game end?

    • How does the game function?

      • What actions cause the panda to change size?

      • How do you gain and lose health points?

      • What are the keystrokes (inputs) used for?

      • What two numbers does the game store, and how do these numbers change?

  5. BONUS: Provide game instructions to someone who hasn't played and observe their performance.

Assessment

  • Review student work to confirm they can articulate game rules and functions.

Actual Game Rules and Instructions:

  1. Use the up and down keys ↑↓ to control the vertical movement of the pilot Panda.

  2. Use the space key to shoot a cannonball from the Panda’s spaceship.

  3. Avoid or shoot stars and asteroids to gain points. Colliding with a star/asteroid reduces the pilot's health.

    • Each star shot gives 1 point; points grow Panda’s size.

  4. Colliding with a Red Cross adds 10 health points; size increases with health.

Extension Activity

  • Share the rules with students; let them play the game to achieve higher scores.

  • Discuss changes students would make to the game mechanics.

Hands-On [20 min]

Background Information - Programs in mBlock
  • The game is created by programming, defined as a set of instructions executed by a computer for specific tasks.

  • In the Stage Area, clicking the Panda sprite allows visibility into the program controlling it.

  • Switch between sprites to show students the commands governing each character.

Background Information - Get to know the mBlock Interface
  • Areas:

    • Menu Bar: Access files, programs, etc.

    • Stage Area: View project stage, customize sprites/backgrounds, connect Makeblock devices.

    • Block Area: Library of programming blocks, color-coded categories.

    • Script Area: Drag blocks to arrange them for controlling the Stage Area.

Hands-On - Programming Practice

Instruct students to create their first mini program using block-based programming:

  1. Open mBlock; create a new file.

  2. Select the Panda sprite to assure programming is specific to it.

  3. Drag blocks to the script area to compile the program:

    • Start block, movement block, etc.

Wrap-Up [5 min]
  • Quiz:

    1. What is the name of the area displaying the game interface when playing Space Adventures?
      Answer: D (Stage area)

    2. What is the button to start the program in Space Adventures?
      Answer: (Green flag)

    3. Which of the following is incorrect about programming?
      Answer: A (Programming is limited to building blocks.)

Lesson 2 - Learning to Tell a Story in mBlock

Objectives

By the end of this lesson, students will:

  • Write a program using the block-based programming language, mBlock.

  • Use sprites, backgrounds, and programming blocks to communicate a story.

  • Distinguish between the “say…” and “say… for ( ) seconds” blocks.

  • Select and add an appropriate stage background to a mBlock project.

Overview

Students use new programming blocks to create a sequential story program. They utilize creativity and feedback from peers to enhance their projects, ensuring clarity through the appropriate selection of programming elements.

Standards

(Similar standards to previous lesson)

Warm-Up [5 min]
  • Review the mBlock interface and functionality of different buttons.

  • Engage students by discussing the character Panda's backstory.

Hands-On [15 min]
  • Creating a speaking sprite program using block functions.

Try It [15 min]
  • Independent practice: write their introduction based on the warm-up and refine using peer feedback.

Wrap-Up [15 min]
  • Assessment:

    • Present works, gather feedback from peers, and facilitate discussion on module improvements.

Additional Lessons

The transcript continues detailing further lessons focusing on different programming principles, using loops, conditional statements, motion, sprite interaction, and creative expressions through mBlock. Each lesson builds increasingly complex understandings and intertwines feedback mechanisms and graphic representations within programming education.

Key Concepts Suggested for Each Lesson:
  • Iteration and control structures.

  • Use of conditional logic in programming.

  • Importance of visual representation and animation in coding.

  • Integration of collaborative learning through project sharing and peer review.