ENGR 102: Programming Concepts, Variables, and Sequential Steps

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
full-widthPodcast
1
Card Sorting

1/45

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering foundational computer programming concepts, memory layout, Python syntax, assignment operators, and mathematical functions from Lectures 1 and 2.

Last updated 3:51 AM on 8/31/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

46 Terms

1
New cards

not


2
New cards

Program

A file containing programming language text (such as a .py file) that provides commands and instructions for a computer to follow.

3
New cards

Compiler

A tool that translates an entire computer program into machine instructions at once, creating optimal instructions that are typically saved to a file.

4
New cards

Interpreter

A tool that translates program code line by line, executing instructions immediately as it interprets without saving an intermediate file.

5
New cards

Integrated Development Environment (IDE)

A code editor tied together with a compiler, interpreter, and debuggers to help write, manage, and execute programs (such as VS Code).

6
New cards

Assembly language

A low-level programming language that provides a direct text mapping to binary machine instructions, making it slightly easier to read than binary.

7
New cards

Python

An easy-to-learn, powerful, and flexible programming language named after the British comedy troupe Monty Python.

8
New cards

SymPy

A Python library used in MATH 151 for analytical equation solving that is explicitly prohibited from use in ENGR 102.

9
New cards

Comments

Text in program code beginning with a # character that is ignored by the computer and used to explain logic to human readers.

10
New cards

Floor Division Operator (//)

A built-in Python arithmetic operator that performs division and truncates the remainder

11
New cards

Modulus Operator (%)

A built-in Python arithmetic operator that returns the remainder from division (for example, 7%3=17 \% 3 = 1).

12
New cards

Power Operator (**)

A built-in Python arithmetic operator used for exponentiation (for example, 210=10242 ** 10 = 1024).

13
New cards

from math import *

A statement placed at the top of a Python program to grant access to standard mathematical functions such as x\sqrt{x}, sin(x)\sin(x), and cos(x)\cos(x).

14
New cards

Main Memory

The middle tier of computer memory hierarchy, conceptualized as a series of boxes holding information while a program runs.

15
New cards

Variable

A named box of main memory that holds a single unit of information, such as a number or string.

16
New cards

Variable Name

A label used to refer to a specific variable in memory, which must start with a letter or underscore and cannot be a reserved keyword.

17
New cards

Python Keywords

A specific set of 3535 reserved commands in Python (such as False, True, None, def, if, and while) that cannot be used as variable names.

18
New cards

Assignment

The process of storing a value into a variable memory box, which overwrites any previous value contained inside that box.

19
New cards

Assignment Operator (=)

An operator in Python that first evaluates the right-hand side expression and then stores the resulting value in the left-hand variable.

20
New cards

Pseudocode

A flexible, precise way to outline problem-solving steps using natural language (English) structured as an action-oriented bulleted list rather than programming code.

21
New cards

Instruction Pointer

A conceptual marker that keeps track of the next instruction scheduled to be executed in a sequential program.

22
New cards

Special Assignment Operators

Shortcut operators such as +=, -=, *=, and /= that perform an arithmetic operation and assign the result in one step (for example, x+=cx += c represents x=x+cx = x + c).

23
New cards

Console

A window or screen interface that displays text output generated by a running computer program.

24
New cards

print()

A Python function used to display literals, variables, or computed expressions to the console.

25
New cards

Variable x = 10; print(x + 5)

The output of the code will be 15, as the operation adds 5 to the variable x which holds the value 10.

26
New cards

y = 7; z = 3; print(y * z)

The output of the code will be 21, as the operation multiplies variable y (7) by variable z (3).

27
New cards

a = 15; b = 4; print(a // b)

The output of the code will be 3, as the floor division operator (//) divides 15 by 4 and truncates the remainder.

28
New cards

result = 8; result += 2; print(result)

The output of the code will be 10, as the shorthand assignment operator += adds 2 to the result variable, which initially is 8.

29
New cards

num = 12; print(num % 5)

The output of the code will be 2, as the modulus operator (%) returns the remainder of 12 divided by 5.

30
New cards

x = 2; print(x ** 3)

The output of the code will be 8, as the power operator (**) raises 2 to the power of 3.

31
New cards

x = 10; y = 5; z = x * y - 4; print(z)

The output of the code will be 46, as it multiplies x (10) by y (5) to get 50, then subtracts 4.

32
New cards

a = 12; b = 3; c = a - b * 2; print(c)

The output of the code will be 6, as it multiplies b (3) by 2 to get 6, and then subtracts that from a (12).

33
New cards

result = 20; result *= 2 - 5; print(result)

The output of the code will be -60, as it resolves the operation in parentheses first (2 - 5 = -3) and then multiplies result (20) by -3.

34
New cards

num1 = 30; num2 = 10; output = num1 - num2 * 3; print(output)

The output of the code will be 0, as it multiplies num2 (10) by 3 to get 30, then subtracts that from num1 (30).

35
New cards

x = 7; y = 2; z = (x - 3) * y; print(z)

The output of the code will be 8, as it first subtracts 3 from x (7) to get 4, then multiplies by y (2).

36
New cards

val1 = 45; val2 = 10; total = val1 - (val2 * 2); print(total)

The output of the code will be 25, as it first multiplies val2 (10) by 2 to get 20, then subtracts that from val1 (45).

37
New cards

Valid Variable Name Example: my_variable

This name is valid because it starts with a letter, includes letters and underscores, and does not use any reserved keywords.

38
New cards

Invalid Variable Name Example: 2nd_value

This name is invalid because it starts with a number, which is not allowed in Python variable naming conventions.

39
New cards

Valid Variable Name Example: _value

This name is valid because it starts with an underscore and contains only valid characters.

40
New cards

Invalid Variable Name Example: class

This name is invalid as it is a reserved keyword in Python and cannot be used as a variable name.

41
New cards

Valid Variable Name Example: total_sum

This name is valid because it consists of lowercase letters, includes an underscore, and does not use any reserved keywords.

42
New cards

Invalid Variable Name Example: return_value

This name is invalid because it is a reserved keyword in Python and cannot be used as a variable name.

43
New cards

Radians to Degrees Conversion Formula

To convert radians to degrees, multiply by 180π\frac{180}{\pi}. For example, if you have an angle measured in radians as π4\frac{\pi}{4}, the conversion to degrees is π4×180π=45\frac{\pi}{4} \times \frac{180}{\pi} = 45 degrees.

44
New cards

Degrees to Radians Conversion Formula

To convert degrees to radians, multiply by π180\frac{\pi}{180}. For example, if you have an angle measured in degrees as 90 degrees, the conversion to radians is 90×π180=π290 \times \frac{\pi}{180} = \frac{\pi}{2} radians.

45
New cards

Python Function: Convert Degrees to Radians

You can create a Python function to convert degrees to radians as follows:

import math
def degrees_to_radians(degrees):
    return degrees * (math.pi / 180)


46
New cards

Python Function: Convert Radians to Degrees

You can create a Python function to convert radians to degrees as follows:

import math
def radians_to_degrees(radians):
    return radians * (180 / math.pi)