ARTICLE AD BOX
I am completely new to Python and coding in general. I am currently taking a college-level online Python course, but the instructions and book (Zybooks) are proving to be difficult for me to follow.
We have an assignment to create a code and then have a pseudocode/flowchart to go along with it.
The only requirements are that it must include a string, a function, and a loop.
I'm hoping mine fulfills those requirements, and I really need help with setting up a pseudocode/flowchart - we haven't really gone over that, and it might be simple, and I'm just overthinking it.
Thanks for the help in advance, I've got the code I created below!
pet = input("Do you have a dog or a cat? ") def animal(name, sound): print(name, "is saying hi!") for letter in name: print(sound, end= ' ') if pet == "dog": dog_name = input("What is your dog's name? ") animal(dog_name, "woof") elif pet == "cat": cat_name = input("What is your cat's name? ") animal(cat_name, "meow") else: print("Try again :(")