Kobby E.

asked • 05/22/21

Computer Science

1. Write a program that reads an integer from the user. Then your program should display a message indicating whether the integer is even or odd.


2. A string is a palindrome if it is identical forward and backward. For example “anna”,“civic”,“level” and “hannah” are all examples of palindromic words. Write a program that reads a string from the user and uses a loop to determines whether or not it is a palindrome.


3. Write a program that reads integers from the user and stores them in a list. Your program should continue reading values until the user enters 0. Then it should display all of the values entered by the user (except for the 0) in order from smallest to largest with one value appearing on each line.


4. Two words are anagrams if they contain all of the same letters, but in a different order. For example, “evil” and “live” are anagrams because each contains one ‘e’, one ‘i’, one ‘l’, and one ‘v’. Create a program that reads two strings from the user, determines whether or not they are anagrams.


5. Write a function that takes three numbers as parameters, and returns the median value of those parameters as its result.

1 Expert Answer

By:

Patrick B. answered • 05/23/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Kobby E.

This is awesome! ;)
Report

05/23/21

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.