String Manipulation.

Slides:



Advertisements
Similar presentations
Procedures and Functions. What are they? They are both blocks of code that can be reused to perform specific task. However there is a difference: Function-
Advertisements

Data Structures Introduction. What is data? (Latin) Plural of datum = something given.
Manipulating Strings.
Python By: Hannah Segobiano. What is Python? Python is a type of coding or its a type of programming language.
Manipulating Text In today’s lesson we will look at: why we might want to pick out parts of text strings some BASIC functions that can be used to chop.
Examples of comparing strings. “ABC” = “ABC”? yes “ABC” = “ ABC”? No! note the space up front “ABC” = “abc” ? No! Totally different letters “ABC” = “ABCD”?
With Python.  One of the most useful abilities of programming is the ability to manipulate files.  Python’s operations for file management are relatively.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 8: Fun with strings.
Lecture 6 C++ Programming Arne Kutzner Hanyang University / Seoul Korea.
Working with Strings. String Structure A string in VBA can be variable length and has an internal structure Each character in the string has a position.
COMPE 111 Introduction to Computer Engineering Programming in Python Atılım University
Pointers 1. Introduction Declaring pointer variables Pointer operators Pointer arithmetic 2 Topics to be Covered.
PYTHON PROGRAMMING Week 3 - Tuesday. STARTER Hour of Code Video.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 3: Built-in functions.
File Processing CMSC 120: Visualizing Information Lecture 4/15/08.
GCSE COMPUTER SCIENCE Practical Programming using Python
Topic: Python Lists – Part 1
String Methods Programming Guides.
Algorithmic complexity: Speed of algorithms
Lesson 05: Iterations Class Chat: Attendance: Participation
CMPT 120 Topic: Python strings.
Functions.
Extended Registration KS3
CHAPTER 7 STRINGS.
Simple Java I/O part I Using scanner 8-Nov-18.
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Decision Structures, String Comparison, Nested Structures
Python 17 Mr. Husch.
Decision Structures, String Comparison, Nested Structures
Lists in Python.
Manipulating Text In today’s lesson we will look at:
Strings.
Exercise 11.1 Write a code fragment that performs the same function as the statement below without using the crash method Toolbox.crash(amount < 0,
Teaching London Computing
Strings and Lists – the split method
Learning 5x Table.
Winter 2018 CISC101 12/5/2018 CISC101 Reminders
Comparing Strings – How to
CEV208 Computer Programming
String and Lists Dr. José M. Reyes Álamo.
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Algorithmic complexity: Speed of algorithms
Python 17 Mr. Husch.
Зан ба насанд хүрэх Character and adult
Reference semantics, variables and names
Microsoft Visual Basic 2005: Reloaded Second Edition
Algorithmic complexity: Speed of algorithms
Appending or adding to a file using python
Comparing floating point numbers
CS2911 Week 2, Class 3 Today Return Lab 2 and Quiz 1
Introduction to Computer Science
Python Programming Mr Scicluna.
Just Basic Lessons 9 Mr. Kalmes.
By Himanshi dixit 11th ’B’
Negative Numbers.
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Python Inputs Mr. Husch.
Creating Maintainable code
Python 4 and 5 Mr. Husch.
Nate Brunelle Today: Style, Collections
More on recursion Last time we went through a workshop on recursive functions. Let’s look at some of the problems together.
More Basics of Python Common types of data we will work with
CMPT 120 Lecture 10 – Unit 2 – Cryptography and Encryption –
CMPT 120 Lecture 9 – Unit 2 – Cryptography and Encryption –
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Creating readable code
CMPT 120 Topic: Python strings.
Python Classes In Pune.
Challenge Guide Grade Code Type Slides
Presentation transcript:

String Manipulation

The len method counts the number of characters in a string. String Manipulation Python has lots of built in methods that allow us to easily manipulate strings. The len method counts the number of characters in a string. Try it for yourself:

Explain what the code does: Example Method 1 Try this code: Explain what the code does:

Explain what the code does: Example Method 2 Try this code: Explain what the code does:

Explain what the code does: Example Method 3 Try this code: Explain what the code does:

Explain what the code does: Example Method 4 Try this code: Explain what the code does:

Explain what the code does: Example Method 5 Try this code: Explain what the code does:

Explain what the code does: Example Method 6 Try this code: Explain what the code does: