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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!