Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed square function #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions jarvis.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import sys
import requests
import requests
import json
import apis

def square(n):
""" Square numbers
""" Square numbers

>>> square(2)
4
4
>>> square(3)
8
"""
return n**n
return n*n

def dispatcher(command, arg):
""" Does things """
Expand All @@ -23,11 +23,11 @@ def dispatcher(command, arg):
elif command == "go away":
print("It sounds like you no longer need my assistance")
print("Very well. Goodbye!")
return
return
elif command == "bye":
print("Goodbye! Have a good day!")
return
# Reprompt the user.
# Reprompt the user.
prompter()


Expand Down Expand Up @@ -55,7 +55,7 @@ def starter(cliargs):

if (len(cliargs) > 1):
command = cliargs[2]
# TODO: Call dispatcher with args instead of prompting user.
# TODO: Call dispatcher with args instead of prompting user.
else:
prompter()

Expand Down