Question: Write a program that takes in input from the user and prints whether or not it contains the string dog. Recall that you can use
Write a program that takes in input from the user and prints whether or not it contains the string "dog". Recall that you can use the "input()" command (already present below) to get input from the user. When completed, your program will accept such strings as "dog", "bulldog", and "dogfish" - all of which are good dogs. Your entire program should be one line long. Note: You will need to determine if one string contains another string - there is a special operator for this!
input("What's your favorite animal?")
requires answer without "if" answer will be one line of code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
