CMPT 120 Study Guide - Final Guide: A Roads In Zone 8 Of The Great Britain Numbering Scheme, Infinite Loop, Eval

167 views3 pages
emeraldraccoon211 and 36995 others unlocked
CMPT 120 Full Course Notes
29
CMPT 120 Full Course Notes
Verified Note
29 documents

Document Summary

# do stuff if test is true elif: #for example, each item in alist, each character in a string,etc for x in range(10): #do stuff 10 times (0 through 9) for range in (5,10): = used for assigning values vars= 123 vars. isdigit()= true vars. isalpha()= false. #we use boolean expressions to control the flow of executions. # random from random import randint => randint(0,100) produces a random integer from 0~100. # . upper() changes to upper case letters. # . lower() changes to lower case letters. # . isalpha() determines whether a string is all alphabets or not, returns a boolean value. # . isdigit() determines whether a string (does not apply to int) consists of all numbers or not, returns a boolean value. # . rotate() rotates the values to the right. # break terminates the current loop and resumes execution at the next statement.

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