Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following string variable: firstName, lastName, and middleName-have been pre

ID: 3564430 • Letter: T

Question

The following string variable: firstName, lastName, and middleName-have been previously initialized somewhere in the program. Write one statement that shall calculate the total length of the strings in the three variables and assign the calculate value to the variable size. (12%) Variable login contains the login name of a user. It has been previously initialized somewhere in the program. Write one statement that shall print the value of this variable, capitalized, with all trailing white spaces removed, and enclosed in the asterisks (*). For example, if the value of login is' guest'; then your statement shall display '* Guest*' (less the quotes): print

Explanation / Answer

9)
size=len(firstname+lastname+middlename);

10) print("*" + login.capitalize().rstrip() + "*")

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote