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
Enumeration Guide
Updated 290d ago
0.0(0)
note
Chapter 4: State of Conciousness
Updated 1061d ago
0.0(0)
note
DNA Replication
Updated 1298d ago
0.0(0)
note
ap bio unit 4
Updated 469d ago
0.0(0)
note
Enumeration Guide
Updated 290d ago
0.0(0)
note
Chapter 4: State of Conciousness
Updated 1061d ago
0.0(0)
note
DNA Replication
Updated 1298d ago
0.0(0)
note
ap bio unit 4
Updated 469d ago
0.0(0)

Explore top flashcards

flashcards
Apparato tegumentario (wip)
48
Updated 252d ago
0.0(0)
flashcards
Unit 2 IB HL Biology
119
Updated 874d ago
0.0(0)
flashcards
Periodic Table of Elements
118
Updated 902d ago
0.0(0)
flashcards
Week 2: Socialization
38
Updated 539d ago
0.0(0)
flashcards
History exam pt. 2
80
Updated 1021d ago
0.0(0)
flashcards
Anatomy
41
Updated 413d ago
0.0(0)
flashcards
WHAP Unit 5 Pt. 2 Vocab
20
Updated 777d ago
0.0(0)
flashcards
Apparato tegumentario (wip)
48
Updated 252d ago
0.0(0)
flashcards
Unit 2 IB HL Biology
119
Updated 874d ago
0.0(0)
flashcards
Periodic Table of Elements
118
Updated 902d ago
0.0(0)
flashcards
Week 2: Socialization
38
Updated 539d ago
0.0(0)
flashcards
History exam pt. 2
80
Updated 1021d ago
0.0(0)
flashcards
Anatomy
41
Updated 413d ago
0.0(0)
flashcards
WHAP Unit 5 Pt. 2 Vocab
20
Updated 777d ago
0.0(0)