Python

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

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.

30 Terms

1
New cards

output command

print(“hello world”)

2
New cards

string

a long chain of text that is displayed, data type

3
New cards

integer

int

  • a whole number, data type

4
New cards

float

float

  • decimal

5
New cards

syntax

rules that determine the way instructions or commands must follow

6
New cards

variable

named spaces in the memory where data can be stored

7
New cards

variable command

myName =

8
New cards

camel case

each word beginning with a capital letter to make things more obvious

9
New cards

python file type

.py

10
New cards

comments command

#

  • the python interpreter ignores it, for human interpretation

11
New cards

addition command

+

12
New cards

subtraction command

-

13
New cards

multiplication command

*

14
New cards

division command

/

15
New cards

remainder command

%

  • 19%3 =1

16
New cards

exponent command(square)

**

  • 2 ** 3 = 8

17
New cards

equal to

==

18
New cards

less than

<

19
New cards

greater than

>

20
New cards

less than or equal to

<=

21
New cards

greater than or equal to

>=

22
New cards

inequal to

!=

23
New cards

iteration

to loop/ repeat

  • saves you from writing code repetitively

  • e.g. while loop

24
New cards

sequence

order of instructions

25
New cards

selection

when the interpreter makes a choice

  • e.g. if/else statements rely on the input

26
New cards

while loop command

while

  • keeps going if number of repetition is unknown

27
New cards

for loop command

for

  • when one knows the number of time the loop should repeat for

  • for loop_counter in range(10):

28
New cards

casting

conversion of a variable from one data type to another

29
New cards

function

a named block that can perform an action whenever it is called

30
New cards

function command

def function()

  • to call it, simply write the name of the function.

  • e.g. function()