Programming

0.0(0)
studied byStudied by 12 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/29

Last updated 6:02 AM on 3/13/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

30 Terms

1
New cards

Programming

  • Telling a computer what to do

  • Giving the computer instructions to carry out

2
New cards

Syntax for print

  • print(‘Text’)

  • print(“Text”)

Starts in single: must end in single

Starts in double: must end in double

3
New cards

Types of errors

  • Syntax

  • Logical

  • Runtime

4
New cards

Syntax Errors

  • Errors in how the code is written

  • Doesn't adhere to the rules

5
New cards

Logical Errors

  • Also called semantic errors

  • Does not output what was intended

  • Error in calculation/process

6
New cards

Runtime

  • Cause the program to terminate

  • Examples

    • dividing by 0

    • Infinite loop

    • Incorrect input by the user

7
New cards

Variable

A value that is given a name and can be changed

8
New cards

String

A piece of text

9
New cards

An integer

A whole number

10
New cards

Floating-Point Number

A number with a decimal point

11
New cards

Syntax for input

Name=input(“Prompt”)

12
New cards

Syntax for integer input

Integer=int(input(“Prompt”))

13
New cards

Arithmetic Operation Syntax

answer=num1+num2

14
New cards

To perform a math operation, convert input into

int() or float()

15
New cards

Input

Read from the keyboard

16
New cards

Print

Display to the screen

17
New cards

If

Check a condition to see which operations to perform

18
New cards

=

Assign a value to a variable

19
New cards

While

Perform actions repeatedly

20
New cards

Syntax for Lists

List_name = [“item1”, “item2”, “item3”]

21
New cards

Lists

A type of data structure

22
New cards

Data Structure

Data structures are organised collections of data

23
New cards

Data is organised in ___________________

A sequence, with each item having a unique index

24
New cards

Index

Tells you the position of each item in a list

25
New cards

IndexError

This occurs when an index number that doesn't exist gets called

26
New cards

Position

Index + 1

27
New cards

Syntax to find number of items on a list

len(name of list)

28
New cards

Syntax to find the index of a list item

number = listname.index(“object”)

29
New cards

Iterative Structure

  • Used when a program needs to repeat a block of code

  • Needed when a program needs to repeat actions

30
New cards

While Loop

Repeats actions while a condition is true

Explore top notes

note
AP Human Geography
Updated 83d ago
0.0(0)
note
APUSH 2.2 European Colonization
Updated 1110d ago
0.0(0)
note
Civil Liberties
Updated 1253d ago
0.0(0)
note
Riñón
Updated 1183d ago
0.0(0)
note
Chapter 24- Speciation
Updated 1161d ago
0.0(0)
note
AP Human Geography
Updated 83d ago
0.0(0)
note
APUSH 2.2 European Colonization
Updated 1110d ago
0.0(0)
note
Civil Liberties
Updated 1253d ago
0.0(0)
note
Riñón
Updated 1183d ago
0.0(0)
note
Chapter 24- Speciation
Updated 1161d ago
0.0(0)

Explore top flashcards

flashcards
Consumer Behavior exam 1
124
Updated 738d ago
0.0(0)
flashcards
Pre-Lab Quiz 10
35
Updated 1201d ago
0.0(0)
flashcards
Books and films in our life
119
Updated 161d ago
0.0(0)
flashcards
Oceania
32
Updated 399d ago
0.0(0)
flashcards
Musculoskeletal System
123
Updated 511d ago
0.0(0)
flashcards
med term final
141
Updated 1022d ago
0.0(0)
flashcards
SJSU Gov Final
234
Updated 78d ago
0.0(0)
flashcards
토픽 읽기 제2회 핫토픽
66
Updated 995d ago
0.0(0)
flashcards
Consumer Behavior exam 1
124
Updated 738d ago
0.0(0)
flashcards
Pre-Lab Quiz 10
35
Updated 1201d ago
0.0(0)
flashcards
Books and films in our life
119
Updated 161d ago
0.0(0)
flashcards
Oceania
32
Updated 399d ago
0.0(0)
flashcards
Musculoskeletal System
123
Updated 511d ago
0.0(0)
flashcards
med term final
141
Updated 1022d ago
0.0(0)
flashcards
SJSU Gov Final
234
Updated 78d ago
0.0(0)
flashcards
토픽 읽기 제2회 핫토픽
66
Updated 995d ago
0.0(0)