# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # Exercises

# +
# Exercise 1 - Create an object called roc1 from the class below, passing 2 parameters, and then call attributes and methods.
from math import sqrt

class Rocket():
     
    def __init__(self, x=0, y=0):
        self.x = x
        self.y = y
        
    def move_rocket(self, x_increment=0, y_increment=1):
        self.x += x_increment
        self.y += y_increment
        
    def print_rocket(self):
        print(self.x, self.y)

# +
# Exercise 2 - Create a class called Person () with attributes: name, city, phone, and email. Use at least 2 special methods 
# in your class. Create an object of your class and make a call to at least one of its special methods.

# +
# Exercise 3 - Create the Smartphone class with 2 attributes, size and interface and create the MP3Player class with the 
# attributes capacity. The MP3player class must inherit the attributes from the Smartphone class.

StarcoderdataJupyterScriptsDedupFiltered