MIS 304 Lecture Notes - Lecture 2: String Literal, Normal Mode, Data General

38 views3 pages

Document Summary

Runs previously executed statements in active memory. Scripted and finished . py files are run in the python interpreter. We use the print function to display output. Function: prewritten code that performs an operation. One can use both single quotes and double quotes inside the parentheses to print. Exception: (cid:449)he(cid:374) state(cid:373)e(cid:374)t has (cid:272)o(cid:374)t(cid:396)a(cid:272)tio(cid:374) (cid:894)(cid:858)(cid:895) use dou(cid:271)le (cid:395)uotes. String: a sequence of characters used as data. String literal: string that appears in the actual code of the program. The quotation marks indicate where the string literal begins and ends. Variables: allow us to store data in memory during program execution. Number is not the same as number. Ca(cid:374)(cid:859)t use o(cid:374)e of p(cid:455)tho(cid:374)(cid:859)s ke(cid:455)(cid:449)o(cid:396)ds as a (cid:448)a(cid:396)ia(cid:271)le (cid:374)a(cid:373)e (cid:894)e(cid:454): p(cid:396)i(cid:374)t(cid:895) Note: use _ to represent spaces in our class (ex: pay_rate) Creates a variable and references a piece of data. We can use variables to store string values. Explains how parts of a program work. Intended for people reading code, not the computer.

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