Question: Write a Python simple program, to ask the user input a string, and display only the first quarter (one fourth) and the last quarter

Write a Python simple program, to ask the user input a string, and display only the first quarter (one

Write a Python simple program, to ask the user input a string, and display only the first quarter (one fourth) and the last quarter substrings of the input string. The program should be written in ""A2Q1A.py". Requirements: 1. Ask user a string, and assign it to a variable astr 2. Extract the first quarter substring of the input string to a variable fStr, with slicing technique 3. Extract the last quarter substring of the input string to a variable estr, with slicing technique 4. Join two extracted substrings above, and display the result as sample output below 5. Assume the number of characters in the string is divisible by 4. Sample program output: Enter a string: 12345678 Joined string is 1278

Step by Step Solution

3.50 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Python program that fulfills your requirements A2Q1Apy Ask user for ... View full answer

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 Programming Questions!