Computer science

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/39

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

40 Terms

1
New cards

Data type

A classification that specifies what kind of value a variable can hold

2
New cards

all data types used in Python

Integer, string, float, Boolean, list, tuple, dictionary

3
New cards

What is GUI?

Graphical User Interface- a visual way for people to interact with computers using icons, ect.

4
New cards

What is a widget?

A building block of the GUI, like a button or label that users can see or interact with

5
New cards

What is iteration and what are the loops in Python

Iteration is the repetition of code for, while

6
New cards

Sequence

These are the steps a program must follow to complete the task

7
New cards

Selection

if elif else- if it doesn't meet if criteria it moves onto elif, if it doesn't meet elif it goes to else

8
New cards

What is a function?

A block of code that performs a specific task and can be reused

9
New cards

three main constructs

Sequence, Selection, Iteration

10
New cards

What is tkinter

a library within Python

11
New cards

Library

Built-in code that has been pre-written and tested with specific functions. For example, random library and Tkinter library

12
New cards

Element

elements that we can use are text boxes, labels and buttons these are known collectively as widgets. A label that text has been added onto

13
New cards

Label

a label is a widget used for display only. The user cannot interact with it

14
New cards

Method

a prewritten function that belongs to an object: e.g. widgets: entry, labels, buttons ect

15
New cards

CLI

Command line interface- a text based interface where you can interact with the computer operating system

16
New cards

Entry

A small interaction that where the user can enter something

17
New cards

Function

A piece of code that carries out something. You can use it many times in one code

18
New cards

Button

A clickable button that you can click to interact with

19
New cards

Text

A bigger box for users to type multiple lines of text

20
New cards

Frame

A box or container that groups other widgets

21
New cards

String

Sequence of characters

22
New cards

integer

Numeric- whole number

23
New cards

float

Number- decimal

24
New cards

Boolean

True or false

25
New cards

tuples

Data type they can store strings, integers and other data. Unlike a variable they can store multiple pieces of data. The data stored cannot be changed. The first value is 0 uses normal brackets ()

26
New cards

list

Similar to tuple but can change. Items can be stored, updated, deleted or added uses square brackets []

27
New cards

Dictionaries

Similar data type however we supply our own indexes. In a dictionary an index is called a key uses curly brackets {}

28
New cards

For loop

A for loop is count controlled - e.g. "For 10 seconds I will jump up and down".The loop will continue until the count (e.g. 10 seconds) has finished.

for i in range(5):

print("This is a loop!")

29
New cards

While loop

A while loop is condition controlled - e.g. "While I am not out of breath, I will jump up and down."The loop will continue as long as the condition remains true.

30
New cards

Example of Selection

If age < 13 output child, else if > 13 and < 20 output teenager, else output adult

31
New cards

Subroutine/functions

These are smaller parts of a program that have a specific purpose

32
New cards

.get() method

The .get() method will allow user input to be sent to the program

First, I want to store the user input into a variable called name

33
New cards

.delete() method

A method used to remove a specified key and its associated value from a data structure.

34
New cards

.insert() method

A method used to add a new element at a specified position in a data structure, such as a list or an array.

35
New cards

What is the foundational element of the Tkinter GUI?

The window

36
New cards

Entry widget methods

Retrieving text .get()

Deleting text .delete()

Inserting text .insert()

37
New cards

Casting

Changing one data type into another

38
New cards

What does slicing do?

Takes a part of a string or list

39
New cards

Try and except

Try allows you to test the code for errors

The accept block allows you to fix those errors

40
New cards

How to identify a subroutine

Any function defined with def is a subroutine