1/33
storage location in a computer program - value - store in memory location
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No study sessions yet.
what are primitive data types
data,, floats, whole number values
reference data type?
complex structures, aries, strings
define a variable
named storage location whose value can change while program is running, can be over ridden
define constants and examples
cannot be changed, numeric constants ()/ string constants(‘‘)
use UPPER_CASE

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
why cannot you use class as a variable name
it is already reserved word
why can you not use letter/us.ot
you cannot use the symbols
whats camel case
firrstword lowercase second word starts with a capital
what is papscal
both capitals for both parts of the name
what is Sniciss
with underscores
what is kebabcase
using a dash - make sure its not a minus
whats a neumonic
memory aid to know what your value is storing in memory
what are the operators

what are the types of data types
integers/ floats
what is the difference between int/float
+ve,-ve,0
exp, frcat, .
what does concatenate mean
put two strings together

how do you identify a data type
type ()
greetings = ‘hello’ + ‘danny’
print (type(greetings)))
output <class ‘str’>
define type conversion/ typecasting
changing one type of data into another string
int(), float (), str(), complex()
how do you show a type cast in code
print(float(111) + 11)
122.0
how do you type cast variabl data types
i = 59
f = float(i)
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
HOW DO YOU SHOW A SLICE

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

hwo do you convert between strings and integers

how do you get user input
name= input(‘what is your name’)
print( ‘welcome’, name, ‘!’)
how to ask for iinitials if names are already given
initials = name1[0] + ‘.’ + name2[0]
print (‘your initials are’, initials)
elevtor problem

what are the modern applications of programming language
developed under heavy time constraints
teams
run time
written by a lot of people
define code
seriese of sorted instruction
about python
guido van rosso
high skilled language
portable since high skilled
free and open source
compiler porcess
source code → complier → oject code → execture → output
interpreter
source code → interpreter → output
what is a vim command mode
Vim can be used with your command line program to edit programs written in any programming language