grade - an integer/float representing the numerical grade
Return
a String - ‘You made a(n) [letter grade].’
Description
Write a function, using conditionals, that determines the letter grade from the numerical grade, passed in as
a parameter. The letter grade is determined by the following: [90, 100] - A, [80, 90) - B, [70, 80) - C, [60,
70) - D, [0, 60) - F (Assume the numerical grade argument is between 0 and 100.) After converting the
numerical grade to a letter grader, return the exact string, ‘You made a(n) [letter grade].’
grade:
countLetter
Parameters
aWord – a string representing a word
aLetter – a string representing the character to count in aWord
Return
count – integer representing the number of times aLetter appears in aWord
Description
Write a function that takes in a word and letter as parameters. The function will then count the
number of times that the letter appears in the word, using a loop. Remember that capital letters are
DIFFERENT from lower case letters! Return the number of times that the letter appears in the word or
sentence as an integer
aWord:
aLetter:
eyeForI
Parameters
aString – any string
Return
The modified string
Description
Write a function that takes in a string as a parameter. Replace every “I” and “i” in the string with
“eye” and return the resulting string. The function MUST use a for-loop or while loop to build up the
new string while processing the original string letter by letter
aString:
wordMirror
Parameters
aString – any string
Return
The mirrored string (reversed)
Description
Write a function that takes in a string as its only parameter. You will then return a new string that
is the original string concatenated with the reflection of the original string (reverse the string). It may be
helpful to use a for-loop to reflect (reverse) the string. Hint: Add each letter letter to the FRONT of the new
string you are building up!
aString:
encryption
Parameters
aString – a string that you want to encrypt
Return
None
Description
Write a function that encrypts a message into a secret code. The encryption should reflect the
following conversions:
1. a - @ (i.e. Change every instance of “a” to “@”)
2. e - ()
3. h - #
4. l - 1 (lowercase-L to number one)
5. r - + (plus sign)
6. s - $
7. v - ^
8. x - *
aString:
countDown
Parameters
startNum – an integer that is the starting number to count down from
countBy– an integer that is the number you count down by
Return
None
Description
Write a function to count down from the first parameter (startNum) by the second parameter
(countBy). The function should
print
the numbers from the given number to 1 (decreasing by the second
parameter each time...if you go past 1, don't print it!) in descending order, with each number being printed
on its own line. After printing the required numbers, on a separate line, print the string 'Blast off!'