COMP 1005 Lecture Notes - Lecture 3: Reserved Word

18 views4 pages

Document Summary

There are certain vocabularies that are reserved and understood by python, these are called reserved words. You can not name a variable a reserved word. If you do, a syntax error is reported. On the other hand, you may choose vocabularies other than the reserved words. In python shell prompt, type: import keyword keyword. kwlist. Get data from the outside world , such as file, sensors, or user data. Display the results of the program on a screen or store them in a file. Perform statements one after another in the order they are encountered in the script. Check for certain conditions and then execute or skip a sequence of statements. I can put the condition x > 50 and say if x > 50, that"s a pass. We can use this in a loop because the loop can be executed until the condition is met.

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