Skip to content
Shop

CommunityJoin Our PatreonDonate

Sponsored Ads

Sponsored Ads

Homework Robot

What if you could create a program that can do your homework? The key is, you actually have to learn the concepts of your homework before you can create a program to do it automatically. In effect, you actually learn the concepts! Use that as an excuse for your teachers!

UI/UX

Functional Requirements

  • Add, subtract, multiply and divide
  • find "x" in f(x)
  • factor equations
js
def myname(x):
    print("hello") 
    print("hellos") 
js
def myname(x):
    print("hello") 

Non Functional Requirements

  • Item
  • Item

Schema

Homework

columndescription
idid of the homework instance
subjecta class pointing to the subject

Subject

columndescription
idid of the subject instance
namename of the subject

Business Rules

Rules about how things should work...

Solution
py
class Math():
    def add(self,a,b):
        return (int(a) + int(b))
    def subtract(self):
        pass
    def multiply(self):
        pass
    def divide(self):
        pass
    def remainder(self):
        pass

class Geometry(Math):
    def sine(self,x):
        pass
    def cos(self,x):
        pass
    def tan(self,x):
        pass
    def arcsine(self,x):
        pass
    def arcos(self,x):
        pass
    def arctan(self,x):
        pass
    def hypo(self,x):
        pass
    def calculateArea(self,type,a,b):
        if type == 'triangle':
            area = .5 * (a*b)
        return area

class Algebra(Geometry):
    pass

class Calculus(Algebra):
    def derivative(self):
        return 'derivative'
    def integral(self):
        return 'derivative'

class LinearAlgebra(Calculus):
    def dot_product(self,a, b):
        dp = 0
        for i in range(len(a)):
            dp += (a[i]*b[i])
        return dp
    def cross_product(self,a, b):
        result = [a[1]*b[2] - a[2]*b[1],
        a[2]*b[0] - a[0]*b[2],
        a[0]*b[1] - a[1]*b[0]]

        return result
    
    def addMatrices(self,a,b):
        return a * b

class HomeworkHelper(LinearAlgebra):
    pass

# Science Classes
class Science(HomeworkHelper):
    pass
class Chemistry(Science):
    pass
class Biology(Science):
    pass
class Physics(Science):
    pass

class LanguageArts(HomeworkHelper):
    def get_nouns():
        pass
    def get_verbs():
        pass
    def get_adjectives():
        pass

#Social Studies will count all courses in Anthropology, Economics, Government, History, and Sociology, whether or not they are part of a student's focus field in Social Studies.
class SocialStudies(HomeworkHelper):
    def get_population():
        pass
    def calculate_votes(self):
        pass
    def supply_and_demand(self):
        pass

print('add, subtract, multiply, divide')
answer = input("What do you want to do ")
if answer == 'add':
    add_what = input('What do you want to add? Ex: 1,3 ')
    m = Math()
    print("Your answer is: ")
    print(m.add(add_what.split(',')[0],add_what.split(',')[1]))

helper = HomeworkHelper()
sample1 = [1,2,3,4,5]
sample2 = [2,1,1,1,1]

print(helper.dot_product(sample1, sample2))

print(helper.cross_product(sample1, sample2))