SlideShare a Scribd company logo
1 of 15
PROGRAMMING
In (Python)
STRINGS
• A string is a data type that is used to represent a sequence of characters.
Such as numbers, text, spaces, punctuation, user name, communication with users, a
whole sentence or paragraph of data. Strings must be enclosed in quotation to
distinguish from variable names.
BASICS OF WORKING WITH
STRINGS
• Indexing
Each character in a string has an index
number, with the first character at
position 0. You can use the index to
reference individual characters in a string.
• Length
Length function : To find the number of
characters In a String
• Traversal
To cycle through each character of a
string. Mainly using Loops
MORE STRING MANIPULATION
• Finding Characters
with a certain Index
The index of a character is the position of
that character within a string. Which can be
accessed using square brackets.
• Changing Casings of
Characters
• Extracting Characters
By selecting characters from indexes 3 to
6, It leaves out the rest. Printing “put”
• Checking
Characters
‘put’ and ‘PUT’: ‘put’ is a substring of
‘Computer Science’ but ‘PUT’ is
not, so these examples will display ‘True’
then ‘False’.
DATA STRUCTURES
• A data structure is
an organized
collection of
related elements.
There are many
different data
structures that can
store multiple data
items used in
programming.
ARRAYS
• An array is an organized
collection of related values with
a single shared identifier. All
the elements in an array are the
same data type, where each has
a unique index value denoting
its position in the array.
• One/ Single dimension array
where the data are stored in the
sequential order. For example, it
can be used to store name or
mobile number or grade
• A multidimensional array is an ‘array of arrays’; where
each item at an index is another array
LISTS
• Lists are easier to use as they are dynamic – they do not have a fixed size and can grow as new
elements are added. When they are declared they do not have to be given a size and can grow as
new elements are added.
• In Python, arrays are not
commonly used. Instead lists are
used but they are very similar in
the way that they operate. Just
like an array, a list is created by
adding items, separated by
commas, inside square brackets
WHICH ONE TO USE ? :
ALGORITHMS
• An algorithm is a precise method of solving a problem.
VARIABLE INITIALIZATION & DATA
TYPES
• When algorithms are
converted into programs, the
computer needs to be told
what type of data is stored in
each variable. Every
programming language has a
number of built-in data
types.
• When a variable is declared, the computer gives it a location in its
memory. Initially, this location is empty, so before a variable can
be used it has to be given a value.
SEQUENCE : SELECTION : ITERATION
• There are three key building blocks of algorithms : They are command sequence, selection
and iteration.
• Sequence
• The order in which
instructions occur
and are processed
• Selection
• Making decisions
by asking a
question &
depending on the
outcome, follow
one of the two
paths or take
certain actions &
ignore others
SELECTING WITH IF STATEMENTS:
• The IF statement is a decision-
making statement that guides
a program to make decisions
based on specified criteria
• The Nested if statement allows
you to create a chain of if
statements. The if statements
are evaluated in order until one
of the if expressions is true or
the end of the if chain is
reached. If the end of the chain
is reached without a true
expression no code blocks are
executed.
ITERATION (LOOPS) :
• Indefinite Loop : A loop where it
is not easy to know amount of
execution required.
• Definite Loops : A loop that
executes a known number of times.
This type of loop can be executed
using while statements
This type of loop can be executed
using for statements
Nested for Loop : The inner loop
will finish all of it’s iterations before
finishing one iteration of the ‘ outer
loop’
Computer Sience, This is my presentation for beginners coding in python

More Related Content

Similar to Computer Sience, This is my presentation for beginners coding in python

Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical ExpressionsUnit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressionsdubon07
 
Engineering CS 5th Sem Python Module -2.pptx
Engineering CS 5th Sem Python Module -2.pptxEngineering CS 5th Sem Python Module -2.pptx
Engineering CS 5th Sem Python Module -2.pptxhardii0991
 
Module 3,4.pptx
Module 3,4.pptxModule 3,4.pptx
Module 3,4.pptxSandeepR95
 
CS4443 - Modern Programming Language - I Lecture (2)
CS4443 - Modern Programming Language - I  Lecture (2)CS4443 - Modern Programming Language - I  Lecture (2)
CS4443 - Modern Programming Language - I Lecture (2)Dilawar Khan
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structuresSenthil Murugan
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03) iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03) Jonathan Engelsma
 
Unit 1 array based implementation
Unit 1  array based implementationUnit 1  array based implementation
Unit 1 array based implementationLavanyaJ28
 

Similar to Computer Sience, This is my presentation for beginners coding in python (20)

Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical ExpressionsUnit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
Unit 4 - Basic ABAP statements, ABAP Structures and ABAP Logical Expressions
 
Engineering CS 5th Sem Python Module -2.pptx
Engineering CS 5th Sem Python Module -2.pptxEngineering CS 5th Sem Python Module -2.pptx
Engineering CS 5th Sem Python Module -2.pptx
 
