Question: String: a sequence of zero or more characters, enclosed within single or double quotation marks. It is an ordered collection of values. General Form: stringName

 String: a sequence of zero or more characters, enclosed within single

String: a sequence of zero or more characters, enclosed within single or double quotation marks. It is an ordered collection of values. General Form: stringName [ - "string value"]: Examples: lastName = "gates" firstName - William empty -- blank - String operations: The common operators (, -=) may be used with strings as well as concatenation(+), and functions for string manipulation such as: len(). lower(), upper. and title. 1. The concatenation (+) operator causes strings to be concatenated (i.e. joined together). Assign to fullName the characters in firstnane joined to lastName. 2. Assign to editedName the string constructed from joining lastName, a comma(.). a space, and firstName. 3. The built-in function len(s), where s is a string variable, returns the number of characters in that string. Assign to an int variable named length the number of characters in lastnane by invoking len(s). 4. The lower). upper and title methods invoked by an object named s: a. s.lower() is a built-in method (function) that is called to return a new string in lowercase: If given a variable named choice FromInput whose value may have been entered as 'y' or 'y', or as 'n' or 'N', assign to choice the lowercase value for choiceFromInput. b. s.upper) is invoked to return the string s in uppercase letters: When given a variable named firstInitialInput whose value may have been obtained by input as a value of unknown case, assign to firstInitial the value returned in uppercase for firstInitial Input. C. s.title() is used to convert the first letter of each word in a string to uppercase and the trailing letters in each word to lowercase: From the example variable values defined under the "General Form" side heading above, assign to theNames the value returned from title whose argument is a string expression for the join of firstName, to a blank, and to lastName. Also, show the joined values assigned to theNames

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!