Coding For Kids Python - A Comprehensive Guide That Can Teach Children To Code With Simple Methods
Coding For Kids Python - A Comprehensive Guide That Can Teach Children To Code With Simple Methods
A Comprehensive Guide that Can Teach Children to Code with Simple Methods
GoldInk Books
BEFORE YOU
START READING,
DOWNLOAD YOUR
FREE DIGITAL ASSETS!
Be sure to visit the URL below on your computer
or mobile device to access the free digital asset files
that are included with your purchase of this book.
These digital assets will complement the material
in the book and are referenced throughout the text.
DOWNLOAD YOURS HERE:
www.GoldInkBooks.com
GOLDINK BOOKS
GoldInk Books is a self-publishing company. We produce books in a range of genres with efficiency, speed and convenience of digital publishing. Our
researchers and authors are dedicated to bring high-quality research to people all over the world. All of our books are available to read and download
online. We use technology to make the book publishing sector more accountable. We are known for taking a serious and intellectual approach to different
topics with popular appeal. To strengthen the pillars of knowledge, we want to put a book in everyone's hands and create an active network of digital
creative communities.
© Copyright 2021 by GoldInk Books - All rights reserved.
This document is geared towards providing exact and reliable information in regard to the topic and issue covered.
The publication is sold with the idea that the publisher is not required to render accounting, officially permitted, or
otherwise, qualified services. If advice is necessary, legal or professional, a practiced individual in the profession
should be ordered.
From a Declaration of Principles which was accepted and approved equally by a Committee of the American Bar
Association and a Committee of Publishers and Associations.
In no way is it legal to reproduce, duplicate, or transmit any part of this document in either electronic means or in
printed format. Recording of this publication is strictly prohibited and any storage of this document is not allowed
unless with written permission from the publisher. All rights reserved.
The information provided herein is stated to be truthful and consistent, in that any liability, in terms of inattention or
otherwise, by any usage or abuse of any policies, processes, or directions contained within is the solitary and utter
responsibility of the recipient reader. Under no circumstances will any legal responsibility or blame be held against
the publisher for any reparation, damages, or monetary loss due to the information herein, either directly or
indirectly.
Respective authors own all copyrights not held by the publisher.
The information herein is offered for informational purposes solely and is universal as so. The presentation of the
information is without contract or any type of guarantee assurance.
The trademarks that are used are without any consent, and the publication of the trademark is without permission or
backing by the trademark owner. All trademarks and brands within this book are for clarifying purposes only and
are owned by the owners themselves, not affiliated with this document.
Table of Contents
INTRODUCTION
CONCLUSION:
Introduction
The ability to code is becoming increasingly important in today's world. Coding is no longer just for programmers
and computer scientists but is valuable in any field.
Learning to code is vital for kids thinking about their future, but deciding which one to learn might be difficult.
Some languages are easier to learn than others, and some have a broader range of applications. One language,
however, is in the sweet spot. We all know that coding is still strange to most people, and there is much skepticism
about it. As parents, we typically send our children to school to learn about everything we believe we need to know,
but coding is not one of them.
Even now, most teenagers and children's schools do not teach coding. Furthermore, most schools do not have access
to code for various reasons, including curricular rigidity, a lack of teaching tools, and so on. This ignorance has
made the subject an alien. The bad news is that this ignorance is robbing a significant opportunity to succeed from
our teens and children. Coding can assist your children to enhance their creativity, logical reasoning, and problem-
solving skills, in addition to giving them a competitive advantage.
Take a deep breath and exhale slowly!!!
After reading this book, all of your troubles will be solved. You will have all of the information you need to learn
basic Python coding in one file, and this will be enough for you to create your own games.
So are you interested in learning Python (for kids)?
Excellent decision! There are a variety of reasons why Python is becoming more popular, but for kids, Python is an
excellent programming language to begin how to code. Python is a good choice for kids because it is both simple to
learn and widely utilized in the real world.
Python is a high-level programming language that is powerful and easy to understand. This implies that commands
are written as English words rather than sophisticated 0s and 1s, making it simple for children to learn Python
without prior knowledge.
This python book for kids will assist parents and instructors in teaching Python to their children.
The Content of this Guide
The core and essential ideas of Python will be covered in this guide.
This guide has been meant to be a bit-by-bit, or step-by-step, guide to ensure that you grasp every aspect of it. First
and foremost, you must master the fundamentals of sentence construction, sometimes known as syntax. The
following sections of this guide will take you through important expressions, functions, and the building of simple
programs in Python programming.
Furthermore, this book covers everything you need to know about Python selection, operators, arrays, logical data,
classes, pointers, and strings.
Before digging deeper into Python, let me brief you that this guide will help you with,
● Basic knowledge of Python
● Basic Knowledge of Coding
● How to start Coding in Python?
● How to Craft Projects in Python?
● Keywords and Identifiers
● Python’s Basic and Medium Syntax
● Unique and Irresistible features of Python
● Applications of Python
● Compilers, IDE’s, and Text Editors of Python
● Variables, Operators, and Data Types
● Expressions in Python
● OOP Concepts in Python
● Module Crafting, Exceptions, and Arrays in Python Programming
● Libraries in Python
For Which Age Group is this Guide Suitable?
This guide has been designed for beginners, especially teens (13 and above).
Furthermore, if you are a parent and want to learn Python programming for your children, this guide would be a
perfect choice for you.
Key Advice
You will find this guide more beneficial if you try to code-in, and develop your own programs while reading this
guide.
Interpreter
Python has a number of interpreters that may be used to tweak and improve your Python code. Python can be run
from a variety of perspectives. Python programming is tough to complete without the help of a larger number of
mediators. Python is a simple high-level computer programming language that may be executed with the help of
translators. Interpreters are often thought of as projects that enable the execution of rules written in a code.
Factors are locations of identifiers/variables. The literal coefficients and integers used in your Python application
are created using variables. The following are the Python variable naming conventions.
● A variable's or identifier's name must be a single letter or an underscore " ."
● Aside from the fundamental letters, each of the remaining characters can be a letter (lower case "a-z,"
capitals "A-Z," underscores, or numbers "0-9").
● The name of an identifier/variable must not contain any empty/void zones, as well as any unique or unusual
characters such as "! @, #, percent, and *."
● The name of a variable cannot be a word in Python syntax.
● Variables are case-sensitive. The terms alien and Alien, for example, are not interchangeable.
● Valid identifiers/variables include r203, _m, f 90, and others.
● Invalid identifiers/variables include 90, m percent 809, f90x69, and others.
Multiple Assignments
● Multiple Assignment is the term used when Python assigns a single location to multiple identifiers/variables.
It can be used in two ways: defining a single location for multiple identifiers/variables at the same time or
declaring multiple locations for multiple identifiers/variables at the same time.
● At different times, assigning the same attributes or quantities to a large number of variables/identifiers.
Example of assigning at the same variable
Open the Python console or IDE and write the command to declare variables.
>>> v=r=t=29
>>> print
>>> print (v, r, t)
Output:
When you type the command to print the value of variables, the output will be something like this.
>>> 29, 29, 29
Example of assigning at multiple variable
Now write:
>>> v, r, t = 27, 83, 49
>>> print
>>> print (v)
>>> print (r)
>>> print (t)
Output:
For output,
When you will type your command
>>> print (v)
Your console will print "27"
When you will type your command
>>> print (r)
Your console will print "83"
When you will type your command
>>> print (t)
Your console will print "49"
● Arithmetic Operators
● Comparison Operators
● Assignment Operators
● Logical Operators
● Bitwise Operators
● Membership Operators
● Identity Operators
Python Arithmetic Operators
To achieve the desired results, arithmetic operators are employed to conduct certain arithmetic operations.
Two operands are taken in Arithmetic Operations, and activity between them is done through an operator, resulting
in a specified, desired, and absolute consequence.
Here are some of the most widely used and helpful arithmetic operators in Python.
● Addition "+"
● Subtraction "-"
● Division "/"
● Multiplication "*"
● Remainder "%"
Python Comparison Operators
Comparison operators are used in Python programming to compare two values/operands and yield a Boolean type
value, such as TRUE or FALSE.
==
If and only if the values are logically true and equal in nature, this operator is used.
!=
This operator is used when both values are true but unequal in nature.
<=
You use this operator when your first value/operand is smaller than or equal to the second value/operand.
>=
You use this operator when your first value/operand is greater than or equal to the second value/operand.
<>
If the values/operands are not equal, this operator is employed.
>
When your first value/operand is bigger than the second value/operand, you use this operator.
<
When your first value/operand is less than the second value/operand, you use this operator.
Python's logical operators
In our real lives, we sometimes have to make difficult decisions based on logical data, such as True False.
Let's imagine you get a phone call, and someone asks, "Are you at home?" Yes, you would have two options.
● Yes! I am home.
● No! I am not.
In programming, this would fall under the 0 (false) and 1 (true) categories. This is referred to as logical data.
Logical Operators are used in Python to evaluate expressions and make specific conclusions. These operators are
quite useful for writing reasoning. The following is a list of logical operators in Python, along with a brief
description to help you understand them better.
AND operator
The outcome will be true if an expression "c" is true and another expression "k" is true as well. The result will be
false in all other cases.
The table below may assist you in better understanding "And Operator."
OR Operator
If and only if both operands are false, this operator will return false. If one of the expressions "c" is true and the
other "k" is false, the outcome will be true.
The table below may assist you in better understanding the "And Operator."
2.3 Python's Data Types
A data type is a collection of operations and values that can be applied to the operands and values in question.
Identifiers in Python can have a variety of properties. For example, a person's name must be stored as a string,
whereas their "id" must be stored as a whole number.
Python supplies us with a variety of standard data types that describe the capabilities and techniques of each. The
following are the most often used data types in Python.
● Numbers
● String
● List
● Tuple
● Dictionary
Now we will go through a few of them with some instances.
● Numbers
In Python, Number, as a data type, stores the numeric values. Python generates a numeric object whenever a
number is assigned to a variable or identifier.
Example:
>>> c = 69
>>> k = 96
In the above-mentioned example, c and k are the numeric objects. The Python supports four different types of
numeric data.
● Integer (int)
Int assigns integers, such as 82, 67, 28, etc.
● Long Integers (long)
Long integers are generally used for a higher number or range of integer values, such as -0x19397L, 988007X, etc.
Moreover, Python allows using a lower-case "l" to be used with the long integers. But you must ensure that always
an upper-case "L" is used for clarity and basic understanding.
● Float (float)
In Python programming, the float is used to store the floating-point values, such as 3.8, 98.6027, 78.982, etc.
● Complex
Complex, in Python, is used to support complex numbers, such as 16.024j, 5.2 + 6.8j, etc.
Moreover, a complex data type always consists of an ordered pair, such as c + ik where c and k denote the real and
imaginary parts, respectively.
● String
In Python, we may describe string as a sequence of characters that is usually represented in quotation marks.
Moreover, single, double, or even triple quotes can be used to define a string.
String handling is a simple, understandable, and very clear task since there are many in-built functions and
operators that are provided by Python to execute this task. For string handling in Python, the operator "+" is used to
connect two strings as the operation.
"Hi" +" Mr. David Robertson"
Returns,
"Hi Mr. David Robertson"
Furthermore, the operator "*" is usually known as a repetition operator.
"Mirror" * 2
Returns,
"Mirror Mirror"
You may understand string handling in Python, with the help of the following example.
● Lists
In Python, we use lists as we use arrays in C or C++. However, the list may contain data of various types. The
stored items in a list are usually separated by a comma "," and enclosed within square brackets "[ ]"
Slice operators "[:]" may be used to access the list's elements. The addition operator "+" and multiplication
operators "*" work with the list in the same way as they work with the strings.
Example:
>>> l = [6.2, "Hi", "Python", 9]
>>> print (l [3 :]);
>>> print (l [0:2]);
>>> print (l);
>>> print (l + l);
>>> print (l * 3);
Output:
When you write the first command and press enter, i.e.
>>> print (l [3 :]);
Your console will print,
“[9]”
When you write the second command and press enter, i.e.
>>> print (l [0:2]);
Your console will print,
"[6.2, 'Hi']"
When you write the third command and press enter, i.e.
>>> print (l);
Your console will print,
"[6.2, 'Hi', 'Python', 9]"
When you write the fourth command and press enter, i.e.
>>> print (l + l);
Your console will print,
“[6.2, 'Hi', 'Python', 9, 6.2, 'Hi', 'Python', 9]”
When you write the fifth command and press enter, i.e.
>>> print (l * 3);
Your console will print,
“[6.2, 'Hi', 'Python', 9, 6.2, 'Hi', 'Python', 9, 6.2, 'Hi', 'Python', 9]”
● Tuple
In Python, Tuple is identical to the list in many ways. Similar to lists, tuples also possess the collection of different
elements of numerous data types. The components of the tuple are separated with the help of a comma "," and
enclosed in parentheses "( )."
Moving forward, a gadget, machine, or system cannot modify the size, value, and numbers of the elements in a
tuple by itself.
Example:
>>> t = ("Hi", "Python’s Universe", 95)
>>> print (t [1 :]);
>>> print (t [0:1]);
>>> print (t);
>>> print (t + t);
>>> print (t * 3);
>>> print (type (t))
>>> t [2] = "hello";
Output:
When you write your first command and press enter, i.e.
>>> print (t [1 :]);
Your console will print,
“('Python’s Universe', 95)”
When you write your second command and press enter, i.e.
>>> print (t [0:1]);
Your console will print
"('Hi',)"
When you write your third command and press enter, i.e.
>>> print (t);
Your console will print,
"('Hi', 'Python's Universe', 95)"
When you write your fourth command and press enter, i.e.
>>> print (t + t);
Your console will print,
"('Hi', 'Python's Universe', 95, 'Hi', 'Python's Universe', 95)"
When you write your fifth command and press enter, i.e.
>>> print (t * 3);
Your console will print,
“('Hi', 'Python Universe', 95, 'Hi', 'Python’s Universe', 95, 'Hi', 'Python’s Universe', 95)”
When you write your sixth command and press enter, i.e.
>>> print (type (t))
Your console will print,
"< type 'tuple'>"
Chapter 3: Strings Data Type
Strings are one of Python's most popular data types. We can easily make them by enclosing characters in quotation
marks. Single quotes are treated the same as double quotes in Python. Assigning a value to a variable is all it takes
to make a string.
In this chapter, we will discuss how string works and how we can create it.
So Let’s get started.
Lists' Characteristics
The following traits can be found on the list:
● The lists are arranged in alphabetical order.
● The list's elements can be accessed by index.
● Lists represent the mutable type.
● The types of lists are mutable.
● The number of different elements can be stored in a list.
2. Negative Indexing — This method indexes from right to left, with the rightmost element having a -1 index
value. Python sequences support negative indexing. The last item is represented by the index -1, the second last
item by the index -2, etc.
Example:
Chapter 5: Python Dictionary and Libraries
A dictionary is basically similar to a list; it is a collection of things. We can also say that it is another composite
data type provided by Python.
In this chapter, you will learn how to access and manage dictionary data as well as the fundamental properties of
Python dictionaries. After completing this course, you should clearly understand when a dictionary is the right data
type to use and how to utilize it.
Example:
Dictionary Elements: Changing and Adding
Dictionaries are subject to change. Using the assignment operator, we can create new items or change the value of
existing ones.
If the key already exists, the existing value will be updated. The dictionary is updated with a new (key: value) pair
if the key is missing.
5.2 Python’s Libraries
Python is recognized as a programming language with "batteries included." Python entails and includes a number of
pre-packaged libraries. In any event, for the translated, abnormal state, there are a variety of libraries available.
Python is also a globally beneficial programming language.
They have a large collection of libraries, which is a notable feature among the several factors being added to
Python’s popularity. Most libraries and bundles are a collection of programming languages that give developers
access to them. The following are some of the most commonly used languages in Python.
"Requests" is one of the most significant general Python libraries. Its goal is to make HTTP demand more human-
friendly and less complicated. Request is a real standard used by Python developers for making HTTP requests
while using Python. It is approved under Apache2 permission and written in Python.
When using the Requests library to make HTTP requests to a server, you can include structure information, content,
headers, multi-part documents, and other things. Designers do not have to include a question to the URL or
physically structurally encode the POST data with the library.
The Requests library isolates the numerous difficulties of making HTTP requests into a simple API, allowing
developers to focus on communication with administrators. This library also includes authority support for Python
2.7, Python 3.4, and more and PyPy compatibility.
Features:
● It supports multi-part record transfers as well as spilling downloads.
● It does the disentangling and programming decompression automatically.
● SSL confirmation is the browser's style.
● Features can be added and upgraded in this library based on prerequisites.
● This library supports worldwide domains and URLs by keeping them alive and providing pooling.
PIL
PIL (Python Imaging Library) is a free Python library that extends the capabilities of Python variables by allowing
them to store images. In its most basic form, PIL allows you to manipulate, open, and save various photo records
organized in Python. Alex Clark and Contributors worked together to create this library. The Pillow library is a
subset of the larger PIL library.
Scrapy
Scrapy is a free and open-source Python framework that is widely used for online and a variety of other tasks,
including automated testing and data mining. Scrapy was created for web-based scratching at first, but it has since
been improved to serve various tasks. This library also includes a rapid and abnormal state technique for crawling
websites and separating organized data from them.
Tkinter
Python provides a straightforward and quick method for the construction of GUI applications when using Tkinter.
This package is widely regarded as the standard Python GUI library. It comes with a fantastic item-based interface
for the Tk GUI toolset. It's important to note that creating a GUI application with Tkinter is simple.
Six
It is unavoidable that Six is the most basic of Python libraries. It is a fantastic Python package for blending the
differences between Python 2 and Python 3 forms. Six was created to support codebases that can run on both
Python 2 and Python 3 without the need for any modifications.
Pygame
Pygame is a free and open-source Python toolkit for improving video and sound-based applications in Python. It is
especially beneficial to two-dimensional gaming ventures. As a result, both beginners and experienced Python game
developers use it.
Pygame provides the SDL (Simple DirectMedia Layer) module that can be used through a Python compiler or IDE.
The Pygame library, like the SDL library, is quite useful and supports a wide range of stages and working
frameworks.
Bokeh
Bokeh is a Python module that allows you to create natural-looking depictions. It allows users to visualize data
beautifully and importantly within modern online applications. Dashboards, data apps, and sharp graphs can all be
created with the data visualization library.
Asyncio
This library is used to write concurrent code using async, and it anticipates grammar by the developers. The asyncio
library is ideal for IO-bound and high-level organized system source code in the majority of the program.
Numpy
NumPy is a crucial Python Data Science module that is required for logical registration. It supports a fantastic N-
dimensional exhibit item as well as broadcasting capabilities.
This library also includes Fourier transformations, arbitrary number capacity, and devices for coordinating C, C++,
and FORTRAN programs. For full-stack engineers working on Python-based Artificial Intelligence projects, having
a working knowledge of NumPy is essential.
Pandas
Pandas uses two-dimensional tables to analyze data, similar to SQL or Excel. Python didn't have this feature at first.
Pandas, on the other hand, were introduced. Pandas is unquestionably the "SQL of Python." In a nutshell, Pandas is
a Python package that may assist us to deal with two-dimensional data tables. However, it is comparable to SQL in
many ways.
Pandas is also built on the NumPy package, which means that a lot of NumPy's structure is reused or replicated in
Pandas. Pandas data is widely used to support SciPy factual inspection, Matplotlib graphing capabilities, and Scikit-
learn machine learning algorithms.
Matplotlib
Matplotlib is a Python-based two-dimensional charting framework with unique representation modules. It is capable
of delivering high-quality figures in a variety of printed formats as well as intelligent cross-stage conditions. It is
also used in the Python shell, Python contents, and the IPython shell.
According to Matplotlib's official website, this Python package aims to "keep simple things easy and hard things
imaginable." The Python module for 2D charting allows you to create bar graphs, error diagrams, histograms, plots,
scatter plots, and more with fewer lines of code.
Scikit-Learn
Scikit-learn uses a predictable Python interface to provide a range of administered and solo learning calculations. It
is licensed under a forgiving restructured BSD license and distributed under various Linux distributions, allowing it
to be used for academic and business purposes. SciPy (Scientific Python) is the foundation of the library, and it
must be installed before you can use sci-kit-learn.
There are a few Python libraries that can handle a wide range of machine learning calculations well. Scikit-Learn,
for example, is a package that provides expert adaptations of a wide range of fundamental calculations.
Scipy
There is a scipy stack and a scipy library. The Scipy stack contains many libraries and packages (that is for logical
processing in Python). One of these components is the Scipy library, which provides competent numerical
scheduling responses (the math stuff behind AI models). Incorporation, introduction, improvement, and so on are
examples of these. In Scikit-learn, Scipy provides the central scientific tactics for doing the unpredictable AI forms.
It is an open-source library that is used to register various modules such as image preparation, joining, insertion,
unique capacities, enhancements, straight variable-based math, Fourier Transform, and grouping.
TensorFlow
TensorFlow must have been familiar to everyone working with AI machine learning jobs in Python. It is an open-
source representational math library created by Google for numerical calculation using information stream
diagrams. The chart hubs speak to the scientific activity in a standard TensorFlow information stream diagram. On
the other hand, the chart edges refer to the multidimensional data exhibits, also known as Tensors, that flow
between the diagram hubs.
Keras
It is regarded as one of Python's most interesting AI (Algorithm) libraries. Keras is a tool for communicating neural
systems that is easier to use. It also includes fantastic tools for building models, preparing datasets, creating
visualizations, and much more. Keras, which is written in Python, can run on top of CNTK, TensorFlow, and
Theano. The Python AI library was built to allow for fast experimentation.
Keras is a reasonable Python AI library when compared to other Python AI libraries. This is due to the fact that it
first creates a computational diagram using the backend framework and then uses the same to perform operations.
Chapter 6: Control Statements and Loops
Python has regular expressions, statements, and the concept of loops, just as other computer programming
languages. However, Python's expressions and loops, like everything else about Python programming, are unique.
Methods, functions, loops, and statements are all important parts of a Python program or app that can be used to
analyze data and accomplish other activities. The additions and revisions of these operational expressions in the
Python libraries are for a variety of reasons.
While utilizing Python as a programming language, we will cover the importance and functionality of these
techniques in this chapter.
Output:
When you execute this program, your console screen will print this,
Enter some number of rows
If you enter “8”, It will print,
*
**
***
****
*****
******
*******
********
While Loop
A while loop, in general, is responsible for allowing a section of code to be performed as long as the provided
condition is true.
This loop is typically utilized when the quantity of the iteration is unknown ahead of time. The while loop has the
following syntax.
>>> while expression:
>>> (statements);
Statement expression must be any valid Python expression concluding into true or false. The True is any
non-zero value, in this case.
Example – 1:
>>> c=1;
>>> while c<=12:
>>> print(c);
>>> c=c+1;
Output:
In this condition, your console will print a list of all integers till 11.
1
2
3
4
5
6
7
8
9
10
11
12
Chapter 7: Function and Scope of Variable
Python functions are the most crucial aspects of Python programming. No coder can attain his or her desired results
without utilizing these features. Functions are a set of simple routines that can be invoked from anywhere in your
program's main body.
Example:
Example:
Example:
The str( ) Function
The str( ) Function transforms any value into a string. This conversion function helps users to get things done
quickly.
Example:
>>>str('6')
Output:
'6'
7.2 Scope of Variable
Not every variable is accessible from every portion of our program, and not every variable exists for the same
amount of time. How a variable is defined determines where it is accessible and how long it exists. The area of a
program where a variable is accessible is called a scope, and the period the variable exists is called lifetime.
A global variable is a variable that is defined in the main body of a file. It will be visible throughout the file, as well
as in any file that imports it. Because of their wide-ranging impacts, global variables can have unforeseen
repercussions, which is why we should nearly never utilize them. The global namespace should only contain things
that are intended to be used globally, such as functions and classes.
A variable defined within a function is considered local to that function. It is available from the beginning of the
function until the finish, and it exists for as long as the function is running. The names of the parameters in the
function specification act like local variables, but they include the values that we provide into the function when we
call it. When we use the assignment operator (=) within a function, it creates a new local variable by default unless
a variable with the same name already exists in the local scope.
Here is an example of variables in different scopes:
Inheritance
It is a crucial component of the Python programming language. In OOP, it is comparable to the old human
biological inheritance system. All of the attributes and methods are present in the younger object. We can create
classes that leverage one other's properties using this framework. It assists in obtaining results by utilizing a single
code for all classes. It also saves time and makes the syntax easier to understand.
10.2 Python Objects and Classes
A class is a presumptive element that holds a collection of items. It is a virtual thing that takes on meaning when we
compare it to objects and their attributes. As an example, consider a hospital. There are rooms, beds, medical
equipment, and other amenities. The hospital structure is a class, and all of the structure's components are its
objects.
Python is a computer language that focuses on objects. Object-oriented programming, in contrast to procedure-
oriented programming, places a greater emphasis on objects.
A collection of data (variables) and methods (functions) that act on that data is known as an object. A class, on the
other hand, is a blueprint for that item.
A class can be compared to a rough sketch (prototype) of a home. It covers all of the information regarding the
floors, doors, and windows, among other things. We construct the house based on these descriptions. The item is a
house.