
# Question: Have the function FirstReverse(str_) take the str parameter
# being passed and return the string in reversed order.
# Have the function FirstFactorial(num) take the num parameter being passed and
# return the factorial of it (ie. if num = 4, return (4 * 3 * 2 * 1)). For the
# test cases, the range will be between 1 and 18.
# Using the Python language, have the function LongestWord(sen) take the sen parameter being passed and return the largest word in the string.
# If there are two or more words that are the same length, return the first word from the string with that length.
# Ignore punctuation and assume sen will not be empty.
def LongestWord(sen):
longest = ""
longestCount = 0
for x in sen.split():
tempCount = 0
for y in x:
if y.isalpha():
tempCount += 1
if tempCount > longestCount:
longestCount = tempCount
longest = x
return longest
# Have the function SimpleAdding(num) add up all the numbers from 1 to num.
# For the test cases, the parameter num will be any number from 1 to 1000.
# Using the Python language, have the function LetterCapitalize(str) take the str parameter
# being passed and capitalize the first letter of each word.
# Words will be separated by only one space.
Have 3 secret words to master coding in any language are : practice, practice and practice !!!. Coding is a skill, you will be better when you do it more and more.
This course provide a good problem list so you could get your feed wet inside coding.
Off Line Minimum