Assignment Purpose:The purpose of this lab assignment is to demonstrate knowledge of functions andstringsThis assignment is going to have you breaking up strings into substrings. The main logic will have us input aperson's first middle and last name separated by only a single space. You will be responsible for designing thelogic and writing the functions necessary for breaking up the name. Below you will find the function names andthe description of what they are to do.1. Function findFirstOccurance - this function needs to accept 2 strings by parameter, the first is acharacter to search for and the second a string to search for the character in. The function is to returnan integer value that represents the location of the first occurance of the character in the message. If itdoes not find the character it should return a -12. Function findLastOccurance - this function sets up the same way as findFirstOccurance but will searchfor the last occurance of the character in the message. It will reutrn the index of the character or a -1 ifthe character does not exist.3. You will need to make 3 other functions that all perform similar action. Functions getFirstName,getLastName, and getMiddleName. Each funciton will accept a string as a parameter that willrepresent the full name of a person. getFirstName will return a string of the first name, getLastNamewill return the last name, and getMiddle will return the middle name4. Main module will have us input a person's full name and verify that it contains a minimum of 2 spaces.It will then display the person's first middle and last name appropriately. You will find the pseudocodefor the main method below.For Submission1. Pseduocode for findFirstOccurance that includes a looping activity2. Flowchart for findLastOccurance that includes a looping activity3. A python program that has all the supporting funcitons listed above and executes the mainline logicpseudocoded below.You will also find some sample output below for you to reference.Module main():DeclarationsStr fullNameStr firstNameStr middleNameStr lastName#inputInput fullname#processingWhile findFirstOccurance( “ “, fullName) == findLastOccurance(“ “, fullName):Display error messageInput fullNameset firstNameset middleNameset lastName#outputprint firstNameprint middleNameprint lastNamereturn
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here