Example #1
0
import sys
from checkArguments import checkArguments

checkArguments(sys, 1)

value1 = sys.argv[1]

# Find Longest Word
# Given a string with multiple words, return the longest word.
#
# Instructions
# You'll get one input, a string with multiple words. Return
# the longest word in the string. If the input contains multiple
# words that are the largest length, return a string that contains
# all of the words in the same order they are provided. All
# returned strings should be lowercase and trimmed of whitespace.
#
#   Input
#     value1: Single string with multiple words
#
# Sample Test Cases
# Regular
#   value1: run,barn,yellow,barracuda,shark,fish,swim
#   output: barracuda
#
# Same Size
#   value1: fishes,sam,gollum,sauron,frodo,balrog
#   output: fishes,gollum,sauron,balrog
#
# Your solution code goes below
import sys
from checkArguments import checkArguments

checkArguments(sys, 2)

value1 = sys.argv[1]
value2 = sys.argv[2]

# Fibonacci Numbers
# Start with one Fibonacci sequence number, then calculate more from there.
#
# Instructions
# Your input variable will contain a fibonacci sequence number. Your
# job is to calculate the next n digits.  (Hint: Look up the definition
# of Fibonacci numbers)
#
#   Input
#     value1: The starting number
#     value2: n numbers to calculate after value1
#
# Sample Test Cases
# Small Numbers
#   value1: 5
#   value2: 2
#   output: 8,13
#
# Large Numbers
#   value1: 34
#   value2: 7
#   output: 55,89,144,233,377,610,987
#