Skip to content

Instantly share code, notes, and snippets.

@abhi18av
Last active August 29, 2015 14:23
Show Gist options
  • Save abhi18av/fb117b44fbeb5b3bf9a3 to your computer and use it in GitHub Desktop.
Save abhi18av/fb117b44fbeb5b3bf9a3 to your computer and use it in GitHub Desktop.
Project :- The NumberPerson
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 12:37:31 2015
@author: abhinav
"""
class numperson:
def __init__(self):
self.color = None
self.name = None
def has_color(self):
self.color = input("enter the color of the number : ")
def has_name(self):
self.name = input(" and I namest thou : ")
def show_info(self):
print("The name of the person is : " , self.name)
print("and the Color is : ", self.color)
numlist = [1, 2, 3,]
for i in range(3):
numlist[i] = numperson
numperson.has_color(numlist[i])
numperson.has_name(numlist[i])
print("the personality elements of the number are : ")
numperson.show_info(numlist[i])
""" To access the particular attribute we simply type in the
array like numlist[1] and ask for a particular attribute with the
following command numlist[1].color or numlist[1].name and we have it"""
print("\n the information about the element is as follows ")
print(" \nthe color of the number is ", numlist[1].color)
print(" \nthe name of the number is ", numlist[1].name)
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 12:37:31 2015
@author: abhinav
@version 2
Sensual aspects - Shape, Smell, Sound, Touch and Taste=)
Perceptual aspects - Color, Name, Gut-Feeling, an associated Alphabet, Place, Gender, Action.
"""
class numperson:
def __init__(self):
self.action = None
self.alphabet = None
self.color = None
self.gender = None
self.name = None
self.place = None
self.shape = None
self.smell = None
self.sound = None
self.taste = None
self.texture = None
def has_shape(self):
self.shape = input(" This number does look an awful lot like : ")
def has_smell(self):
self.smell = input(" Hey, you smell like : ")
def has_sound(self):
self.sound = input(" Wow, your voice is really : ")
def has_texture(self):
self.texture = input(" I can recall that when I touched the number, the skin felt like : ")
def has_taste(self):
self.taste = input(" Oh, you are so edible, almost like : ")
def has_color(self):
self.color = input(" Apart from the various shades of grey, which is your favourite colour : ")
def has_name(self):
self.name = input(" Listen, I namest thou : ")
def has_feel(self):
self.feel = input(" You just feel so : ")
def has_alphabet(self):
self.alphabet = input(" Hey, I know of an alphabet which looks a lot like your name : ")
def has_place(self):
self.place = input(" Fancy, I see you here : ")
def has_gender(self):
self.gender = input(" Hey, do you cross-dress or something, because you seem to be : ")
def has_action(self):
self.action = input(" And why are you? : ")
def show_info(self):
self.shape = input(" This number does look an awful lot like : ")
self.smell = input(" Hey, you smell like : ")
self.sound = input(" Wow, your voice is really : ")
self.texture = input(" I can recall that when I touched the number, the skin felt like : ")
self.taste = input(" Oh, you are so edible, almost like : ")
self.color = input(" Apart from the various shades of grey, which is your favourite colour : ")
self.name = input(" Listen, I namest thou : ")
self.feel = input(" You just feel so : ")
self.alphabet = input(" Hey, I know of an alphabet which looks a lot like your name : ")
self.place = input(" Fancy, I see you here : ")
self.gender = input(" Hey, do you cross-dress or something, because you seem to be : ")
self.action = input(" And why are you? : ")
numlist = [1, 2, 3,]
"""
Once you have made sure that you are quite comfortable with the personality then
go right ahead and give enter the value within range() and add the elements to
the numlist. Bada bing, bada boom, all the satements would get executed for those many numbers
"""
for i in range(3):
numlist[i] = numperson
numperson.has_shape(numlist[i])
numperson.has_smell(numlist[i])
numperson.has_sound(numlist[i])
numperson.has_texture(numlist[i])
numperson.has_taste(numlist[i])
numperson.has_color(numlist[i])
numperson.has_feel(numlist[i])
numperson.has_alphabet(numlist[i])
numperson.has_place(numlist[i])
numperson.has_gender(numlist[i])
numperson.has_action(numlist[i])
print("the personality elements of the number are : ")
numperson.show_info(numlist[i])
"""
To access the particular attribute we simply type in the
array like numlist[1] and ask for a particular attribute with the
following command numlist[1].color or numlist[1].name and we have it
"""
print("\n the information about the element is as follows ")
print(" \nthe color of the number is ", numlist[1].color)
print(" \nthe name of the number is ", numlist[1].name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment