pythonLover
46
2019-08-09 03:30:28
0
158

만약 check가 yes면 위에 my_datafile()안에 data만 출력하고 싶은데 어떻게 코드를 작성해야할까요


import sys
import random
import time

def my_datafile():
C_text = "\033[31m"
data = []
name = input("Hello Enter Your name : ")
age = int(input("Hello Enter your age : "))
if age < 13:
print("You cant use our service") # 텍스트 색깔 바꾸기
sys.exit(0)
gender = input("Hello Enter your gender\nboy or girl : ")
if gender == "boy" or gender == "girl":
pass
else:
sys.exit(0)

birthday = int(input("Enter your birth day : "))
if birthday > 2006:
print("You cant use our service\nsorry")
sys.exit(0)

data.append(name)
data.append(age)
data.append(gender)
data.append(birthday)
print(data)

return my_datafile

def check_Profile():
check = input("check My profile? : ")
if check == "Yes" or check == "yes":
#??
else:
print("Go to main screen")
sys.exit(0)

return check_Profile

0
  • 답변 0

  • 로그인을 하시면 답변 을 등록할 수 있습니다.