Python Help!
Go to solution
Solved by X1XNobleX1X,
Completed with this:
line = input('Line: ')
words = line.split()
line = line.lower()
lwords = line.split()
if 'cat' in line:
if 'cat' not in lwords:
print('There is a hidden cat in the line.')
else:
if 'cat' in words:
print('There is a small cat in the line.')
elif 'CAT' in words:
print('There is a big cat in the line.')
else:
print('There is a medium sized cat in the line.')
else:
print('No cats here.')

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now