• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/21

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

21 Cards in this Set

  • Front
  • Back

Exponent

**

Syntax of boolean

True and False


Syntax of assignment

Variable name = value

Join string with other data type in print statement T/F?

False, other data type must be converted to string using str() before concatenation

Name = "harry"


Print " hello %s"%(Name)

hello harry

What is %s?

Placeholder

What is datetime?

Python Library

Current date and time

datetime.now()

Header and function to open link

Webbrowser


Webbrowser.open(url)

Is it possible to import another file into a program?

Yes, import filename


The imported file can have classes defined in it

Class syntax

Class class name():


Def__init__(self,parameters......)


Variable = self.parameterName

Class syntax

Class class name():


Def__init__(self,parameters......)


Variable = self.parameterName

Keyword used to refer instance of a class in a class definition

Self

What happens when you remove the keyword self?

The instance variable is changed to local variable

Blueprint

Class

Instances of a class

Objects

Init method

Is also a constructor that allocates space in memory for all the data or variables associated with it

Keyword used by constructor

Self

Variables associated with instance

Instance variables

Functions associated with instances and use keyword self as parameter

Instance function

Order of evaluation of boolean operations

Not--> and--> or


Use parentheses to evaluate in the order you want