Mission: Pet Shop Manager ๐พ
You've been hired to run the pet shop's computer system. Time to use
everything from this unit at once: lists, input(), .append(),
loops, f-strings and len().
Your program should work like this:
What pet is joining the shop? axolotl
And one more? corgi
๐พ PET SHOP ROSTER ๐พ
1. hamster
2. gecko
3. parrot
4. axolotl
5. corgi
Total pets in the shop: 5
Numbering trick: keep a counter variable that goes up each time around the loop:
number = 1
for thing in stuff:
print(f"{number}. {thing}")
number = number + 1
Your mission
- Start with a list called
petsholding 3 pets the shop already has - Use
input()twice to ask for two new pets, and.append()each one - Print a numbered roster with a
forloop and f-strings โ one line per pet, starting at 1 - Print the total number of pets using
len()
Make it yours: add a shop name, emoji, a fancy border โ go wild! ๐น
Your code
Press โถ Run to see what your code does!