Changes

Jump to: navigation, search

OPS435 Python Lab 4

12 bytes removed, 10:10, 21 June 2017
PART 1 - Strings and Substrings
:::*The '''first_five() ''' function accepts :<ul><li>Accepts a single string argument :::*The first_five() function returns </li><li>Returns a string that contains the first five characters of the argument given </li></ul>:::*The '''last_seven() ''' function accepts :<ul><li>Accepts a single string argument :::*The last_seven() function returns </li><li>Returns a string that contains the last seven characters of the argument given </li></ul>:::*The '''middle_number() ''' function accepts :<ul><li>Accepts a integer as a argument:::*The middle_number() function returns </li><li>Returns a string containing the second and third characters in the number</li></ul>:::*The '''first_three_last_three() ''' function accepts :<ul><li>Accepts two string arguments :::*The first_three_last_three() function returns </li><li>Returns a single string that starts with the first three characters of argument1 and ends with the last three characters of argument2</li></ul>
:::*Example: first_three_last_three('abcdefg', '1234567') returns single string 'abc567'
::::'''Sample Run 1'''<source>
13,420
edits

Navigation menu