define variable

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

1/33

flashcard set

Earn XP

Description and Tags

storage location in a computer program - value - store in memory location

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

34 Terms

1
New cards

what are primitive data types

data,, floats, whole number values

2
New cards

reference data type?

complex structures, aries, strings

3
New cards

define a variable

named storage location whose value can change while program is running, can be over ridden

4
New cards

define constants and examples

cannot be changed, numeric constants ()/ string constants(‘‘)

use UPPER_CASE

<p>cannot be changed, numeric constants ()/ string constants(‘‘)</p><p>use UPPER_CASE</p><p></p>
5
New cards

what are reversed words

should not be used - already have their own fixed meanings and should not be used as variable names, function names or identifiers

6
New cards

why cannot you use class as a variable name

it is already reserved word

7
New cards

why can you not use letter/us.ot

you cannot use the symbols

8
New cards

whats camel case

firrstword lowercase second word starts with a capital

9
New cards

what is papscal

both capitals for both parts of the name

10
New cards

what is Sniciss

with underscores

11
New cards

what is kebabcase

using a dash - make sure its not a minus

12
New cards

whats a neumonic

memory aid to know what your value is storing in memory

13
New cards

what are the operators

knowt flashcard image
14
New cards

what are the types of data types

integers/ floats

15
New cards

what is the difference between int/float

+ve,-ve,0

exp, frcat, .

16
New cards

what does concatenate mean

put two strings together

<p>put two strings together</p>
17
New cards

how do you identify a data type

type ()

greetings = ‘hello’ + ‘danny’

print (type(greetings)))

output <class ‘str’>

18
New cards

define type conversion/ typecasting

changing one type of data into another string

int(), float (), str(), complex()

19
New cards

how do you show a type cast in code

print(float(111) + 11)

122.0

20
New cards

how do you type cast variabl data types

i = 59

f = float(i)

21
New cards

define slice

A slice gives from a string one character in the position of the index. E.g. S[i] means the ‘i’ is the position index of the string character

22
New cards

HOW DO YOU SHOW A SLICE

knowt flashcard image
23
New cards

how doo you give the last letter of a string when ou slice

knowt flashcard image
24
New cards

hwo do you convert between strings and integers

knowt flashcard image
25
New cards

how do you get user input

name= input(‘what is your name’)
print( ‘welcome’, name, ‘!’)

26
New cards

how to ask for iinitials if names are already given

initials = name1[0] + ‘.’ + name2[0]

print (‘your initials are’, initials)

27
New cards

elevtor problem

knowt flashcard image
28
New cards

what are the modern applications of programming language

  • developed under heavy time constraints

  • teams

  • run time

  • written by a lot of people

29
New cards

define code

seriese of sorted instruction

30
New cards

about python

  • guido van rosso

  • high skilled language

  • portable since high skilled

    • free and open source

31
New cards

compiler porcess

source code → complier → oject code → execture → output

32
New cards

interpreter

source code → interpreter → output

33
New cards

what is a vim command mode

Vim can be used with your command line program to edit programs written in any programming language

34
New cards