enum_namespace.ppt
enum_namespace.pptenum_namespace.ppt
enum_namespace.ppt
 
ds bridge.pptx
ds bridge.pptxds bridge.pptx
ds bridge.pptx
 
Module 3,4.pptx
Module 3,4.pptxModule 3,4.pptx
Module 3,4.pptx
 
CS4443 - Modern Programming Language - I Lecture (2)
CS4443 - Modern Programming Language - I  Lecture (2)CS4443 - Modern Programming Language - I  Lecture (2)
CS4443 - Modern Programming Language - I Lecture (2)
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structures
 
12.6-12.9.pptx
12.6-12.9.pptx12.6-12.9.pptx
12.6-12.9.pptx
 
Apex code (Salesforce)
Apex code (Salesforce)Apex code (Salesforce)
Apex code (Salesforce)
 
Java best practices
Java best practicesJava best practices
Java best practices
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Unit 4 plsql
Unit 4  plsqlUnit 4  plsql
Unit 4 plsql
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03) iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
 
Variables&DataTypes.pptx
Variables&DataTypes.pptxVariables&DataTypes.pptx
Variables&DataTypes.pptx
 
lecture 02.2.ppt
lecture 02.2.pptlecture 02.2.ppt
lecture 02.2.ppt
 
ITFT - Java
ITFT - JavaITFT - Java
ITFT - Java
 
stack.pptx
stack.pptxstack.pptx
stack.pptx
 
Unit 1 array based implementation
Unit 1  array based implementationUnit 1  array based implementation
Unit 1 array based implementation
 
Python Data-Types
Python Data-TypesPython Data-Types
Python Data-Types
 
chapter 5.ppt
chapter 5.pptchapter 5.ppt
chapter 5.ppt
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Computer Sience, This is my presentation for beginners coding in python

  • 2. STRINGS • A string is a data type that is used to represent a sequence of characters. Such as numbers, text, spaces, punctuation, user name, communication with users, a whole sentence or paragraph of data. Strings must be enclosed in quotation to distinguish from variable names.
  • 3. BASICS OF WORKING WITH STRINGS • Indexing Each character in a string has an index number, with the first character at position 0. You can use the index to reference individual characters in a string. • Length Length function : To find the number of characters In a String • Traversal To cycle through each character of a string. Mainly using Loops
  • 4. MORE STRING MANIPULATION • Finding Characters with a certain Index The index of a character is the position of that character within a string. Which can be accessed using square brackets. • Changing Casings of Characters • Extracting Characters By selecting characters from indexes 3 to 6, It leaves out the rest. Printing “put” • Checking Characters ‘put’ and ‘PUT’: ‘put’ is a substring of ‘Computer Science’ but ‘PUT’ is not, so these examples will display ‘True’ then ‘False’.
  • 5. DATA STRUCTURES • A data structure is an organized collection of related elements. There are many different data structures that can store multiple data items used in programming.
  • 6. ARRAYS • An array is an organized collection of related values with a single shared identifier. All the elements in an array are the same data type, where each has a unique index value denoting its position in the array. • One/ Single dimension array where the data are stored in the sequential order. For example, it can be used to store name or mobile number or grade • A multidimensional array is an ‘array of arrays’; where each item at an index is another array
  • 7. LISTS • Lists are easier to use as they are dynamic – they do not have a fixed size and can grow as new elements are added. When they are declared they do not have to be given a size and can grow as new elements are added. • In Python, arrays are not commonly used. Instead lists are used but they are very similar in the way that they operate. Just like an array, a list is created by adding items, separated by commas, inside square brackets
  • 8. WHICH ONE TO USE ? :
  • 9. ALGORITHMS • An algorithm is a precise method of solving a problem.
  • 10. VARIABLE INITIALIZATION & DATA TYPES • When algorithms are converted into programs, the computer needs to be told what type of data is stored in each variable. Every programming language has a number of built-in data types. • When a variable is declared, the computer gives it a location in its memory. Initially, this location is empty, so before a variable can be used it has to be given a value.
  • 11. SEQUENCE : SELECTION : ITERATION • There are three key building blocks of algorithms : They are command sequence, selection and iteration.
  • 12. • Sequence • The order in which instructions occur and are processed • Selection • Making decisions by asking a question & depending on the outcome, follow one of the two paths or take certain actions & ignore others
  • 13. SELECTING WITH IF STATEMENTS: • The IF statement is a decision- making statement that guides a program to make decisions based on specified criteria • The Nested if statement allows you to create a chain of if statements. The if statements are evaluated in order until one of the if expressions is true or the end of the if chain is reached. If the end of the chain is reached without a true expression no code blocks are executed.
  • 14. ITERATION (LOOPS) : • Indefinite Loop : A loop where it is not easy to know amount of execution required. • Definite Loops : A loop that executes a known number of times. This type of loop can be executed using while statements This type of loop can be executed using for statements Nested for Loop : The inner loop will finish all of it’s iterations before finishing one iteration of the ‘ outer loop’