3D PROGRAMSExcellence (6 points): Complete CallMe, ConsonantRemover, and MoreSecure within 50 hours, meeting all program standards.
Advanced (5 points): Complete CallMe and ConsonantRemover within 50 hours, and MoreSecure by the end of Cycle 3, meeting all program standards. Proficient (4 points): Complete CallMe and ConsonantRemover by the end of Cycle 3, meeting all program standards. Basic (3 points): Complete CallMe by the end of Cycle 3, and have ConsonantRemover finished but not functioning. Below Basic (2 points): Complete CallMe by the end of Cycle 3. |
|
CallMe
At one time, telephone exchanges were often alphabetic, and most telephones still have letters of the alphabet on the keypad. Write a program which converts an alphabetic sequence of four digits (typically 1800 or 1888) and seven letters to an all-numeric telephone number. Note that some alphabetic sequences have more than seven numbers; your program must disregard any letters after the seventh letter input by the user.
Your program must utilize a FOR TO DO loop in the fashion shown in the presentation.
TEST DATA:
INPUT = OUTPUT
1800PETMEDS = 18007386337
1888BESTBUY = 18882378289
1800FLOWERS = 18003569377
1800CONTACTS = 18002668228
(note: the twelfth character in 1800CONTACTS will not register when dialing the number, so companies will extend the length of the word portion when appropriate (1800CONTACTS sells contact lenses, known as "contacts"). Your program only needs to read in the first eleven characters (four digits followed by seven letters).
At one time, telephone exchanges were often alphabetic, and most telephones still have letters of the alphabet on the keypad. Write a program which converts an alphabetic sequence of four digits (typically 1800 or 1888) and seven letters to an all-numeric telephone number. Note that some alphabetic sequences have more than seven numbers; your program must disregard any letters after the seventh letter input by the user.
Your program must utilize a FOR TO DO loop in the fashion shown in the presentation.
TEST DATA:
INPUT = OUTPUT
1800PETMEDS = 18007386337
1888BESTBUY = 18882378289
1800FLOWERS = 18003569377
1800CONTACTS = 18002668228
(note: the twelfth character in 1800CONTACTS will not register when dialing the number, so companies will extend the length of the word portion when appropriate (1800CONTACTS sells contact lenses, known as "contacts"). Your program only needs to read in the first eleven characters (four digits followed by seven letters).
ConsonantRemover
Write a program that will ask the user for a single word. The program should output the word so that all of the consonants (non-vowels) are replaced with asterisks (*). Note that Y is a semi-vowel and is only considered a vowel when it is the last letter of a word.
TEST DATA:
INPUT = YELLOW
OUTPUT = *E**O*
INPUT = PHOOEY
OUTPUT = **OOEY
INPUT = VOLLEYBALL
OUTPUT = *O**E**A**
INPUT = HEY
OUTPUT = *EY
INPUT = SUPERCALIFRAGILISTICEXPIALIDOCIOUS
OUTPUT = *U*E**A*I**A*I*I**I*E**IA*I*O*IOU*
Write a program that will ask the user for a single word. The program should output the word so that all of the consonants (non-vowels) are replaced with asterisks (*). Note that Y is a semi-vowel and is only considered a vowel when it is the last letter of a word.
TEST DATA:
INPUT = YELLOW
OUTPUT = *E**O*
INPUT = PHOOEY
OUTPUT = **OOEY
INPUT = VOLLEYBALL
OUTPUT = *O**E**A**
INPUT = HEY
OUTPUT = *EY
INPUT = SUPERCALIFRAGILISTICEXPIALIDOCIOUS
OUTPUT = *U*E**A*I**A*I*I**I*E**IA*I*O*IOU*
MoreSecure
Caesar's methods for encrypting his messages would be easily broken by any modern computer hacker (unless he/she was really overthinking it!). To keep our information safe on the modern world wide web, we need much more efficient methods to prevent crimes like identity theft and to protect our personal emails.
Write a program that will simulate encrypting a password following these guidelines:
EXAMPLE (not test data because it is random!):
INPUT
RANDOMIZATION
OUTPUTS
Caesar's methods for encrypting his messages would be easily broken by any modern computer hacker (unless he/she was really overthinking it!). To keep our information safe on the modern world wide web, we need much more efficient methods to prevent crimes like identity theft and to protect our personal emails.
Write a program that will simulate encrypting a password following these guidelines:
- The program may not contain any variables of type char and ideally has only five or less variables total (I think it could be done with three--two of type longint and one of type string).
- Greet the user and prompt them to enter their password for their account at PASCAL Bank and Trust.
- Ensure that the user is aware that their password can contain up to 15 uppercase letters, lowercase letters, or numbers.
- Encrypt each character of the password by shifting each character by a randomly generated single-digit integer (0 to 9) created solely for that character. In addition, every third character should be shifted by a negative single-digit integer (0 to -9). See the test data for examples.
- Output the 15 digit encryption key FIRST, which is the positive forms of the fifteen randomly generated integers. No spaces can interrupt the integers.
- Then, output the encrypted password.
EXAMPLE (not test data because it is random!):
INPUT
- Password = ILoveMySpaniels
RANDOMIZATION
- Suppose the random shifts for each character were 5, 3, -6, 6, 4, -8, 2, 1, -2, 0, 9, -4, 2, 8, -6
- Encrypted password is found by adding 5 to ordinal of character 1, adding 3 to character 2, subtracting 6 (or adding -6) to character 3, ...
OUTPUTS
- Encryption Key: 536648212094286 (must appear this way with NO spaces)
- Encrypted Password: NOi|iE[Tnawegtm