Python - New concepts Cracked Flashcards

1
Q

What’s the link between methods and functions

A

Write in procreate

”"”Methods are functions related to objects”””

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

What’s the difference between Functions and instances

A

Write on procreate

“Functions do specific things, whereas an instance of a class is a specific thing (a class is a real think , a person, or a car)”””

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

What are variables inside classes calls, and what two other sub parts of a class are there

A

Write in procreate

”"”Variables inside classes are attributes, arguements go into parameters which are inside classes”””

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

Please explain what an instance and an object and a class is…

A

Write in procreate

“A class is a framework through which we can create a real thing and assign properties and attributes to it (a person, a car etc). An object (sometimes known as an instance) is a specific instance of this class (in a car class, if we created a 1966 Honda, this would be an instance or object of this class)

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

What is the purpose of Self in python

A

Write in procreate

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

What’s the difference between a For and While Loop when it comes to iterating

A

Write in procreate

While loops iterate automatically, but do not increment automatically

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

What does a break do to a loop

A

Write in procreate

A break in a whole loop or for loop causes the iteration to end

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

What does the “in” mean a For or While loop mean

A

Write in procreate

””” ““in”” from the For or While Loop literally means ““inside of this variable we put…”” - then the list, dict, tuple to follow to put inside variable to be iterated”

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

What does continue do in a loop

A

Write out

“Continue in a loop is a little like stop and restart from the top. ““Means restart the loop from the top, iterating of course.”

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

What is a break in a loop

A

Write in procreate

A break condition means when satisfied means, that was fun, end the loop run.

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

What is a pass in a loop

A

Write in progress

“Pass in a loop means ““go on””, it’s a filler that doesn’t really change or obstruct the loop run, “

It’s a placeholder that avoids an error

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

What are the 5 error types in python

A

Write / draw in procreate

SRL - Syntax, Run-time, Logical Errors

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

Code this while loop on Juno or Desktop (USE YOUTUBE PHONE AS SECOND SCREEN)

A

https://youtu.be/cqqwxYLk8A0

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

Repeat this code using Juno or desktop (USE YOUTUBE PHONE AS SECOND SCREEN)

A

https://youtu.be/2JsGiygzi5M

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

Code in Juno or Desktop - USE YOUTUBE PHONE as second screen

A

Self innit function exercise

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

What do you do if you cannot grasp something?

A

GHBI (Google, Hasan, Brainscape + Image)
1 - Google for answer?

2 - Then message Hasan to check you know something well.

3 - Then create brainscape card

4 - with image on it to remember

17
Q

How to become expert fundraiser

A

Pitch, pitch, pitch (like coding, expert level comes from time)

  • create brainscape flash cards for perfect answer
18
Q

Say what “init” method means in plain English

A

The “init” word means

“Now we are creating a new instance, these are the bits of information that make up the new instance”

init = “inside of this instance are attributes, X, Y, Z…and so on”

19
Q

Is init automatically called by the Class name simply being written or does it needs to be specifically called, and init written when calling the instance?

A

No, init does not need to be specifically called, it is called automatically to setup a new instance of a class / object

20
Q

What are some differences between a local and global variable

A
21
Q

How to write code? 3 steps. SAB WiJ

A
  1. Screen shot CODE from YouTube Phone
  2. and add to brainscape card
  3. From this write out code in Juno - and save it so can reference it later