Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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 donnerStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started