python Flashcards

1
Q

python 2 vs python 3

A

python plrogramming language was created by

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

datatypes in python

A

python has several datatypes available to us they are:
1. int=integer
2. float=float
3. bool= boolean
4.str= strings
5. list= list
6. tuples= tuples
7.set=sets
8. dict=dictionaries
data types are the values in python.
- int represents all the numbers.
-strings will represent all the letters
they area also called as findamental data types.
-float stands for floating point.floating point number is a number with deimal point

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

classes in pyhton

A

beyond data types we can create something called classes on our own

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

specialized data types

A

specialized data types are special modules and packages that we can use from libraries .
these are not built in python . its like extension to the python package

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

none

A

none means nothing, its like zero in maths . its the absence of the values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

addition ,subtraction,division, multiplication, division, modulo ,power

A

addition=+
subtraction=-
multiplication=*
divisoi\

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

variables

A

variables store information that can be used in out programs we can hold user inputs like values , variables can sometimes be called as names . assining a value is also known as binding.underscore in python signifies a private variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

expressions and statements

A

an entire line of code that performs certain action is called as statement and the code which performs action is called as expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

augmented assignment operator

A

assignmetn operator is used to assign value to the variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

strings

A

strings is simply a piece of text written in cuotation mark

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

string cocatination

A

string cocatination is joiing of two strings .like : print (“hello” + “abdan”) etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

type conversions

A

type conversions directly converts one data type to another which is useful day to day and competitive programming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

escape sequence

A

escape sequence is used to insert al character that are illegal in string we use escape character with /

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

formatted string

A

formatted string allows you to create dynamic strings by combing variables and values in the article .
it is denoted by f.
ex: print (f ‘hi’ {name}. you are {age} years old’)
etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

string indexes

A

strings can be accessed , and using square brackets we can access different parts of the string. the idea of [start: stop :stepover] is called as slicing .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

capitalize and lower codes

A

capitalize is used for turing a code in upper case letters and lower is used for lower case letters .

14
Q

strings form

A

strings can not be cahnged . it can be replaced or it can be deatroyed.

15
Q

booleans

A

we use booleans to conltrol the flow of the program .to do something which is true and to do another thing which is false, bool identifies false or true .1 is true in bool and 0 is false

16
Q
A