CSCA20H3 Lecture Notes - Carriage Return, Newline

169 views1 pages
School
Course

Document Summary

For the index 3 (inclusive) to the index - Range (0,6) means a group of numbers and the numbers are 0, 1, Range is similar to list, we will cover in the next worksheet. Print ( the maximum of the three grades (%d, %d and %d) is %d %(a1, a2, a3, max(a1, a2, a3))) A string on the lhs and a bunch of things on the rhs. %d is a place holder for a decimal (10 digits) integer. %d display the object as a decimal integer. %s display the object as a string. S. replace( 20 , 48 ) -> replace 20 by 48 . S. count( i ) -> count the occurrences of letter i in string s . S. find( is ) -> find the first occurrence of is in string s . S. find( is , 4) -> find the first occurrence of is in string s after the index 4. + is overloaded, means more than one function.

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