1 lets try that again but this time with something

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
> -1 Let's try that again, but this time with something less negative. What's the width of your flag? ... Run 2 (invalid character, empty response, ask again): ----- Hi, I'm flaggy the flagmaker. Let's make a flag. What's the width of your flag? > 5 What character(s) do you want to use? > Let's try that again, but this time with maybe more character(s). What character(s) do you want to use? > Run 3 (money flag!) ----- Hi, I'm flaggy the flagmaker. Let's make a flag. What's the width of your flag? > 5 What character(s) do you want to use? > $ $$$$$ $$$$ $$$ $$ $ $$ $$$ $$$$ $$$$$ Run 3 (less money flag!) ----- Hi, I'm flaggy the flagmaker. Let's make a flag. What's the width of your flag? > 4 What character(s) do you want to use?
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
> $ $$$$ $$$ $$ $ $$ $$$ $$$$ Run 4 (ugh, even less money flag!) ----- Hi, I'm flaggy the flagmaker. Let's make a flag. What's the width of your flag? > 1 What character(s) do you want to use? > $ $ Run 5 (character has multiple characters in it) ----- Hi, I'm flaggy the flagmaker. Let's make a flag. What's the width of your flag? > 3 What character(s) do you want to use? > --o --o--o--o --o--o --o --o--o --o--o--o """ import sys print("Hi, I'm flaggy the flagmaker. Let's make a flag.") #ask for the width width= int(input("What's the width of your flag?")) if width < 1: print("Let's try that again, but this time with something less negative.What's the width of your flag?") width= int(input("What's the width of your flag?")) character=input('What character(s) do you want to use') if character =="": print("Let's try that again, but this time with something less negative.What's the width of your flag?") character= input('What character(s) do you want to use')
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern