Created
February 19, 2020 17:30
-
-
Save mayankdawar/cb273d7969800a4991698268942f2f56 to your computer and use it in GitHub Desktop.
Create one conditional to find whether “false” is in string str1. If so, assign variable output the string “False. You aren’t you?”. Check to see if “true” is in string str1 and if it is then assign “True! You are you!” to the variable output. If neither are in str1, assign “Neither true nor false!” to output.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
str1 = "Today you are you! That is truer than true! There is no one alive who is you-er than you!" | |
if 'false' in str1: | |
output = "False. You aren't you?" | |
elif "true" in str1: | |
output = "True! You are you!" | |
else: | |
output = "Neither true nor false" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
str1 = "Today you are you! That is truer than true! There is no one alive who is you-er than you!"
if "false" in str1:
output="False. You aren’t you?"
elif "true" in str1:
output="True! You are you!"
else:
output="Neither true nor false!"