Try to search your question here, if you can't find : Ask Any Question Now ?

Python, storing user input in an array, then printing them out inside a poem

HomeCategory: stackoverflowPython, storing user input in an array, then printing them out inside a poem
Avatarpushpa asked 4 months ago

I am trying to write a simple madlib for my programming class, and struggling for the past two days.

I want to prompt the user to enter two colors, then store them in an array inside a function.

I want to create another function where I prompt the user to enter two verbs and store them in an array.

Finally, I want to call these two functions in my main function where I insert the user inputs into a poem.

for example:

def main():   
    print("Roses are", colors[],".")   
    print("Violet are",color[],".")   
    print("The weather may", verb[],".")   
    print("But I will always", verb[],"you.") 
main()

Any guidance is much appreciated!

1 Answers
Best Answer
AvatarMatthias answered 4 months ago
Your Answer

4 + 20 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com