Menu

[Solved]Write Python Program Take Set User Input Calculate Number Odd Number Set Set Contain Integ Q37285217

  1. Write a python program to take a set as user input, thencalculate the number of odd number in the set.

*** Set with only contain integervalues.

Sample of user Input:

{1, 2, 3, 6, 8, 98, 17}

Sample Output:

Number of odd numbers in the set is:3

*** 1, 3, 17 are the odd numbers.

  1. Write a python program to take a set as user input andcalculate the number of palindromes in the set.

*** Set will have only strings. Butstring can be of either digits or letters. Like, “124421”, “hello”etc.

Sample of user Input:

{“madam”, “45654”, “343”, “hello”,“morning”}

Sample Output:

The number of palindromes in the setis 3.

*** (“madam”, “45654”, “343” are thepalindromes)

*** A palindrome is a word, phrase,number, or other sequences of characters which reads the samebackward or forward.

Expert Answer


Answer to Write a python program to take a set as user input, then calculate the number of odd number in the set. *** Set with on… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *