Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+3 votes
asked in CSC201 Spring 2021 by (1 point)

5 Answers

+4 votes

You can use string repetition (string*number) to multiply 1 "*" to be the correct length. Recall the len() returns the length of a string, and work out from there what to multiply "*" by.

answered by (1 point)
+3 votes

I used len(name) + 4 to add '*'

answered by (1 point)
+2 votes

You can take the sum of the string's length, 2 spaces, and 2 signs. Then multiply the sign by that number

answered by (1 point)
+1 vote

String multiplication: ('' some integer). That integer should be related to len(name) (count the number of stars before and after the name starts!).

answered by (1 point)
0 votes

you can pull the nname len out then the amount of '' needed

answered by (1 point)
...