Question: Python Write a Python program that implements the following options based on the user choice: 1. Find LCM of two numbers. 2. Check Armstrong number.

Python  Python Write a Python program that implements the following options based
on the user choice: 1. Find LCM of two numbers. 2. Check

Write a Python program that implements the following options based on the user choice: 1. Find LCM of two numbers. 2. Check Armstrong number. 3. Count Upper and lower Case Letters in a String. 4. Check Palindrome string. 5. EXIT Implement the method as follows: 1. find_lcm: This method takes two numbers and returns the least common multiple (LCM) of two numbers. 2. armstrong_num: This method takes an n-digit integer and checks whether it is an Armstrong number or not. A positive integer is called an Armstrong number of order n if: abcd... - a'+b+c+d" + ... 3. upper_lower_letters: This method takes a string and returns the number of lowercase letters and uppercase letters in the string. 4. palindrome_str: This method takes a string and checks if it is a palindrome (return True) or not (return false). A palindrome string is a string that reads the same backward as forward. 5. exit: This option will exit the program Sample output: Choose from the menu: 1. Find LCM of two numbers. 2. Check Armstrong number. 3. Count Upper and Lower Case Letters in a String. 4. Check Palindrome string. 5. EXIT. Enter your choice: 1 Enter the first number: 12 Enter the second number: 10 The LCM of 12 and 10 is 60 Choose from the menu: 1. Find LCM of two numbers. 2. Check Armstrong number. 3. Count Upper and lower Case Letters in a String. 4. Check Palindrome string. 5. EXIT. Enter your choice: 2 Enter n digits number: 407 407 is an Armstrong number Choose from the menu: 1. Find LCM of two numbers. 2. Check Armstrong number. 3. Count Upper and lower Case letters in a string. 4. Check Palindrome string. 5. EXIT. Enter your choice: 8 Invalid Choice!!!! Choose from the menu: 1. Find LCM of two numbers. 2. Check Armstrong number. 3. Count Upper and Lower Case Letters in a string. 4. Check Palindrome string. 5. EXIT. Enter your choice: 3 Enter string: Python Code The number of lowercase characters is: 8 The number of uppercase characters is: 2 Choose from the menu: 1. Find LCM of two numbers. 2. Check Armstrong number. 3. Count Upper and lower Case Letters in a String. 4. Check Palindrome string. 5. EXIT. Enter your choice: 4 Enter string: Madam It is a palindrome string

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!