Problem Description
A palindrome is a word which is the same when read forwards as it is when read backwards. For example, mom and anna are two palindromes.
A word which has just one letter, such as a, is also a palindrome.
Given a word, what is the longest palindrome that is contained...
Posted at 02:39h
in
Uncategorized
by admin
Question:
Create a cat class (just like the dog class we made in the class) . Make at least 2 objects. Each object should have 3 attributes and 3 methods. You can name the methods and attributes whatever you like.
...
Posted at 03:26h
in
archives
by admin
write a program to ask user about the date(year, month and day), then calculate the day of the year.
Sample input:
Year: 2016
Month: 6
Day: 23
Sample output:
Day of the year: 175
Hint:
You need consider leap years and non leap years, in order to do easier calculation, you may create...
Problem DescriptionJack is trying to invent some new words from old words. For every consonant (consonants are the letters except for a, e, i, o, u) in the old word is replaced by three letters, in the following order:
the consonant itself;
the vowel closest to the...
Posted at 03:20h
in
Uncategorized
by admin
Question:
Modify the shooting program we made in the class:
add a variable called score
score will be 0 when we start the game and it will increase by 10 every time you shot down the enemy.
...
Question:
Today in gym class, your class decided to play dodgeball, and Jack is selected as one of the team captains! N students are lined up in a row, waiting to be put on teams. Jack is allowed to pick multiple students as long as they...