Unit 2 Terms: Introductory Python Vocabulary

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

conditional statement

a set of rules that executes code if certain conditions are met

statement

a single line of instruction that Python can execute, either in the compiler or the interpreter

computational artifact

an object created by a human being that involves the use of computer technology

code editor

in Repl.it, this is the white space where code is written with line numbers

console window

in Repl.it, this is where code is outputted from a program

int

the keyword used for the native data type in Python that can only store integer data

str

the keyword used for the native data type in Python that can store characters, letters and numbers from the keyboard

float

the keyword used for the native data type in Python that can store decimal data

boolean

the keyword used for the native data type in Python that is either True or False

global variable

the term used for data that is accessible throughout an entire program, including code blocks

local variable

the term used for data that is only accessible within a code block

parameter variable

the term used for data that will be the input to a function

function call

the term used for executing a code block that's been defined in a function

return value

the term used for the data that represents the output to a function

variable scope

the term used to describe the accessibility of a variable within a program.

assignment

the word used for when you give a variable a value

libraries & modules

these can be imported into your program so that you can access code that other people have written

single-line comment

this allows you to write plain English into your code by using a hashtag

multi-line comment

this allows you to write plain English into your code by using a set of three apostrophes wrapped around the text you are writing

input()

this built-in Python function allows us to accept user's input from a keyboard

float()

this built-in Python function allows us to convert data into floating-point data

code block

this consists of one or more statements that have been grouped together in a program. Python uses indentation for this!

syntax error

this describes a problem you encounter when characters in your Python code are not correctly placed

function header

this describes the line of code that allows you to define a function, give the function a name, and specify its parameter variables

program flow

this is a general term that describes the order in which your lines of code are executed

import statement

this is required when you want to use a module or library that is not built-into the Python language. We need this when using the math module!

def

this is the Python keyword used to define a function

if

this is the most commonly used keyword for creating a conditional statement that will determine the flow of a program. It is sometimes followed by an "else," or some "elif"s then an "else"

conditional statement

this is used for representing an "if-then" in a program, where the program executes a code block if a condition is determined to be true

indentation

this is what Python uses to determine the lines of code that will execute in a function's definition, or after a conditional statement

else

this keyword always follows an "if" or an "elif" in a program and represents the final outcome that will occur within a set of possible outcomes in a program

elif

this keyword always sits between an "if" and an "else", and is used when we have more than two outcomes with a set of possible conditions

:

we use this symbol at the end of a function header or a conditional statement


Set pelajaran terkait

Com Theory - Social Comparison Theory

View Set

Dissection of the Crayfish Analysis Questions

View Set

Physics Unit 7 & 8 Concept Quizzes

View Set

Assessment: Core 1 Simulation Exam

View Set