Question: Using Python 3 ...complete the following exercise. Exercise 5.1 (stringfun.py) This exercise is a modification of exercises in the Google Python class, licensed under the

Using Python 3 ...complete the following exercise.Using Python 3 ...complete the following exercise. Exercise 5.1 (stringfun.py) This exercise

Exercise 5.1 (stringfun.py) This exercise is a modification of exercises in the Google Python class, licensed under the Apache License 2.0. The following functions should not print anything. Create a user interface that uses the func- tions, the input ) function, and the print () function. ends ) Write a function that takes in a string from the user and prints just the first two and the last two characters of the string. You may assume that any input will be at least 2 characters long. 2 Enter a string > spring 3 spng mix) Write a function that takes two strings a and b and prints the two strings concatenated but with the first two characters of each word swapped with the other word's first two characters. You may assume that any input will be at least two characters long. For example 1mix_ 2 String a > german a String b >> english 4 enrman geglish 1 = mix = 2 String a >>> dog 3 String b >>> dinner 4 dig donner

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!