Code it fast Screenshot attach for confirmation

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Code it fast

Screenshot attach for confirmation

 

 

Constraints
• Every input is String.
Sample Case 0
Sample Input
STDIN
Function
firstname
first
lastname
second
father
parent
+ city
+ phone
city
9874563214
+ start
y
strfind
any sentence goes here string1
Sample Output
Firstname Lastname Father city
True
True
['any', 'sentence', 'goes', 'here']
3.
Transcribed Image Text:Constraints • Every input is String. Sample Case 0 Sample Input STDIN Function firstname first lastname second father parent + city + phone city 9874563214 + start y strfind any sentence goes here string1 Sample Output Firstname Lastname Father city True True ['any', 'sentence', 'goes', 'here'] 3.
1. Handson - Python - String Operations 2
Python - String Operations 2
Rajesh is trying to write a program that will evaluate and correct his
resume.
Define a function called 'resume which takes eight parameters. All the
parameters are string.
• The first parameter first is the first name.
• the second parameter second is the second name
the third parameter parent is the name of the father or mother
• the fourth parameter city is the name of the city
• the fifth parameter contains phone number in the format of string
• the sixth and seventh parameter contains a single string
• the eigth parameter contains string sentence.
The function definition code stub is given in the editor. Generate print
statements based on conditions given below:
• Remove the spaces from both the end for the strings (first, second,
parent, city)
• Capitalize the first word for the strings (first, second, parent)
• print the strings first, second, parent and d separated by space.
• check if the string phone contains only numerical characters and print
the result
• check if the string phone starts with string start and print the result
• print number of times the string strfind appears in the strings (first,
second, parent, city)
• split the string string1 using split function and print the result
• use the find method to find the position of string strfind in city
Transcribed Image Text:1. Handson - Python - String Operations 2 Python - String Operations 2 Rajesh is trying to write a program that will evaluate and correct his resume. Define a function called 'resume which takes eight parameters. All the parameters are string. • The first parameter first is the first name. • the second parameter second is the second name the third parameter parent is the name of the father or mother • the fourth parameter city is the name of the city • the fifth parameter contains phone number in the format of string • the sixth and seventh parameter contains a single string • the eigth parameter contains string sentence. The function definition code stub is given in the editor. Generate print statements based on conditions given below: • Remove the spaces from both the end for the strings (first, second, parent, city) • Capitalize the first word for the strings (first, second, parent) • print the strings first, second, parent and d separated by space. • check if the string phone contains only numerical characters and print the result • check if the string phone starts with string start and print the result • print number of times the string strfind appears in the strings (first, second, parent, city) • split the string string1 using split function and print the result • use the find method to find the position of string strfind in city
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Printers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education