fix: URL names for learn python course (#66513)

This commit is contained in:
Jessica Wilkins
2026-03-17 05:16:49 -07:00
committed by GitHub
parent 29028bbefa
commit 776ce24c8e
45 changed files with 71 additions and 71 deletions

View File

@@ -0,0 +1,37 @@
---
id: 9afe5e8141b13e9f1d59d46e
title: Building a Multiple Choice Quiz
challengeType: 11
videoId: GJMmSaB8RN0
dashedName: building-a-multiple-choice-quiz
---
# --description--
In this video, you will practice what you have learned about classes and objects by building a multiple choice quiz.
# --questions--
## --text--
Which of the following is the correct way to import the `Question` class from the `Question` module?
## --answers--
`Question import`
---
`from Question`
---
`from Question import Question`
---
`import Question.py`
## --video-solution--
3

View File

@@ -0,0 +1,37 @@
---
id: a0339c4075344cbfc2cd939c
title: Classes and Objects
challengeType: 11
videoId: fR3dh5_MPJs
dashedName: classes-and-objects
---
# --description--
In this video, you will learn how to create classes and objects in Python to write object-oriented programs.
# --questions--
## --text--
What is the role of `def __init__(self):` inside of a class?
## --answers--
It represents a function for calling the method.
---
It specifies the type of the class.
---
It allows a class to inherit methods from another class.
---
It represents an initializer method.
## --video-solution--
4

View File

@@ -0,0 +1,37 @@
---
id: 697fe5c032baa3841ab62a64
title: Inheritance
challengeType: 11
videoId: uHdNSULVpgY
dashedName: inheritance
---
# --description--
In this video, you will learn about inheritance in object oriented programming.
# --questions--
## --text--
What is inheritance in object oriented programming?
## --answers--
This is when a class reuses code from a function.
---
This is when a class creates a copy of another class.
---
This is when a class inherits properties and behaviors from another class.
---
This is when a class hides its methods and variables from other classes.
## --video-solution--
3

View File

@@ -0,0 +1,69 @@
---
id: 697fe3cb32baa3841ab62a63
title: Object Functions
challengeType: 11
videoId: 3Mla2uUDSu8
dashedName: object-functions
---
# --description--
In this video, you will learn how to work with functions inside of classes.
# --questions--
## --text--
Which of the following is the correct way to create a function inside of a class?
## --answers--
```python
class Student:
def __init__(self, name, age):
self.name = name
self.age = age
def greet(self.function):
return f"Hello, my name is {self.name} and I am {self.age} years old."
```
---
```python
class Student:
def __init__(self, name, age):
self.name = name
self.age = age
def greet(self):
return f"Hello, my name is {self.name} and I am {self.age} years old."
```
---
```python
class Student:
def __init__(self, name, age):
self.name = name
self.age = age
def greet(self):
self.pass
```
---
```python
class Student:
def __init__(self, name, age):
self.name = name
self.age = age
greet = (self):
return f"Hello, my name is {self.name} and I am {self.age} years old."
```
## --video-solution--
2

View File

@@ -0,0 +1,37 @@
---
id: 697fe6c932baa3841ab62a65
title: Python Interpreter
challengeType: 11
videoId: -c1vFEsIod4
dashedName: python-interpreter
---
# --description--
In this video, you will learn how to work with the Python interpreter.
# --questions--
## --text--
What is the Python interpreter?
## --answers--
This is a program that writes Python code for you.
---
This is a tool that compiles Python into Java or C++.
---
This is a library that stores Python functions.
---
This is a program that reads and executes Python code.
## --video-solution--
4