Question: CHALLENGE ACTIVITY 7 . 2 . 2 : Advanced string formatting. 5 6 7 4 6 8 . 3 9 4 6 9 8 8

CHALLENGE
ACTIVITY
7.2.2: Advanced string formatting.
567468.3946988.q3zqy7
Jump to level 1
String color_name is read from input. Use two print(f''f' statements to output the following two lines:
color_name with a width of 10 characters, right-aligned, and with the fill character '-'.
color_name with a width of 10 characters, centered, and with the fill character '-'.
1
2
3
grad Click here for example
Ex: If the input is red, then the output is:
-red
--- red----
1colorname = input ()
2
3''Your code goes here
4
 CHALLENGE ACTIVITY 7.2.2: Advanced string formatting. 567468.3946988.q3zqy7 Jump to level 1

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!