CMPT 120 Lecture Notes - Lecture 4: Concatenation, Boolean Expression

20 views3 pages
meghan78 and 39786 others unlocked
CMPT 120 Full Course Notes
29
CMPT 120 Full Course Notes
Verified Note
29 documents

Document Summary

Chatbots: a program that processes conversations (in text or speech. ) Input(): allows the user to provide a prompt string. User = input () user is basically the label of input. The name of the label can be anything. Variable: a name that refers to a value. Can contain letters, numbers, and underscores (should start with a letter, by convention we use lowercase) Cannot contain spaces or symbols such as !, $, #, $. Cannot be one of the reserved keywords such as print. In code, we use user as a name referring to the value entered by the user of the program. Adding more features such as greetings or a question. Comment = [] : allows you to put many comments that can be used to reply back. Import means to tell the program to grab something. A dot is calling a function that is predefined. The process of combining two strings is called string concatenation.

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