Skip to content

Instantly share code, notes, and snippets.

@accessnash
Created October 19, 2015 07:31
Show Gist options
  • Select an option

  • Save accessnash/580013950257806980dc to your computer and use it in GitHub Desktop.

Select an option

Save accessnash/580013950257806980dc to your computer and use it in GitHub Desktop.
s = input("Enter a sentence for testing: ")
if s.isupper() and s.endswith("."):
print("Perfect! Input meets both requirements")
elif s.isupper() and not s.endswith("."):
print("Input doesn't end with a period")
elif not s.isupper() and s.endswith("."):
print("Input is not all upper-case")
else:
print("Please re-enter a sentence that satisfies both the requirements")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment