LING 111 Lecture 15: a8q2txt

53 views1 pages
8 Dec 2017
School
Department
Course
Professor

Document Summary

No. 1 mistake on first if statement the length of the phone number is 12, so the first if statement should be if len(number) != 12: No2 mistake on the for loop, it should be for in in [0,1,2,4,5,6,8,9,10] because there are number on those posisitions. Department of history" phonenumber 306. 966. 8712 (the phonebook mistake: the first if statement should be if isvalidphonenumber(number): else record[valid] = false. Error: returned false for department of computer science" phonenumber 306-966-4886 (the phone number has correct format) Error: returned false for phonenumber has dots instead of dashes) Error: returned false for department of psychology" phonenumber (306) 966-6657 (the phone number has charactors other than numbers and dashes) Error: returned false for department of history" phonenumber 306. 966. 8712 (cause the second if statement to be true)

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