Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please type the code for the whole python program, letters are steps not individual questions 2. A palindrome is a word, number, phrase, or another

please type the code for the whole python program, letters are steps not individual questions image text in transcribed
2. A palindrome is a word, number, phrase, or another sequence of characters that reads the same backward as forward. For example level, radar, noon, 10101 to name a few. Write a Python program stored in a file L3q2.py that: A. Gets an input string from the user and store it in a variable called my2 input. Compute the length of the variable my_input and print its length. B. Convert the string in the variable myinput to all Upper-Case characters, and store the result in the variable output1. Print output1. C. Creates a palindrome using only the variable output1 and store it in a variable called palindrome and print the variable palindrome. Check if the variable palindrome is actually a palindrome and store the comparison result in variable check_palindrome. Note: The length of the variable palindrome should be twice the length of the variable output1.. D. Compare if the length of the variable palindrome is twice the length of the variable output1 and store the result in the variable output2. Print output 2. Sample Output: 1. *****************Section A 2. Enter the input string: abc 3. The length of the input string is 3 5. The input string with characters converted to upper case is ABC 7. The Palindrome is ABCCBA 8. Comparison Result is True 9. Section D 10. The variable result2 is True

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago

Question

4. Describe how cultural values influence communication.

Answered: 1 week ago