CS 1064 Study Guide - Final Guide: String Literal, For Loop, While Loop

39 views4 pages
Daniel T. Eisert CS-1064: Introduction to Programming in Python Page 1 of 4
Daniel T. Eisert EXAM: April 30, 2017
CS-1064: Introduction to Python 12:20 P.M.
Basic Terms
Function: a reusable chunk of code with inputs and outputs.
Variable: a name that can be associated with a value.
For loop: a control structure for performing actions on each element in a sequence.
If statement: a control structure for branching the execution of a program.
Dictionary: a data structure for mapping keys to values.
List: a data structure for storing elements in an ordered sequence.
~Literal: something that the parser recognizes as syntax for writing ab object directly (i.e. a specific number
or String); specific instances of data written directly in source code.
~Type: a categorization of values of similar kinds that determines what you can do with the values.
File: a sequence of data stored in your computer’s long-term memory.
String: a type that represents textual data.
Module: a collection of functions, classes, and variables available to be imported.
Program: a sequence of coded instructions that manipulate data inside a computer.
Types
Assume this code is run first:
ae = Ptho
grade = 100.0
[name] would return a list of strings.
[0][0] is a list.
10 == 10.0 returns true.
 == . returns false.
1 < 5.0 returns true.
Alaska < Delawae is true.
 +  ==  is false.
Assume this code is run first:
uote = I like tutles
 i uote returns false.
[1, 2, 3] < 5 is an error.
Keywords
- True/False/None
- and/is/or/not/pass
- def
- elif/if/else
- for/while
- import
- return
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows page 1 of the document.
Unlock all 4 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Function: a reusable chunk of code with inputs and outputs. Variable: a name that can be associated with a value. For loop: a control structure for performing actions on each element in a sequence. If statement: a control structure for branching the execution of a program. Dictionary: a data structure for mapping keys to values. List: a data structure for storing elements in an ordered sequence. ~literal: something that the parser recognizes as syntax for writing ab object directly (i. e. a specific number or string); specific instances of data written directly in source code. ~type: a categorization of values of similar kinds that determines what you can do with the values. File: a sequence of data stored in your computer"s long-term memory. Module: a collection of functions, classes, and variables available to be imported. Program: a sequence of coded instructions that manipulate data inside a computer. Assume this code is run first: (cid:374)a(cid:373)e = (cid:862)p(cid:455)tho(cid:374)(cid:863) grade = 100. 0.

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