Python - New concepts Cracked Flashcards
What’s the link between methods and functions
Write in procreate
”"”Methods are functions related to objects”””
What’s the difference between Functions and instances
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)”””
What are variables inside classes calls, and what two other sub parts of a class are there
Write in procreate
”"”Variables inside classes are attributes, arguements go into parameters which are inside classes”””
Please explain what an instance and an object and a class is…
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)
What is the purpose of Self in python
Write in procreate
What’s the difference between a For and While Loop when it comes to iterating
Write in procreate
While loops iterate automatically, but do not increment automatically
What does a break do to a loop
Write in procreate
A break in a whole loop or for loop causes the iteration to end
What does the “in” mean a For or While loop mean
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”
What does continue do in a loop
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.”
What is a break in a loop
Write in procreate
A break condition means when satisfied means, that was fun, end the loop run.
What is a pass in a loop
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
What are the 5 error types in python
Write / draw in procreate
SRL - Syntax, Run-time, Logical Errors
Code this while loop on Juno or Desktop (USE YOUTUBE PHONE AS SECOND SCREEN)
https://youtu.be/cqqwxYLk8A0
Repeat this code using Juno or desktop (USE YOUTUBE PHONE AS SECOND SCREEN)
https://youtu.be/2JsGiygzi5M
Code in Juno or Desktop - USE YOUTUBE PHONE as second screen
Self innit function exercise