Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
9 views

Introduction To Coding & Computational Thinking Lecture Slides

Coding

Uploaded by

Isiaka Idris
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Introduction To Coding & Computational Thinking Lecture Slides

Coding

Uploaded by

Isiaka Idris
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Introduction to Coding &

Computational Thinking
Introduction to Coding

Coding is the process of writing instructions for


computers to perform specific tasks.

Coding in Daily Life: Apps, websites, devices we


interact with daily rely on code.
What is Computational Thinking?
A way to solve problems logically and efficiently
by breaking them down.

Problem-solving approach involving breaking


down complex issues into smaller parts and
using logical steps.

Skills involved: Problem-solving, logic, and


structured thinking.
Why Learn Coding & Computational
Thinking?
Top skills in today’s job market; coding knowledge is highly
valued.

Essential in fields like data science, engineering, finance,


marketing, and more.

Real-life Benefits:
• Automation: Simplify repetitive tasks.
• Problem-solving: Enhances logical thinking.
• Career Opportunities: Opens doors in technology, data
science, and other fields.
Comparison of
Popular Programming Languages
Languages: Python, JavaScript, C++.
Key Differences:
Feature Python JavaScript C++

Syntax Simple, readable Web-focused, Complex, lower-


versatile level

Speed Slower Moderate Fast (compiled)

Memory Automatic Automatic Manual


Management
Main Use Cases Data science, AI, Web development, Systems
web interactivity programming,
games
Learning Curve Easy Moderate Steep
Programming Language Choice
Python: Best for rapid development, data science, and
readability.

JavaScript: Essential for web interactivity, works across


browsers and servers.

C++: High performance, suitable for game development and


systems programming.

Choosing the Right Language: Depends on project


requirements and performance needs.
Overview of Python
Programming Language
• Simple Syntax: Easy to write and understand, making it accessible
to new programmers.
• Interpreted Language: Executes code line-by-line, which aids in
debugging.
• Object-Oriented: Supports classes and objects to structure code.
• Extensive Libraries and Frameworks: Includes libraries for data
analysis, web development, machine learning, and more.

Fields of Application:
Data Science, Web Development, Automation, AI & ML, Cybersecurity,
FinTech.

Python is a versatile language that opens doors to multiple industries.


Support from an active community with extensive resources.
Basic Coding Concepts
Variables: Storage for data values (e.g., x = 5)

Loops: Repeating a set of instructions until a


condition is met (e.g., for i in range(1,11):)
Basic Coding Concepts
Conditions: Making decisions/Executing actions
in code based on specified conditions (e.g., if x >
5:)

Functions: Reusable blocks of code for specific


tasks (e.g., def sum(a, b): return a + b)
Demo Exercise
Simple Sum Calculation
Objective: Write code to calculate the sum of numbers from
1 to 10.
Python Instructions:

total = 0
for i in range(1, 11):
total += i
print("Sum from 1 to 10 is:", total)

Expected Output: Sum from 1 to 10 is: 55


Four Key Computational Thinking
Techniques
Decomposition: Breaking down complex problems
into smaller parts or tasks.
Example: Planning a trip by breaking it down into
tasks (e.g., flights, accommodation, and itinerary).

Pattern Recognition: Identifying similarities in


data or problems to simplify them.
Example: Recognizing a pattern in travel
itineraries for faster planning.
Four Key Computational Thinking
Techniques
Abstraction: Focusing on key information, ignoring
the rest.
Example: Focusing on key trip planning info (dates,
budget) without diving into specifics too early.

Algorithm Design: Creating step-by-step


instructions to solve problems.
Example: Designing a set of steps to book travel
and accommodation.
Hands-on Exercise
Objective: Apply computational thinking to solve a real-world
problem.

Problem: Plan a group trip with given requirements.

Solution Steps:
• Decompose the trip into planning for transport,
accommodation, itinerary.
• Recognize patterns in travel costs and booking times.
• Abstract by focusing on major steps only.
• Design an algorithm for booking with available budget and
options.
Coding for Task Automation
Benefits:
Speeds up repetitive tasks.
Increases efficiency in data handling,
communication, etc.
Coding Applications Across Fields
Data Analysis: Automated calculations and data
summaries.

App Development: Interactive tools and user


interfaces.

Automation: Streamline workflows and


communication.
Hands-on Exercise
Goal: Create a program to send an automated message.

Python Instructions:
def send_message(name):
message = f"Hello, {name}! This is an automated message."
return message

Test with different names:


print(send_message("John"))
print(send_message("Mary"))

Expected Output:
Hello, John! This is an automated message.
Hello, Mary! This is an automated message.
Hands-on Exercise
Objective:
Learn how to use Python to create a daily checklist that you can reuse
every day by simply running the script. The checklist will prompt users
to complete each task, mark it as "done," and display a summary at
the end of the day.

Steps for the Exercise:


Define Tasks: Predefine a list of daily tasks in the script.
Interactive Prompts: As the user runs the script, they will be prompted
to mark each task as "done" when completed.

Summary: At the end of the checklist, the script will display which
tasks were completed and which were not.
Conclusion
• Empowering Skills: Coding and computational thinking are essential
tools in today’s digital world.
• Problem-Solving & Efficiency: These skills enable efficient, logical
problem-solving that can be applied across industries.
• Starting Small, Growing Big: Remember, even the simplest code can
lead to significant improvements; focus on continuous learning.

Next Steps:
• Practice Regularly: Apply these techniques to daily tasks to strengthen
your skills.
• Explore More: Continue learning advanced topics in coding languages
and data analysis.
• Think Creatively: Use computational thinking in new ways to solve
challenges in personal and professional life.
Questions
Thank You

You might also like