CS1110 Today: collections.

Slides:



Advertisements
Similar presentations
Chapter 6 Lists and Dictionaries CSC1310 Fall 2009.
Advertisements

Python Mini-Course University of Oklahoma Department of Psychology Day 4 – Lesson 15 Tuples 5/02/09 Python Mini-Course: Day 4 – Lesson 15 1.
String and Lists Dr. Benito Mendoza. 2 Outline What is a string String operations Traversing strings String slices What is a list Traversing a list List.
Arrays  Writing a program that uses a large amount of information.  Such as a list of 100 elements.  It is not practical to declare.
Computer Science 111 Fundamentals of Programming I Sequences: Strings.
Guide to Programming with Python
Lilian Blot CORE ELEMENTS COLLECTIONS & REPETITION Lecture 4 Autumn 2014 TPOP 1.
October 4, 2005ICP: Chapter 4: For Loops, Strings, and Tuples 1 Introduction to Computer Programming Chapter 4: For Loops, Strings, and Tuples Michael.
Built-in Data Structures in Python An Introduction.
Introduction to Strings Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg 1.
By Austin Laudenslager AN INTRODUCTION TO PYTHON.
Introduction to Strings CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Python Mini-Course University of Oklahoma Department of Psychology Day 3 – Lesson 11 Using strings and sequences 5/02/09 Python Mini-Course: Day 3 – Lesson.
Sequences CMSC 120: Visualizing Information 2/26/08.
Lists vs Strings CMSC 201. Overview Python strings and lists are similar but different. Similar: syntax, access mechanisms, operators Different: Strings.
AOIT Introduction to Programming Unit 3, Lesson 9 Sequences—Lists and Tuples Copyright © 2009–2012 National Academy Foundation. All rights reserved.
String and Lists Dr. José M. Reyes Álamo. 2 Outline What is a string String operations Traversing strings String slices What is a list Traversing a list.
Guide to Programming with Python Chapter Four Strings, and Tuples; for Loops: The Word Jumble Game.
CMSC201 Computer Science I for Majors Lecture 08 – Lists
String and Lists Dr. José M. Reyes Álamo.
Topic: Python Lists – Part 1
Tuples and Lists.
When to use Tuples instead of Lists
Chapter 4 Strings & Tuples
String Processing Upsorn Praphamontripong CS 1110
CMPT 120 Topic: Python strings.
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Text Pages
Collection: Lists Computers and Programming Chaiporn Jaikaeo
Lists Part 1 Taken from notes by Dr. Neil Moore & Dr. Debby Keen
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Introduction to Strings
Introduction to Strings
Lists in Python.
CHAPTER THREE Sequences.
Data types Numeric types Sequence types float int bool list str
Nate Brunelle Today: Repetition, Repetition
Announcements 3rd homework is due this week Wednesday (March 15)
Nate Brunelle Today: Slicing, Debugging, Style
Thinking about Strings
Intro to Computer Science CS1510 Dr. Sarah Diesburg
CS 1111 Introduction to Programming Fall 2018
CEV208 Computer Programming
String and Lists Dr. José M. Reyes Álamo.
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Introduction to Strings
Nate Brunelle Today: Dictionaries
LING 408/508: Computational Techniques for Linguists
Intro to Computer Science CS1510 Dr. Sarah Diesburg
CS 1111 Introduction to Programming Spring 2019
CS 1111 Introduction to Programming Spring 2019
Text Pages
Nate Brunelle Today: Strings, Type Casting
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Intro to Computer Science CS1510 Dr. Sarah Diesburg
CISC101 Reminders Assignment 2 due today.
CS150 Introduction to Computer Science 1
Introduction to Strings
Sequences Sequences are collections of data values that are ordered by position A string is a sequence of characters A list is a sequence of any Python.
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Gavin Restifo March 1, 2019 Today: Repetition Part 2 - For Loops
Nate Brunelle Today: Style, Collections
Nate Brunelle Today: Strings, Type Casting
Introduction to Strings
Course A201: Introduction to Programming
Intro to Computer Science CS1510 Dr. Sarah Diesburg
More Basics of Python Common types of data we will work with
CMPT 120 Lecture 10 – Unit 2 – Cryptography and Encryption –
CMPT 120 Topic: Python strings.
Presentation transcript:

CS1110 Today: collections

Let’s grade all the students Repetition Groups of students String is one example of a group Contain several characters Today: various types that collect several things in one variable

Ordered Collection Type that has other things inside it Ordered: a first thing, second, third, … Sequence

Ordered Collections Type Stores Syntax Mutable? Range int range(3, 7) No Str character “” Tuple anything ( , , ) List [ , , ] Yes

Operations on Sequences Syntax Range? Str? Tuple? List? length len(s) Yes yes index s[1] slice s[1:3] concatenate s1 + s2 no multiply s*4 assignment s[1] = 5 No Yes (mutable)