Question: 3. (10 pts) Write a function called hws_problem3 that returns a string (say, text). This string is the old string type that uses single quotes).

 3. (10 pts) Write a function called hws_problem3 that returns a

3. (10 pts) Write a function called hws_problem3 that returns a string (say, text). This string is the old string type that uses single quotes). The function should print the first four characters of the string four times. If the string length is less than four, print whatever is there four times. Below are two example executions: > hw5_problem3( CS1183) The front four of CS1103 is CS11CS11CS11CS11 > hw5_problem3'ABC) The front four of ABC is ABCABCABCABC Notes: - Remember that this function prints something and does not return anything. - There should be no additional spaces at the end of the line (e.g., there should be no additional spaces after the text "CS11cs11cs11cs11") - There should be a new line character at the end of the line (notice that the prompt> is in a separate line from the printed text). If you believe the message printed by your function is correct, contact the instructor

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!