This is one possible solution (code and output) for the Week 1 Check in problem. Keep in mind that there are many ways to solve this problem, so be as creative as possible!
Please send your instructor an email if you need help with setting up Eclipse or solving this problem. Write a method that iterates through a list (given as input) and removes all of the numbers that are divisible by 13. The method should print out the final list. Test out your method by calling it on a list of numbers.
Hint: use the special for loop you learned in class to iterate through the list! Write a program that has two functions, one to check if a triangle is valid, and the other to calculate its area.
Sample Output: Enter side 1: 3 Enter side 2: 4 Enter side 3: 5 The area is 6.0 Hints:
Write a program to check if a given word is a palindrome or not. A palindrome is any word that is spelled the same forward and backward.
Sample Output: Enter a word: racecar racecar is a palindrome Enter a word: lever lever is not a palindrome Hints
Write a program that will count the number of vowels in a word.
Hint: Use string index and the len() function. Write a program that checks if one of two numbers is 7, or if their sum or difference is 7.
|