Computer Science 1026A/B Study Guide - Final Guide: Newline, Substring, Dont

136 views8 pages
terubarenuka and 39895 others unlocked
COMPSCI 1026A/B Full Course Notes
26
COMPSCI 1026A/B Full Course Notes
Verified Note
26 documents

Document Summary

Computer science fundamentals i lecture notes - cs1026. Put \ n after each desired line (e. g. print( *\n**\n*** ): character values, ord( character ) gives you the value associated with the character, chr(integer) gives you the character associated with the number/code. If a substring is in a string: if substring in string : If string. endswith( subtring : true if string ends with substring. Computer science fundamentals i lecture notes - cs1026: returns a count of substring occurrences in string. If string. isspace(: true if string is only spaces with at least one character. If string. isupper(: true if all letters are uppercase for loops, for letter in stringname: print(letter) ^^^^ prints each letter: for i in range (1,10): print(i) ^^^^ prints 1 to 9: for i in range (10, 1, -1): adds step value as third argument. ^^^^ prints 10 through 2 decreasing by 1: for i in range (10):

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

Related Documents