Dogsnality 만들어보기

All We Need is Data, itself !·2022년 1월 20일
0

PROJECT

목록 보기
1/2

강아지용 MBTI 검사지 ㅋㅋㅋ
일 갔다와서 졸려서 제대로 못만들었다.
질문은 대충 그냥 생각나는대로 구성했다..

너희 강아지는 사람 만나는 걸 좋아하니? -> 응 -> 그럼 너 E임 -> ?

이런 구조 ㅋㅋㅋㅋㅋㅋㅋ ㅠ_ㅠ
조금 더 시간이 나면 잘 만들어보자

그리고 그냥 완전 간단 ㅋㅋㅋㅋ ㅋㅋㅋ 좀 더 실력이 있었다면 파이써닉하게 만들었겠지만.....
난 먼지라 불가능


import time

char = []
n_cnt, y_cnt = 0, 0

sl1 = time.sleep(2)
sl2 = time.sleep(3)

def yes_or_no():
  global y_cnt, n_cnt

  while 1:
    inp = str(input("Enter y/n : "))
    if inp == 'y':
      y_cnt += 1
      break;
    elif inp == 'n':
      n_cnt += 1
      break;
    else:
      print("Wrong reply. Please enter [y] or [n].")


def cnt_init():
  global y_cnt, n_cnt

  y_cnt = 0
  n_cnt = 0
  
  print("Hi, my name is Anna. Nice to meet you.")
sl1
print("I'm going to check your dog's personality!")
sl1
print('First, What\'s your dog\'s name?')
sl1
NAME = input()
sl1
print(f'Okay, Let\'s start to check {NAME}\'s dogsnality!')
sl2
print("Are you ready?")
sl2
print("Let's go!")
sl2
print("--------------------------------")
sl1
print(f"Does your {NAME} love to go to the places where many other dogs are?")
sl1
yes_or_no()
sl2
print("Great. Let's do more!")
sl1
print(f"Does {NAME} like to play with you for a long time? Like, more than an hour.")
sl1
yes_or_no()
sl2
print(f"Cool. Then, does {NAME} like to getting hugged from you?")
sl1
yes_or_no()

if y_cnt > n_cnt:
  char.append('E')
  cnt_init()
elif y_cnt < n_cnt:
  char.append("I")
  cnt_init()
else:
  print("what?")
  pass

sl2
print(f"Next, does {NAME} oftenly zone out?")
sl1
yes_or_no()
sl2
print(f"When you say 'Walk' by mistake, then is {NAME} going to be in front of the door immediately?")
sl1
yes_or_no()
sl2
print(f"Fine, does {NAME} like to look out the window?")
sl1
yes_or_no()

if y_cnt > n_cnt:
  char.append('N')
  cnt_init()
elif y_cnt < n_cnt:
  char.append("S")
  cnt_init()
else:
  print("what?")
  pass

sl2
print(f"When you cry, does {NAME} come to you, and be with you?")
sl1
yes_or_no()
sl2
print(f"Do you think that sometimes your {NAME} gets upset with you?")
sl1
yes_or_no()
sl2
print(f"Does {NAME} cry alot?")
sl1
yes_or_no()

if y_cnt > n_cnt:
  char.append('F')
  cnt_init()
elif y_cnt < n_cnt:
  char.append("T")
  cnt_init()
else:
  print("what?")
  pass


sl2
print(f"When you say no, does {NAME} easily give up?")
sl1
yes_or_no()
sl2
print(f"Does {NAME} has his/her own daily routine?")
sl1
yes_or_no()
sl2
print(f"This is last one. Does {NAME} sleep at night? Not morning.")
sl1
yes_or_no()

if y_cnt > n_cnt:
  char.append('J')
  cnt_init()
elif y_cnt < n_cnt:
  char.append("P")
  cnt_init()
else:
  print("what?")
  pass


sl2

print(f"Great. I checked all dogsnalities of {NAME}")
sl2
print(f"{NAME}'s dogsnality is......")
time.sleep(4)
print("".join(char), "!!")

사실 이거 왜 만들었냐면은
그냥 이런거 만들고 싶어서 재밌어 보여서 한것도 한거지만
인스턴스에 올려서 api로 백엔드 구성해보려고 만들었음

백엔드 공부중인데 이해 하나도 안돼서 만들어봐야겠음..
모델을 올리기엔 좀 복잡할 거 같고 해서 그냥 주말동안 미니프로젝트로 하나 해 볼 예정

응 좀 하자..^^

참고로 우리집 강아지는 진짜로 INFJ 일 것 같다..ㅋㅋㅋㅋㅋㅋ

profile
분명히 처음엔 데린이었는데,, 이제 개린이인가..

0개의 댓글