CAS CS 111 Lecture 2: Lecture 2

119 views2 pages
cherryberry1035 and 38883 others unlocked
CAS CS 111 Full Course Notes
48
CAS CS 111 Full Course Notes
Verified Note
48 documents

Document Summary

What is the output of the following program: picobot x float. Trace question step through each variable: this is a skill that must be perfected, for example: this is the function posted on the powerpoint slides for this lecture, x, 5, 9, 9, 11 y. Assignment statements/reassignment: you can write over any variable, but any other variable that is a function of the other variable stays the same. The time at which we give a value to a variable matters. Negative indices: count from the end instead of the beginning starting from -1 at the end of the string. Skip slicing: s[0:8:2] start at index 0, stop just before 8, go 2 characters at a time. When you do a slice operation on a list, you get a list back as the data type. If you just print an index, you will get back an int, float, etc.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents