How to format a string made from user input by using user input

I am writing a program that is supposed to print out a flag with the width of the flag being user input and the characters used in the flag also being user input. I am having difficulty in formatting the characters according to user input. This is what I have so far:

Greeting = "Hi, I'm flaggy the flagmaker. Let's make a flag!"
print (Greeting)
width = (int (input ("What's the width of your flag?")))
if width > 0:
         print (width)
elif width < 1:
         print (input( "What's the width of your flag?\n>"))
characters = input ("What characters would you like to use?\n>")
if characters == []:
    print (input ("What characters would you like to use\n>?"))
print (format (characters*3))
str = ['>width']
print [str. format ["characters"]]
print [str. format ["characters"]]
print (format (characters*3))
  • my issues are in the third to last and second to last lines where I know the format is incorrect but I’m not sure how to correct it.
1 Like

It’s been a day since this topic was posted. Have you found your way past this problem?