CS2911 Week 2, Class 3 Today Return Lab 2 and Quiz 1

Slides:



Advertisements
Similar presentations
Chapter 3 Representing Numbers and Text in Binary Information Technology in Theory By Pelin Aksoy and Laura DeNardis.
Advertisements

Data Representation Prepared by Dr P Marais (Modified by D Burford)
CS2852 Week 8, Class 2 Today Tree terminology Non-Binary and Non-Search Trees Tree Traversals (Remaining slides not yet shown) Tomorrow: Quiz Implementing.
Working with text ASCII and UNICODE.   
The string data type String. String (in general) A string is a sequence of characters enclosed between the double quotes "..." Example: Each character.
SE-1021 Software Engineering II Week 8, Class 1 Return Exam Producing UML diagrams automatically in EA Poll Everywhere Files Tomorrow Week 6 HW due (if.
CS2910 Week 1, Class 2 Today Announce Prof. Michael Vieau’s S-341 6p Thurs Wk 2 Assignment for tomorrow Data Encoding, Part 1 Parsing Data Muddiest Point.
CS2910 Week 1, Class 1 Today Introductions Class/Lab Layout Safety Review - Note about Lab Safety Review Announce Prof. Michael Vieau’s S-341 6p Thurs.
CS2910 Week 2, Class 1 Today Data Encoding, Part 1 Parsing Data Python Muddiest Point Lab 2 – Bring text In Class, Thursday: Quiz Week 6, Monday: Midterm.
Java Programming, Second Edition Chapter Two Using Data Within a Program.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
CS2910 Week 2, Class 1 Today Return Lab 1 Muddiest Points Quiz Parsing Data in Python SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors:
CS2852 Week 7, Class 1 Today Binary Search Tree Implementing add Implementing find Return Quiz 4 (second attempt) Both sections are graded SE-2811 Slide.
CS2852 Week 6, Class 2 Today Class exercise: Implementing a recursive method Binary Search Trees Tomorrow: Quiz at start of lab Implementing a recursive.
CS2910 Week 4, Class 1 Today Encoding in Python – Review Quiz – Encoding in Python Introduction to HTTP SE-2811 Slide design: Dr. Mark L. Hornick Content:
CS2910 Week 7, Class 2 Today Quiz on encodings IMAP Encoding "Internet Messages" Tomorrow Office hour cancelled Monday Quiz on IMAP SE-2811 Slide design:
Week 7, Class 1: The Command Pattern (cont.) Get Ready for Poll Everywhere Labs 2 & 3 returned Lab 7 due this evening at 11pm Quiz tomorrow at start of.
CS2910 Week 4, Class 2 Today Sit by someone you have not yet worked with this quarter. Learn his/her name if unknown. Turn on your laptop and start Wireshark.
CS2910 Week 3, Class 1 Today What is a protocol? Using TCP in Python Defining methods in Python Long procedure design SE-2811 Slide design: Dr. Mark L.
CS2910 Week 8, Class 2 Today Return Quiz Look at Schedule TCP implementation! Week 8, Monday Quiz on SMTP May include some questions requiring you to interpret.
CS2910 Week 7, Class 1 Today Capturing SMTP with Thunderbird Tomorrow Extra office hour at 11 am (right after lab) Friday Office hour cancelled SE-2811.
CS2910 Week 5, Class 1 Today Sit by someone you have not yet worked with Turn on your laptop and start Wireshark. DNS Next week Monday: Midterm Exam SE-2811.
Winter 2016CISC101 - Prof. McLeod1 CISC101 Reminders Quiz 3 this week – last section on Friday. Assignment 4 is posted. Data mining: –Designing functions.
CS2910 Week 6, Lab Today Dictionaries in Python SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
CS2911 Week 6, Lab Today Quiz 3 Review Muddiest Point Finish Lab 6 Start Lab 7 Muddiest Point This week, Lab: Quiz at start of lab Week 7, Monday: Half-Exam.
CS2911 Week 3, Class 2 Today Return Lab 3 Afternoon section: Hand out Lab 4 Checklist Review Muddiest Point Questions on Lab 4? What is a protocol? The.
Topic: Binary Encoding – Part 1
Week 2 - Wednesday CS 121.
CS2911 Week 4, Class 3 Today Next Class: DNS – Domain Name Service
Slide design: Dr. Mark L. Hornick
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
CS2911 Week 6, Class 1 Today Map (dict) objects in Python
SE-1021 Software Engineering II
EPSII 59:006 Spring 2004.
CS2911 Week 6, Class 1 Today This week, Lab: Quiz at start of lab
Slide design: Dr. Mark L. Hornick
Slide design: Dr. Mark L. Hornick
CS2911 Week 6, Class 1 Today Map (dict) objects in Python
FATİH SULTAN MEHMET VAKIF UNIVERSITY Faculty of Engineering & Architecture Computer Engineering Department MAT217E - DİSCRETE STRUCTURES Slides for a.
CS2911 Week 4, Class 2 Today Next Thursday:
Coding Schemes and Number Systems
Chapter 1 Data Storage.
Strings, Line-by-line I/O, Functions, Call-by-Reference, Call-by-Value
Winter 2018 CISC101 11/16/2018 CISC101 Reminders
Lecture 8b: Strings BJ Furman 15OCT2012.
Slide design: Dr. Mark L. Hornick
Chapter 7 Files and Exceptions
SE-1021 Software Engineering II
Winter 2018 CISC101 12/1/2018 CISC101 Reminders
CS150 Introduction to Computer Science 1
Plan Attendance Files Posted on Campus Cruiser Homework Reminder
Encoding and Sending Formatted Text
Digital Encodings.
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
functions: argument, return value
CS2911 Week 5, Class 3 Today Week 6, Lab: Quiz at start of lab
Comp Org & Assembly Lang
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
SE-1021 Software Engineering II
Slide design: Dr. Mark L. Hornick
Slide design: Dr. Mark L. Hornick
CS2911 Week 6, Class 1 Today Map (dict) objects in Python
CS2911 Week 3, Class 3 (And wk4-c1)
CS2911 Week 3, Lab Today Thursday Friday Review Muddiest Point Lab 3
Slide design: Dr. Mark L. Hornick
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
WJEC GCSE Computer Science
Slide design: Dr. Mark L. Hornick
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
CS2911 Week 5, Class 3 Today Next Class: DNS – Domain Name Service
Presentation transcript:

CS2911 Week 2, Class 3 Today Return Lab 2 and Quiz 1 29 April 2019 CS2911 Week 2, Class 3 Today Return Lab 2 and Quiz 1 Review Muddiest Point Questions on Lab 3? Encoding in Python Muddiest Point 17q1 2-3 1,2,5-14 17q1 v (started 1_1) Recall the raw representations of the ASCII characters '\r' (CR) and '\n' (LF) v(started 1_1) Recall the raw representations of the ASCII characters A, B, C, D, E, a, b, c, d, e, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 v(started 1_2) Convert a many-digit binary number to its big-endian and little-endian formats v(started 1_2) Give examples of common systems using the big-endian and little-endian formats v Describe the difference between a compiled an an interpreted language v Write a list literal in Python v Write a tuple literal in Python v Index into a tuple or list in Python v Describe the difference between lists and tuples   v Write if-statements in Python v Write a counting (for) loop in Python v Write a sentinel-value (while) loop in Python Write code that manipulates raw bytes in Python using ord(), chr(), int.from_bytes(), and i.to_bytes() Write code that interprets and formats strings using str() and int() (Write exceptions in Python) Declare a Python method Write a string literal in Python Write a bytes literal in Python CS2911 Dr. Yoder Dr. Josiah Yoder

Muddiest Point 2-1 and Lab 2 CS2911 29 April 2019 Muddiest Point 2-1 and Lab 2 So, how does something like '\x52' work again? 'x52' Will the given message in the lab be in bytes or words? Lab 3 format Dr. Josiah Yoder

Questions about Lab 3? Design process How to implement in Python? CS2911 29 April 2019 Questions about Lab 3? Design process How to implement in Python? Protocol definition … Dr. Josiah Yoder

Exercise: Brainstorm steps (large or small) needed to complete Lab 3 CS2911 29 April 2019 Exercise: Brainstorm steps (large or small) needed to complete Lab 3 Last class: Slide 6 Dr. Josiah Yoder

Different ways to store an integer in Python CS2911 29 April 2019 Different ways to store an integer in Python int 123 integer (any size) str '123' Unicode string bytes b'123' bytes holding ASCII string bytes b'\x00{' bytes holding raw binary Dr. Josiah Yoder

Different ways to store a character in Python CS2911 29 April 2019 Different ways to store a character in Python int 0x41 ASCII code-point str 'A' Unicode string bytes b'A' bytes holding ASCII character Or a string… int (not usually used) str 'Hi!' Unicode string bytes b'Hi!' bytes holding ASCII string Dr. Josiah Yoder

CS2910 29 April 2019 Question Why might int(…) and format(…) be less efficient than the others for creating a raw encoding? Why are int(…) and chr(…) less natural? Dr. Josiah Yoder

CS2910 4/29/2019 Exercise Create the bytes object b'ABC' by using literal hexadecimal byte encoding b'\x______ Choose a number from 1 to 20. Write all the bits of this number when stored in an int in Python. SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2910 4/29/2019 Exercise Create a striped sequence of bytes 11111111 11100111 Create the integer stored (in Python) as 1111111111100111 Create the byte array 11111111 11100111 11100111 11111111 Create the integer SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2910 4/29/2019 Exercise Create a striped sequence of bytes 10101010 11001100 Create the integer stored (in Python) as 1100110010101010 Create the byte array 11001100 11001100 10101010 10101010 Create the integer SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2910 4/29/2019 Exercise Write the number 512 as a binary number (by hand) Write how this number will be stored in binary as a python int Write the bits used to store the result of (512).to_bytes(4,"big") SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2910 4/29/2019 Exercise Explain why you do not want to use int, str, or .format for manipulating bits and bytes in Python Write what will be displayed by print(chr(0x32)+chr(0x30)+chr(0x31)+chr(0x36) +chr(0x20)+chr(0x41)+chr(0x44)) SE-2811 Dr.Yoder Dr. Josiah Yoder

Challenges (purely optional) CS2910 4/29/2019 Challenges (purely optional) Explore the operators <<, >>, &, and I in Python. SE-2811 Dr.Yoder Dr. Josiah Yoder

Create a primes string (purely optional) CS2910 4/29/2019 Create a primes string (purely optional) …1111111111111111100000000000001111111111100000001111100011 (Why is this a "primes" string?) SE-2811 Dr.Yoder Dr. Josiah Yoder

https://www.polleverywhere.com/free_text_polls/zIp2tH2IVWjXv4H CS2910 29 April 2019 What was the muddiest point? Dr. Josiah Yoder

Exercise: Work on Lab 3 Write method headers with documentation CS2911 29 April 2019 Exercise: Work on Lab 3 Write method headers with documentation Decide who will write each method Try to figure out what the "hard" parts will be Dr. Josiah Yoder

Python byte lists and strings CS2910 29 April 2019 Python byte lists and strings Python 2.7 Python 3.x str bytearray unicode bytes # ASCII string, array of bytes bytearray # Mutable list of bytes str # Unicode string Dr. Josiah Yoder

CS2911 29 April 2019 Acknowledgement This course is based on the text Computer Networking: A Top Down Approach 7th edition Jim Kurose, Keith Ross Addison-Wesley Dr. Josiah Yoder