Are you into computers and technology? Do you have an interest in Video Games, Apps, or websites? Do you want to go beyond Block Based or Visual Based Programming? Discover the basic elements of programming within text-based programming languages such as Python, HTML, and CSS.

Download the Spark Sheet

English
Exploring 4-H

 Exploring 4-H Computer Science Text Based Coding

In this project, build on fundamental concepts such as, sequence, iteration, conditionals, variables, modularization, machine coding, and have the opportunity to explore Python, HTML, and other text-based programming languages. Many of the resources are still under development and will continuously be updated on our website.

A Magic 8 Ball is a “fortune telling” pool ball that can answer yes/no style questions. In this Spark activity you will be creating a Magic 8 ball using Python Programming. Go to go.illinois.edu/TBCS to access an online Python terminal:

To begin, import the random and time libraries. Do this by typing the following into the terminal (the numbers to the left are the line numbers):

  • import random
  • import time

Next, think of the question your 8 Ball will ask (yes or no) and type it in the terminal as follows:

  • question=input(“What Yes or No question do you have?”)

Next, create a list of responses for yes, maybe, and no. This will look like:

  • responses=[“Yes!”, “Maybe!”, “No!”]

Next, add a pause to simulate the computer thinking. In this case we are using 3seconds.

  • time.sleep(3)

Finally, write the code that will select your answer randomly from the list:

  • print(random.choice(responses))

Click Run, and watch your program come to life! Modify the code as necessary and feel free to add different responses.
 

4-H Project Levels and Goals
Beginner

 4-H Computer Science Exhibit Opportunities

 Open Source Computer Science

  • Youth will learn and demonstrate the basics of python programming or other text based language, and be able to create a variety of simple to advanced programs

 Computer Science Ready-4-Life

  • Youth will explore the vast career field of computer science and have the opportunity to demonstrate their knowledge of the field or personal entrepreneurial efforts in computer science

 Computer Science Maker

  • Youth will have the opportunity to combine design and engineering with computer science by creating interactive, physical devices powered by small circuits and microcontrollers
Put Your Project Into Action

Show Your Skills

  • Learn to create simple programs using Python and other similar programing languages
  • Create story books and other storytelling programs using text based programming languages
  • Create a video game capable of being played on computers or cell phones.
  • Contribute to community projects that require simple programming

Service and Leadership

  • Join a state-wide youth planning and operating committee
  • Participate in one of the many nation/statewide opportunities available to 4-H youth
  • Volunteer as a teen teacher to teach computer literacy skills to community members

Entrepreneurship

  • Exhibit in Ready-4-Life at the county/ state fair
  • Participate in Maker-style challenges
  • Start a website design business
  • Develop an app for distribution on the App Store and Play Store

Technology Connection

  • Artificial Intelligence
  • Drones
  • 3-D printing
  • Robotics
  • Advanced computing
  • Internet of Things

Connecting with a Mentor

  • Contact your local Extension Office to find potential content specific mentors in your area
  • Contact local businesses and technology companies about potential internship possibilities

Events

  • Robotics competitions
  • Hack-a-thons
  • County and state fair
  • Google Chicago events and tours

Project Manuals & Exhibit Requirements

Online Resource:

Level 1: Text Based Programing: Into to Python Activity Guide (Online Download)

https://go.illinois.edu/TextCSActivitiesLevel1         

Level 2: Text Based Programing: Into to Python Activity Guide (Online Download)

 https://go.illinois.edu/TextCSActivitiesLevel2 (Availible Mid Sept. 2023)

 

Purchase manuals on the Shop Illinois 4-H Store

View exhibit requirements and scoresheets on the Illinois State Fair page.

Careers
  • STEM Programmer
  • Roboticist
  • Engineer
  • Big Data Analyst
  • Developer
Start a Conversation
  • What is Computer Science?
  • What is Text Based Programing and how is it different from Block Based?
  • What is Coding?
  • Is it the same as Hacking?
  • How was your favorite video game created?
  • How do people make simple apps for the App or Playstore?
  • How do you get started?
     
Credits

4-H Spark Sheets are a collaborative effort of 4-H staff, volunteers, alumni and teens from across Illinois. A big thanks to the many contributors and reviewers!