#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Felix Muzny DS 2000 - sec 4 9/16/2022 A program to greet people at our new zoo. """ """ Today's problem: Write a program, zoo.py, that represents a zoo that we're starting. First, this program should greet the user (by name, of course), then tell them what animals we have in our zoo. """ # our first function! def main(): # user info name = input("what is your name? ") print("Welcome to Monsters Inc.,", name) print() # animal info print("Our animals:") # 1. open the file in "r"ead mode # Common error A: FileNotFound - "animal.txt" animal_file = open("animals.txt", "r") # 2. do stuff # common error B: misspell readline line = animal_file.readline() print("line:", line) line = animal_file.readline() print("line:", line) line = animal_file.readline() print("line:", line) # 3. close the file animal_file.close() # call the function main()