Skip to content

Instantly share code, notes, and snippets.

@j-greer
Last active Feb 10, 2016
Embed
What would you like to do?
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"class Letter:\n",
" def __init__(self):\n",
" self.character = raw_input(\"Enter a Letter: \")\n",
" \n",
" def check_if_letter(self):\n",
" return self.character.isalpha()\n",
" \n",
" def lower_case(self):\n",
" self.lower_c = self.character.lower()\n",
" return self.lower_c\n",
" \n",
" def is_vowel(self):\n",
" if self.lower_c in ['a','e','i','o','u']:\n",
" return True\n",
" else:\n",
" return False"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment