# data[].attributes.attachment_link.title
문제해결을위한알고리즘_Post-it

# data[].attributes.headline
PPT (기대효과, 개선사항 미포함)

# data[].attributes.subject
PPT (기대효과, 개선사항 미포함)

# data[].attributes.body
개인별 후기 알려주시면 적겠습니다.

# data[].attributes.attachment_link.title
문제해결을위한알고리즘_Post-it

# data[].attributes.headline
PPT에 들어갈 영상 (프로그램 구현)

# data[].attributes.subject
PPT에 들어갈 영상 (프로그램 구현)

# data[].attributes.body
팀명, 프로그램명

역할
제가 기획, 전체적인 코딩 서브
ui담당 ppt 제작 발표
메인코딩 담당

배경 필요성
여러 실생활에 사용할 수 있는 프로그램을 찾아보다 이 프로그램이 제작능력도 적당하고 활용력도 적당하기 때문에

목표
식단 만들기
내용
탄단지 기초 활동 식단

ui설명,코드설명
메모장을 통해 세이브 기능 구현
로드 구현
이중리스트 구현
tkinter 사용해서 ui구현

후기

# data[].attributes.attachment_link.readable_text
import math
from tkinter import *
from tkinter import ttk
from tkinter.messagebox import *


w=Tk()
w.title('다이어트 프로그램')
w.geometry('800x800')

frame1 = Frame(w,width = 800, height = 800)
frame2 = Frame(w,width = 800, height = 800)
frame3 = Frame(w,width = 800, height = 800)
frame4 = Frame(w,width = 800, height = 800)

frame1.grid(row=0, column=0, sticky="nsew")
frame2.grid(row=0, column=0, sticky="nsew")
frame3.grid(row=0, column=0, sticky="nsew")
frame4.grid(row=0, column=0, sticky="nsew")

age=IntVar()
weight=IntVar()
high=IntVar()
nowname=StringVar()
nowcarbo=IntVar()
nowprotein=IntVar()
nowlipid=IntVar()


def openFrame(frame):
    frame.tkraise()



def Bmr():
    global foodlist
    global save
    foodlist=[]
    save=[]
    bmr=int((10*int(weight.get()))+(6.25*int(high.get()))-(5*int(age.get())))
    if ismale.get()==1 :
        bmr+=5

    elif ismale.get()==2 :
        bmr-=161

    label2_3text.config(text=bmr)

    amr=0
    if radio.get()==1:
        amr=int(bmr*1.2)

    elif radio.get()==2:
        amr=int(bmr*1.375)

    elif radio.get()==3:
        amr=int(bmr*1.55)

    elif radio.get()==4:
        amr=int (bmr*1.725)

    elif radio.get()==5:
        amr=int(bmr*1.9)

    carbohy=int(amr*0.5)
    protein=int(amr*0.3)
    lipid=int(amr*0.2)

    label2_2text.config(text=carbohy)
    label2_4text.config(text=protein)
    label2_5text.config(text=amr)
    label2_6text.config(text=lipid)
    b=label2_3text.cget('text')

    Iclear()

    needcarbo.config(text='필요 탄수화물:\n'+str(label2_2text.cget('text')))
    needprotein.config(text='필요 단백질:\n'+str(label2_4text.cget('text')))
    needlipid.config(text='필요 지방:\n'+str(label2_6text.cget('text')))
    
    
def Addfood():
    if len(foodlist) !=6:
        foodlist.append([nowname.get(),nowcarbo.get(),nowprotein.get(),nowlipid.get()])
        eval(f'food{len(foodlist)}name').config(text=nowname.get())
        eval(f'food{len(foodlist)}carbo').config(text=nowcarbo.get())
        eval(f'food{len(foodlist)}protein').config(text=nowprotein.get())
        eval(f'food{len(foodlist)}lipid').config(text=nowlipid.get())
        needcarbo.config(text='필요 탄수화물:\n'+str(int(label2_2text.cget('text'))-int(some(foodlist,1))))
        needprotein.config(text='필요 단백질:\n'+str(int(label2_4text.cget('text'))-int(some(foodlist,2))))
        needlipid.config(text='필요 지방:\n'+str(int(label2_6text.cget('text'))-int(some(foodlist,3))))
     
def some(aa,b):
    sum=0
    for a in aa:
        sum+=a[b]
    return sum

def Iclear():
    foodlist.clear()
    needcarbo.config(text='필요 탄수화물:\n'+str(label2_2text.cget('text')).replace('\n',''))
    needprotein.config(text='필요 단백질:\n'+str(label2_4text.cget('text')).replace('\n',''))
    needlipid.config(text='필요 지방:\n'+str(label2_6text.cget('text')).replace('\n',''))
    for a in range(1,7):
        eval(f'food{a}name').config(text='')
        eval(f'food{a}carbo').config(text='')
        eval(f'food{a}protein').config(text='')
        eval(f'food{a}lipid').config(text='')

def Save():
    print(str(label2_2text.cget('text')))
    print(str(label2_2text.cget('text')))
    file_in=open("input.txt",'w')
    file_in.write(str(label2_2text.cget('text'))+'\n')
    file_in.write(str(label2_4text.cget('text'))+"\n")
    file_in.write(str(label2_6text.cget('text'))+"\n")
    for a in foodlist:
        file_in.write(f"{str(a)}\n")
    file_in.close()


def Load():
    global foodlist
    global save
    file_in=open("input.txt",'r')
    savelist=file_in.readlines()
    alist=[]
    foodlist=[]
    save=[]
    for a in range(1,7):
        eval(f'food{(a)}name').config(text='')
        eval(f'food{(a)}carbo').config(text='')
        eval(f'food{(a)}protein').config(text='')
        eval(f'food{(a)}lipid').config(text='')
    for a in savelist:
         save.append(a.split('\n'))
    needcarbo.config(text='필요 탄수화물:\n'+str(savelist[0]).replace('\n',''))
    needprotein.config(text='필요 단백질:\n'+str(savelist[1]).replace('\n',''))
    needlipid.config(text='필요 지방:\n'+str(savelist[2]).replace('\n',''))
    for a in save:
        del a[1]
        if save.index(a)>=3:
            b=str(a).replace("'",'')
            b=b.replace('[','')
            b=b.replace(']','')
            b=b.replace(' ','')         
            b=b.replace('"','')
            alist.append(b.split(','))
    for a in range(len(alist)):
        eval(f'food{(a+1)}name').config(text=str(alist[a][0]))
        eval(f'food{(a+1)}carbo').config(text=str(alist[a][1]))
        eval(f'food{(a+1)}protein').config(text=str(alist[a][2]))
        eval(f'food{(a+1)}lipid').config(text=str(alist[a][3]))
        foodlist.append([alist[a][0],int(alist[a][1]),int(alist[a][2]),int(alist[a][3])])
    label2_2text.config(text=savelist[0].replace('\n',''))
    label2_4text.config(text=savelist[1].replace('\n',''))
    label2_6text.config(text=savelist[2].replace('\n',''))
    needcarbo.config(text='필요 탄수화물:\n'+str(int(savelist[0])-some(foodlist,1)).replace('\n',''))
    needprotein.config(text='필요 단백질:\n'+str(int(savelist[1])-some(foodlist,2)).replace('\n',''))
    needlipid.config(text='필요 지방:\n'+str(int(savelist[2])-some(foodlist,3)).replace('\n',''))
    
    print(foodlist)
    file_in.close()



#첫 화면에 들어가는 요소들

label1_1=Label(frame1, text='다이어트 프로그램').place(x=350,y=20)

label1_2=Label(frame1, text='사용자 나이').place(x=40,y=80)

entry1_1=Entry(frame1,textvariable=age).place(x=130,y=80)

label1_3=Label(frame1, text='체중').place(x=80,y=110)

entry1_2=Entry(frame1,textvariable=weight).place(x=130,y=110)

label1_4=Label(frame1, text='성별').place(x=565,y=80)

label1_5=Label(frame1, text='키').place(x=90,y=140)

entry1_3=Entry(frame1,textvariable=high).place(x=130,y=140)


ismale=IntVar()
radiobutton1=Radiobutton(frame1,text='남자',value=1,variable=ismale).place(x=600,y=80)
radiobutton2=Radiobutton(frame1,text='여자',value=2,variable=ismale).place(x=650,y=80)

radio=IntVar()
amr_radiobutton1=Radiobutton(frame1,text='거의 운동하지 않음',value=1,variable=radio).place(x=350,y=70)
amr_radiobutton2=Radiobutton(frame1,text='가벼운 운동',value=2,variable=radio).place(x=350,y=90)
amr_radiobutton3=Radiobutton(frame1,text='보통 수준',value=3,variable=radio).place(x=350,y=110)
amr_radiobutton4=Radiobutton(frame1,text='적극적으로 운동',value=4,variable=radio).place(x=350,y=130)
amr_radiobutton5=Radiobutton(frame1,text='매우 적극적으로 운동',value=5,variable=radio).place(x=350,y=150)





btnToFrame2 = Button(frame1,
                             text="확인",
                             height=3,
                             width = 10 ,
                             command=lambda:[openFrame(frame2),Bmr()]).place(x=300,y=300)

btnToFrame2_1 = Button(frame1,
                             text="식단 불러오기",
                             width = 10,
                                height = 3,
                        
                             command=lambda:[openFrame(frame3),Load()]).place(x=400,y=300)


#결과지에 들어가는 요소들

label2_1=Label(frame2, text='결과지').place(x=350,y=20)
label2_2=Label(frame2, text='탄수화물').place(x=50,y=100)
label2_3=Label(frame2, text='기초대사량').place(x=450,y=100)
label2_4=Label(frame2, text='단백질').place(x=50,y=200)
label2_5=Label(frame2, text='활동대사량').place(x=450,y=200)
label2_6=Label(frame2, text='지방').place(x=50,y=300)

label2_2text=Label(frame2, text='')
label2_2text.place(x=110,y=100)
label2_3text=Label(frame2, text='')
label2_3text.place(x=520,y=100)
label2_4text=Label(frame2, text='')
label2_4text.place(x=110,y=200)
label2_5text=Label(frame2, text='')
label2_5text.place(x=520,y=200)
label2_6text=Label(frame2, text='')
label2_6text.place(x=110,y=300)



btnToFrame3 = Button(frame2,
                             text="처음으로",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame1)]).place(x=300,y=400)

btnToFrame3_1 = Button(frame2,
                             text="식단 작성",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame3)]).place(x=400,y=400)


#식단에 들어가는 요소들

label_3_1=Label(frame3,text='식단').place(x=370,y=10)

foodname=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
needcarbo=Label(frame3,text='필요 탄수화물',borderwidth=2,width=13,height=5,relief='ridge')
needprotein=Label(frame3,text='필요 단백질',borderwidth=2,width=13,height=5,relief='ridge')
needlipid=Label(frame3,text='필요 지방',borderwidth=2,width=13,height=5,relief='ridge')

food1name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food2name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food3name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food4name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food5name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food6name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')


foodname.place(x=50,y=50)
needcarbo.place(x=50,y=130)
needprotein.place(x=50,y=210)
needlipid.place(x=50,y=290)

food1name.place(x=145,y=50)
food1carbo.place(x=145,y=130)
food1protein.place(x=145,y=210)
food1lipid.place(x=145,y=290)

food2name.place(x=240,y=50)
food2carbo.place(x=240,y=130)
food2protein.place(x=240,y=210)
food2lipid.place(x=240,y=290)

food3name.place(x=335,y=50)
food3carbo.place(x=335,y=130)
food3protein.place(x=335,y=210)
food3lipid.place(x=335,y=290)

food4name.place(x=430,y=50)
food4carbo.place(x=430,y=130)
food4protein.place(x=430,y=210)
food4lipid.place(x=430,y=290)

food5name.place(x=525,y=50)
food5carbo.place(x=525,y=130)
food5protein.place(x=525,y=210)
food5lipid.place(x=525,y=290)

food6name.place(x=620,y=50)
food6carbo.place(x=620,y=130)
food6protein.place(x=620,y=210)
food6lipid.place(x=620,y=290)


nownamelabel_3=Label(frame3, text='음식').place(x=75,y=420)
nowcarbolabel_3=Label(frame3, text='탄수화물').place(x=225,y=420)
nowproteinlabel_3=Label(frame3, text='단백질').place(x=405,y=420)
nowlipidlabel_3=Label(frame3, text='지방').place(x=565,y=420)

nownameentry_3=Entry(frame3,textvariable=nowname).place(x=115,y=420,width=80)
nowcarboentry_3=Entry(frame3,textvariable=nowcarbo).place(x=285,y=420,width=80)
nowproteinentry_3=Entry(frame3,textvariable=nowprotein).place(x=455,y=420,width=80)
nowlipidentry_3=Entry(frame3,textvariable=nowlipid).place(x=605,y=420,width=80)



button3_2=Button(frame3,text='음식 추가',command=Addfood,width=10,height=3).place(x=230,y=500)
button3_3=Button(frame3,text='초기화',command=Iclear,width=10,height=3).place(x=360,y=500)
button3_4=Button(frame3,text='세이브',command=Save,width=10,height=3).place(x=490,y=500)
button3_5=Button(frame3,text='로드',command=Load,width=10,height=3).place(x=610,y=500)


btnToFrame1 = Button(frame3,
                             text="처음으로",
                             width=10,
                             height=3,
                             command=lambda:[openFrame(frame1)]).place(x=100,y=500)

openFrame(frame1)
w.mainloop()

    

# data[].attributes.headline
이진혁님과 디스코드를 통해 

# data[].attributes.body
이진혁님과 디스코드를 통해 프로그램을 완성했습니다.

# data[].attributes.attachment_link.readable_text
import math
from tkinter import *
from tkinter import ttk
from tkinter.messagebox import *


w=Tk()
w.title('다이어트 프로그램')
w.geometry('800x800')

frame1 = Frame(w,width = 800, height = 800)
frame2 = Frame(w,width = 800, height = 800)
frame3 = Frame(w,width = 800, height = 800)
frame4 = Frame(w,width = 800, height = 800)

frame1.grid(row=0, column=0, sticky="nsew")
frame2.grid(row=0, column=0, sticky="nsew")
frame3.grid(row=0, column=0, sticky="nsew")
frame4.grid(row=0, column=0, sticky="nsew")

age=IntVar()
weight=IntVar()
high=IntVar()
nowname=StringVar()
nowcarbo=IntVar()
nowprotein=IntVar()
nowlipid=IntVar()


def openFrame(frame):
    frame.tkraise()



def Bmr():
    global foodlist
    global save
    foodlist=[]
    save=[]
    bmr=int((10*int(weight.get()))+(6.25*int(high.get()))-(5*int(age.get())))
    if ismale.get()==1 :
        bmr+=5

    elif ismale.get()==2 :
        bmr-=161

    label2_3text.config(text=bmr)

    amr=0
    if radio.get()==1:
        amr=int(bmr*1.2)

    elif radio.get()==2:
        amr=int(bmr*1.375)

    elif radio.get()==3:
        amr=int(bmr*1.55)

    elif radio.get()==4:
        amr=int (bmr*1.725)

    elif radio.get()==5:
        amr=int(bmr*1.9)

    carbohy=int(amr*0.5)
    protein=int(amr*0.3)
    lipid=int(amr*0.2)

    label2_2text.config(text=carbohy)
    label2_4text.config(text=protein)
    label2_5text.config(text=amr)
    label2_6text.config(text=lipid)
    b=label2_3text.cget('text')

    needcarbo.config(text='필요 탄수화물:\n'+str(label2_2text.cget('text')))
    needprotein.config(text='필요 단백질:\n'+str(label2_4text.cget('text')))
    needlipid.config(text='필요 지방:\n'+str(label2_6text.cget('text')))
    
def Addfood():
    if len(foodlist) !=6:
        foodlist.append([nowname.get(),nowcarbo.get(),nowprotein.get(),nowlipid.get()])
        eval(f'food{len(foodlist)}name').config(text=nowname.get())
        eval(f'food{len(foodlist)}carbo').config(text=nowcarbo.get())
        eval(f'food{len(foodlist)}protein').config(text=nowprotein.get())
        eval(f'food{len(foodlist)}lipid').config(text=nowlipid.get())
        needcarbo.config(text='필요 탄수화물:\n'+str(int(label2_2text.cget('text'))-int(some(foodlist,1))))
        needprotein.config(text='필요 단백질:\n'+str(int(label2_4text.cget('text'))-int(some(foodlist,2))))
        needlipid.config(text='필요 지방:\n'+str(int(label2_6text.cget('text'))-int(some(foodlist,3))))
     
def some(aa,b):
    sum=0
    for a in aa:
        sum+=a[b]
    return sum

def Iclear():
    foodlist.clear()
    needcarbo.config(text='필요 탄수화물:\n'+str(label2_2text.cget('text')).replace('\n',''))
    needprotein.config(text='필요 단백질:\n'+str(label2_4text.cget('text')).replace('\n',''))
    needlipid.config(text='필요 지방:\n'+str(label2_6text.cget('text')).replace('\n',''))
    for a in range(1,7):
        eval(f'food{a}name').config(text='')
        eval(f'food{a}carbo').config(text='')
        eval(f'food{a}protein').config(text='')
        eval(f'food{a}lipid').config(text='')

def Save():
    print(str(label2_2text.cget('text')))
    print(str(label2_2text.cget('text')))
    file_in=open("input.txt",'w')
    file_in.write(str(label2_2text.cget('text'))+'\n')
    file_in.write(str(label2_4text.cget('text'))+"\n")
    file_in.write(str(label2_6text.cget('text'))+"\n")
    for a in foodlist:
        file_in.write(f"{str(a)}\n")
    file_in.close()


def Load():
    global foodlist
    global save
    file_in=open("input.txt",'r')
    savelist=file_in.readlines()
    alist=[]
    foodlist=[]
    save=[]
    for a in range(1,7):
        eval(f'food{(a)}name').config(text='')
        eval(f'food{(a)}carbo').config(text='')
        eval(f'food{(a)}protein').config(text='')
        eval(f'food{(a)}lipid').config(text='')
    for a in savelist:
         save.append(a.split('\n'))
    needcarbo.config(text='필요 탄수화물:\n'+str(savelist[0]).replace('\n',''))
    needprotein.config(text='필요 단백질:\n'+str(savelist[1]).replace('\n',''))
    needlipid.config(text='필요 지방:\n'+str(savelist[2]).replace('\n',''))
    for a in save:
        del a[1]
        if save.index(a)>=3:
            b=str(a).replace("'",'')
            b=b.replace('[','')
            b=b.replace(']','')
            b=b.replace(' ','')
            b=b.replace('"','')
            alist.append(b.split(','))
    for a in range(len(alist)):
        eval(f'food{(a+1)}name').config(text=str(alist[a][0]))
        eval(f'food{(a+1)}carbo').config(text=str(alist[a][1]))
        eval(f'food{(a+1)}protein').config(text=str(alist[a][2]))
        eval(f'food{(a+1)}lipid').config(text=str(alist[a][3]))
        foodlist.append([alist[a][0],int(alist[a][1]),int(alist[a][2]),int(alist[a][3])])
    label2_2text.config(text=savelist[0].replace('\n',''))
    label2_4text.config(text=savelist[1].replace('\n',''))
    label2_6text.config(text=savelist[2].replace('\n',''))
    needcarbo.config(text='필요 탄수화물:\n'+str(int(savelist[0])-some(foodlist,1)).replace('\n',''))
    needprotein.config(text='필요 단백질:\n'+str(int(savelist[1])-some(foodlist,2)).replace('\n',''))
    needlipid.config(text='필요 지방:\n'+str(int(savelist[2])-some(foodlist,3)).replace('\n',''))
    
    print(foodlist)
    file_in.close()



#첫 화면에 들어가는 요소들

label1_1=Label(frame1, text='다이어트 프로그램').place(x=350,y=20)

label1_2=Label(frame1, text='사용자 나이').place(x=40,y=80)

entry1_1=Entry(frame1,textvariable=age).place(x=130,y=80)

label1_3=Label(frame1, text='체중').place(x=80,y=110)

entry1_2=Entry(frame1,textvariable=weight).place(x=130,y=110)

label1_4=Label(frame1, text='성별').place(x=565,y=80)

label1_5=Label(frame1, text='키').place(x=90,y=140)

entry1_3=Entry(frame1,textvariable=high).place(x=130,y=140)


ismale=IntVar()
radiobutton1=Radiobutton(frame1,text='남자',value=1,variable=ismale).place(x=600,y=80)
radiobutton2=Radiobutton(frame1,text='여자',value=2,variable=ismale).place(x=650,y=80)

radio=IntVar()
amr_radiobutton1=Radiobutton(frame1,text='거의 운동하지 않음',value=1,variable=radio).place(x=350,y=70)
amr_radiobutton2=Radiobutton(frame1,text='가벼운 운동',value=2,variable=radio).place(x=350,y=90)
amr_radiobutton3=Radiobutton(frame1,text='보통 수준',value=3,variable=radio).place(x=350,y=110)
amr_radiobutton4=Radiobutton(frame1,text='적극적으로 운동',value=4,variable=radio).place(x=350,y=130)
amr_radiobutton5=Radiobutton(frame1,text='매우 적극적으로 운동',value=5,variable=radio).place(x=350,y=150)





btnToFrame2 = Button(frame1,
                             text="확인",
                             height=3,
                             width = 10 ,
                             command=lambda:[openFrame(frame2),Bmr()]).place(x=300,y=300)

btnToFrame2_1 = Button(frame1,
                             text="식단 불러오기",
                             width = 10,
                                height = 3,
                        
                             command=lambda:[openFrame(frame3),Load()]).place(x=400,y=300)


#결과지에 들어가는 요소들

label2_1=Label(frame2, text='결과지').place(x=350,y=20)
label2_2=Label(frame2, text='탄수화물').place(x=50,y=100)
label2_3=Label(frame2, text='기초대사량').place(x=450,y=100)
label2_4=Label(frame2, text='단백질').place(x=50,y=200)
label2_5=Label(frame2, text='활동대사량').place(x=450,y=200)
label2_6=Label(frame2, text='지방').place(x=50,y=300)

label2_2text=Label(frame2, text='')
label2_2text.place(x=110,y=100)
label2_3text=Label(frame2, text='')
label2_3text.place(x=520,y=100)
label2_4text=Label(frame2, text='')
label2_4text.place(x=110,y=200)
label2_5text=Label(frame2, text='')
label2_5text.place(x=520,y=200)
label2_6text=Label(frame2, text='')
label2_6text.place(x=110,y=300)



btnToFrame3 = Button(frame2,
                             text="처음으로",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame1)]).place(x=300,y=400)

btnToFrame3_1 = Button(frame2,
                             text="식단 작성",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame3)]).place(x=400,y=400)


#식단에 들어가는 요소들

label_3_1=Label(frame3,text='식단').place(x=370,y=10)

foodname=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
needcarbo=Label(frame3,text='필요 탄수화물',borderwidth=2,width=13,height=5,relief='ridge')
needprotein=Label(frame3,text='필요 단백질',borderwidth=2,width=13,height=5,relief='ridge')
needlipid=Label(frame3,text='필요 지방',borderwidth=2,width=13,height=5,relief='ridge')

food1name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food2name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food3name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food4name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food5name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food6name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')


foodname.place(x=50,y=50)
needcarbo.place(x=50,y=130)
needprotein.place(x=50,y=210)
needlipid.place(x=50,y=290)

food1name.place(x=145,y=50)
food1carbo.place(x=145,y=130)
food1protein.place(x=145,y=210)
food1lipid.place(x=145,y=290)

food2name.place(x=240,y=50)
food2carbo.place(x=240,y=130)
food2protein.place(x=240,y=210)
food2lipid.place(x=240,y=290)

food3name.place(x=335,y=50)
food3carbo.place(x=335,y=130)
food3protein.place(x=335,y=210)
food3lipid.place(x=335,y=290)

food4name.place(x=430,y=50)
food4carbo.place(x=430,y=130)
food4protein.place(x=430,y=210)
food4lipid.place(x=430,y=290)

food5name.place(x=525,y=50)
food5carbo.place(x=525,y=130)
food5protein.place(x=525,y=210)
food5lipid.place(x=525,y=290)

food6name.place(x=620,y=50)
food6carbo.place(x=620,y=130)
food6protein.place(x=620,y=210)
food6lipid.place(x=620,y=290)


nownamelabel_3=Label(frame3, text='음식').place(x=75,y=420)
nowcarbolabel_3=Label(frame3, text='탄수화물').place(x=225,y=420)
nowproteinlabel_3=Label(frame3, text='단백질').place(x=405,y=420)
nowlipidlabel_3=Label(frame3, text='지방').place(x=565,y=420)

nownameentry_3=Entry(frame3,textvariable=nowname).place(x=115,y=420,width=80)
nowcarboentry_3=Entry(frame3,textvariable=nowcarbo).place(x=285,y=420,width=80)
nowproteinentry_3=Entry(frame3,textvariable=nowprotein).place(x=455,y=420,width=80)
nowlipidentry_3=Entry(frame3,textvariable=nowlipid).place(x=605,y=420,width=80)



button3_2=Button(frame3,text='음식 추가',command=Addfood,width=10,height=3).place(x=230,y=500)
button3_3=Button(frame3,text='초기화',command=Iclear,width=10,height=3).place(x=360,y=500)
button3_4=Button(frame3,text='세이브',command=Save,width=10,height=3).place(x=490,y=500)
button3_5=Button(frame3,text='로드',command=Load,width=10,height=3).place(x=610,y=500)


btnToFrame1 = Button(frame3,
                             text="처음으로",
                             width=10,
                             height=3,
                             command=lambda:[openFrame(frame1)]).place(x=100,y=500)

openFrame(frame1)
w.mainloop()

# data[].attributes.attachment_link.readable_text
import math
from tkinter import *
from tkinter import ttk
from tkinter.messagebox import *


w=Tk()
w.title('다이어트 프로그램')
w.geometry('800x800')

frame1 = Frame(w,width = 800, height = 800)
frame2 = Frame(w,width = 800, height = 800)
frame3 = Frame(w,width = 800, height = 800)
frame4 = Frame(w,width = 800, height = 800)

frame1.grid(row=0, column=0, sticky="nsew")
frame2.grid(row=0, column=0, sticky="nsew")
frame3.grid(row=0, column=0, sticky="nsew")
frame4.grid(row=0, column=0, sticky="nsew")

age=IntVar()
weight=IntVar()
high=IntVar()
nowname=StringVar()
nowcarbo=IntVar()
nowprotein=IntVar()
nowlipid=IntVar()
foodlist=[]
save=[]

def openFrame(frame):
    frame.tkraise()



def Bmr():
    bmr=int((10*int(weight.get()))+(6.25*int(high.get()))-(5*int(age.get())))
    if ismale.get()==1 :
        bmr+=5

    elif ismale.get()==2 :
        bmr-=161

    label2_3text.config(text=bmr)

    amr=0
    if radio.get()==1:
        amr=int(bmr*1.2)

    elif radio.get()==2:
        amr=int(bmr*1.375)

    elif radio.get()==3:
        amr=int(bmr*1.55)

    elif radio.get()==4:
        amr=int (bmr*1.725)

    elif radio.get()==5:
        amr=int(bmr*1.9)

    carbohy=int(amr*0.5)
    protein=int(amr*0.3)
    lipid=int(amr*0.2)

    label2_2text.config(text=carbohy)
    label2_4text.config(text=protein)
    label2_5text.config(text=amr)
    label2_6text.config(text=lipid)
    b=label2_3text.cget('text')

    needcarbo.config(text='필요 탄수화물:\n'+str(label2_2text.cget('text')))
    needprotein.config(text='필요 단백질:\n'+str(label2_4text.cget('text')))
    needlipid.config(text='필요 지방:\n'+str(label2_6text.cget('text')))
    
def Addfood():
    if len(foodlist) !=6:
        foodlist.append([nowname.get(),nowcarbo.get(),nowprotein.get(),nowlipid.get()])
        eval(f'food{len(foodlist)}name').config(text=nowname.get())
        eval(f'food{len(foodlist)}carbo').config(text=nowcarbo.get())
        eval(f'food{len(foodlist)}protein').config(text=nowprotein.get())
        eval(f'food{len(foodlist)}lipid').config(text=nowlipid.get())
        needcarbo.config(text='필요 탄수화물:\n'+str(int(label2_2text.cget('text'))-int(some(foodlist,1))))
        needprotein.config(text='필요 단백질:\n'+str(int(label2_4text.cget('text'))-int(some(foodlist,2))))
        needlipid.config(text='필요 지방:\n'+str(int(label2_6text.cget('text'))-int(some(foodlist,3))))
     
def some(aa,b):
    sum=0
    for a in aa:
        sum+=a[b]
    return sum

def Iclear():
    foodlist.clear()
    needcarbo.config(text='필요 탄수화물:\n'+str(label2_2text.cget('text')))
    needprotein.config(text='필요 단백질:\n'+str(label2_4text.cget('text')))
    needlipid.config(text='필요 지방:\n'+str(label2_6text.cget('text')))
    for a in range(1,7):
        eval(f'food{a}name').config(text='')
        eval(f'food{a}carbo').config(text='')
        eval(f'food{a}protein').config(text='')
        eval(f'food{a}lipid').config(text='')

def Save():
    aa='필요 탄수화물:\n'
    bb='필요 단백질:\n'
    cc='필요 지방:\n'
    file_in=open("input.txt",'w')
    file_in.write(f"{needcarbo.cget('text').replace(aa,'',1)}\n")
    file_in.write(f"{needprotein.cget('text').replace(bb,'',1)}\n")
    file_in.write(f"{needlipid.cget('text').replace(cc,'',1)}\n")
    for a in foodlist:
        file_in.write(f"{str(a)}\n")
    file_in.close()


def Load():
    file_in=open("input.txt",'r')
    savelist=file_in.readlines()
    alist=[]
    for a in savelist:
         save.append(a.split('\n'))
    needcarbo.config(text='필요 탄수화물:\n'+str(savelist[0]))
    needprotein.config(text='필요 단백질:\n'+str(savelist[1]))
    needlipid.config(text='필요 지방:\n'+str(savelist[2]))
    for a in save:
        del a[1]
        if save.index(a)>=3:
            b=str(a).replace("'",'')
            b=b.replace('[','')
            b=b.replace(']','')
            b=b.replace(' ','')
            b=b.replace('"','')
            alist.append(b.split(','))
    for a in range(len(alist)):
        eval(f'food{(a+1)}name').config(text=str(alist[a][0]))
        eval(f'food{(a+1)}carbo').config(text=str(alist[a][1]))
        eval(f'food{(a+1)}protein').config(text=str(alist[a][2]))
        eval(f'food{(a+1)}lipid').config(text=str(alist[a][3]))
        foodlist.append([alist[a][0],int(alist[a][1]),int(alist[a][2]),int(alist[a][3])])
    label2_2text.config(text=savelist[0])
    label2_4text.config(text=savelist[1])
    label2_6text.config(text=savelist[2])
    

    file_in.close()
    


#첫 화면에 들어가는 요소들

label1_1=Label(frame1, text='다이어트 프로그램').place(x=350,y=20)

label1_2=Label(frame1, text='사용자 나이').place(x=40,y=80)

entry1_1=Entry(frame1,textvariable=age).place(x=130,y=80)

label1_3=Label(frame1, text='체중').place(x=80,y=110)

entry1_2=Entry(frame1,textvariable=weight).place(x=130,y=110)

label1_4=Label(frame1, text='성별').place(x=565,y=80)

label1_5=Label(frame1, text='키').place(x=90,y=140)

entry1_3=Entry(frame1,textvariable=high).place(x=130,y=140)


ismale=IntVar()
radiobutton1=Radiobutton(frame1,text='남자',value=1,variable=ismale).place(x=600,y=80)
radiobutton2=Radiobutton(frame1,text='여자',value=2,variable=ismale).place(x=650,y=80)

radio=IntVar()
amr_radiobutton1=Radiobutton(frame1,text='거의 운동하지 않음',value=1,variable=radio).place(x=350,y=70)
amr_radiobutton2=Radiobutton(frame1,text='가벼운 운동',value=2,variable=radio).place(x=350,y=90)
amr_radiobutton3=Radiobutton(frame1,text='보통 수준',value=3,variable=radio).place(x=350,y=110)
amr_radiobutton4=Radiobutton(frame1,text='적극적으로 운동',value=4,variable=radio).place(x=350,y=130)
amr_radiobutton5=Radiobutton(frame1,text='매우 적극적으로 운동',value=5,variable=radio).place(x=350,y=150)




button1_1=Button(frame1,text='초기화')
button1_1.place(x=360,y=250)

btnToFrame2 = Button(frame1,
                             text="확인",
                             height=3,
                             width = 10 ,
                             command=lambda:[openFrame(frame2),Bmr()]).place(x=300,y=300)

btnToFrame2_1 = Button(frame1,
                             text="식단 불러오기",
                             width = 10,
                                height = 3,
                        
                             command=lambda:[openFrame(frame3),Load()]).place(x=400,y=300)


#결과지에 들어가는 요소들

label2_1=Label(frame2, text='결과지').place(x=350,y=20)
label2_2=Label(frame2, text='탄수화물').place(x=50,y=100)
label2_3=Label(frame2, text='기초대사량').place(x=450,y=100)
label2_4=Label(frame2, text='단백질').place(x=50,y=200)
label2_5=Label(frame2, text='활동대사량').place(x=450,y=200)
label2_6=Label(frame2, text='지방').place(x=50,y=300)

label2_2text=Label(frame2, text='')
label2_2text.place(x=110,y=100)
label2_3text=Label(frame2, text='')
label2_3text.place(x=520,y=100)
label2_4text=Label(frame2, text='')
label2_4text.place(x=110,y=200)
label2_5text=Label(frame2, text='')
label2_5text.place(x=520,y=200)
label2_6text=Label(frame2, text='')
label2_6text.place(x=110,y=300)



btnToFrame3 = Button(frame2,
                             text="처음으로",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame1)]).place(x=300,y=400)

btnToFrame3_1 = Button(frame2,
                             text="식단 작성",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame3)]).place(x=400,y=400)


#식단에 들어가는 요소들

label_3_1=Label(frame3,text='식단').place(x=370,y=10)

foodname=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
needcarbo=Label(frame3,text='필요 탄수화물',borderwidth=2,width=13,height=5,relief='ridge')
needprotein=Label(frame3,text='필요 단백질',borderwidth=2,width=13,height=5,relief='ridge')
needlipid=Label(frame3,text='필요 지방',borderwidth=2,width=13,height=5,relief='ridge')

food1name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food2name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food3name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food4name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food5name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food6name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')


foodname.place(x=50,y=50)
needcarbo.place(x=50,y=130)
needprotein.place(x=50,y=210)
needlipid.place(x=50,y=290)

food1name.place(x=145,y=50)
food1carbo.place(x=145,y=130)
food1protein.place(x=145,y=210)
food1lipid.place(x=145,y=290)

food2name.place(x=240,y=50)
food2carbo.place(x=240,y=130)
food2protein.place(x=240,y=210)
food2lipid.place(x=240,y=290)

food3name.place(x=335,y=50)
food3carbo.place(x=335,y=130)
food3protein.place(x=335,y=210)
food3lipid.place(x=335,y=290)

food4name.place(x=430,y=50)
food4carbo.place(x=430,y=130)
food4protein.place(x=430,y=210)
food4lipid.place(x=430,y=290)

food5name.place(x=525,y=50)
food5carbo.place(x=525,y=130)
food5protein.place(x=525,y=210)
food5lipid.place(x=525,y=290)

food6name.place(x=620,y=50)
food6carbo.place(x=620,y=130)
food6protein.place(x=620,y=210)
food6lipid.place(x=620,y=290)


nownamelabel_3=Label(frame3, text='음식').place(x=75,y=420)
nowcarbolabel_3=Label(frame3, text='탄수화물').place(x=225,y=420)
nowproteinlabel_3=Label(frame3, text='단백질').place(x=405,y=420)
nowlipidlabel_3=Label(frame3, text='지방').place(x=565,y=420)

nownameentry_3=Entry(frame3,textvariable=nowname).place(x=115,y=420,width=80)
nowcarboentry_3=Entry(frame3,textvariable=nowcarbo).place(x=285,y=420,width=80)
nowproteinentry_3=Entry(frame3,textvariable=nowprotein).place(x=455,y=420,width=80)
nowlipidentry_3=Entry(frame3,textvariable=nowlipid).place(x=605,y=420,width=80)



button3_2=Button(frame3,text='음식 추가',command=Addfood,width=10,height=3).place(x=230,y=500)
button3_3=Button(frame3,text='초기화',command=Iclear,width=10,height=3).place(x=360,y=500)
button3_4=Button(frame3,text='세이브',command=Save,width=10,height=3).place(x=490,y=500)
button3_5=Button(frame3,text='로드',command=Load,width=10,height=3).place(x=610,y=500)


btnToFrame1 = Button(frame3,
                             text="처음으로",
                             width=10,
                             height=3,
                             command=lambda:[openFrame(frame1)]).place(x=100,y=500)

openFrame(frame1)
w.mainloop()

# data[].attributes.body
이진혁님과 디스코드를 통해 대화하면서 내부 코드를 추가하였습니다.

# data[].attributes.attachment_link.readable_text
import math
from tkinter import *
from tkinter import ttk
from tkinter.messagebox import *


w=Tk()
w.title('다이어트 프로그램')
w.geometry('800x800')

frame1 = Frame(w,width = 800, height = 800)
frame2 = Frame(w,width = 800, height = 800)
frame3 = Frame(w,width = 800, height = 800)
frame4 = Frame(w,width = 800, height = 800)

frame1.grid(row=0, column=0, sticky="nsew")
frame2.grid(row=0, column=0, sticky="nsew")
frame3.grid(row=0, column=0, sticky="nsew")
frame4.grid(row=0, column=0, sticky="nsew")

age=IntVar()
weight=IntVar()
high=IntVar()

def openFrame(frame):
    frame.tkraise()

def Bmr():
    bmr=int((10*int(weight.get()))+(6.25*int(high.get()))-(5*int(age.get())))
    if ismale.get()==1 :
        bmr+=5

    elif ismale.get()==2 :
        bmr-=161

    label2_3text.config(text=bmr)

    amr=0
    if radio.get()==1:
        amr=int(bmr*1.2)

    elif radio.get()==2:
        amr=int(bmr*1.375)

    elif radio.get()==3:
        amr=int(bmr*1.55)

    elif radio.get()==4:
        amr=int (bmr*1.725)

    elif radio.get()==5:
        amr=int(bmr*1.9)

    carbohy=int(amr*0.5)
    protein=int(amr*0.3)
    lipid=int(amr*0.2)

    label2_2text.config(text=carbohy)
    label2_4text.config(text=protein)
    label2_5text.config(text=amr)
    label2_6text.config(text=lipid)
    b=label2_3text.cget('text')

    needcarbo.config(text='필요 탄수화물:\n'+str(label2_2text.cget('text')))
    needprotein.config(text='필요 단백질:\n'+str(label2_4text.cget('text')))
    needlipid.config(text='필요 지방:\n'+str(label2_6text.cget('text')))
    



#첫 화면에 들어가는 요소들

label1_1=Label(frame1, text='다이어트 프로그램').place(x=350,y=20)

label1_2=Label(frame1, text='사용자 나이').place(x=40,y=80)

entry1_1=Entry(frame1,textvariable=age).place(x=130,y=80)

label1_3=Label(frame1, text='체중').place(x=80,y=110)

entry1_2=Entry(frame1,textvariable=weight).place(x=130,y=110)

label1_4=Label(frame1, text='성별').place(x=565,y=80)

label1_5=Label(frame1, text='키').place(x=90,y=140)

entry1_3=Entry(frame1,textvariable=high).place(x=130,y=140)


ismale=IntVar()
radiobutton1=Radiobutton(frame1,text='남자',value=1,variable=ismale).place(x=600,y=80)
radiobutton2=Radiobutton(frame1,text='여자',value=2,variable=ismale).place(x=650,y=80)

radio=IntVar()
amr_radiobutton1=Radiobutton(frame1,text='거의 운동하지 않음',value=1,variable=radio).place(x=350,y=70)
amr_radiobutton2=Radiobutton(frame1,text='가벼운 운동',value=2,variable=radio).place(x=350,y=90)
amr_radiobutton3=Radiobutton(frame1,text='보통 수준',value=3,variable=radio).place(x=350,y=110)
amr_radiobutton4=Radiobutton(frame1,text='적극적으로 운동',value=4,variable=radio).place(x=350,y=130)
amr_radiobutton5=Radiobutton(frame1,text='매우 적극적으로 운동',value=5,variable=radio).place(x=350,y=150)




button1_1=Button(frame1,text='초기화')
button1_1.place(x=360,y=250)

btnToFrame2 = Button(frame1,
                             text="확인",
                             height=3,
                             width = 10 ,
                             command=lambda:[openFrame(frame2),Bmr()]).place(x=300,y=300)

btnToFrame2_1 = Button(frame1,
                             text="식단 불러오기",
                             width = 10,
                                height = 3,
                        
                             command=lambda:[openFrame(frame3)]).place(x=400,y=300)


#결과지에 들어가는 요소들

label2_1=Label(frame2, text='결과지').place(x=350,y=20)
label2_2=Label(frame2, text='탄수화물').place(x=50,y=100)
label2_3=Label(frame2, text='기초대사량').place(x=450,y=100)
label2_4=Label(frame2, text='단백질').place(x=50,y=200)
label2_5=Label(frame2, text='활동대사량').place(x=450,y=200)
label2_6=Label(frame2, text='지방').place(x=50,y=300)

label2_2text=Label(frame2, text='')
label2_2text.place(x=110,y=100)
label2_3text=Label(frame2, text='')
label2_3text.place(x=520,y=100)
label2_4text=Label(frame2, text='')
label2_4text.place(x=110,y=200)
label2_5text=Label(frame2, text='')
label2_5text.place(x=520,y=200)
label2_6text=Label(frame2, text='')
label2_6text.place(x=110,y=300)



btnToFrame3 = Button(frame2,
                             text="처음으로",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame1)]).place(x=300,y=400)

btnToFrame3_1 = Button(frame2,
                             text="식단 작성",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame3)]).place(x=400,y=400)


#식단에 들어가는 요소들

label_3_1=Label(frame3,text='식단').place(x=370,y=10)

foodname=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
needcarbo=Label(frame3,text='필요 탄수화물',borderwidth=2,width=13,height=5,relief='ridge')
needprotein=Label(frame3,text='필요 단백질',borderwidth=2,width=13,height=5,relief='ridge')
needlipid=Label(frame3,text='필요 지방',borderwidth=2,width=13,height=5,relief='ridge')

food1name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food1lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food2name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food2lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food3name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food3lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food4name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food4lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food5name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food5lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

food6name=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6carbo=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6protein=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
food6lipid=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')


foodname.place(x=50,y=50)
needcarbo.place(x=50,y=130)
needprotein.place(x=50,y=210)
needlipid.place(x=50,y=290)

food1name.place(x=145,y=50)
food1carbo.place(x=145,y=130)
food1protein.place(x=145,y=210)
food1lipid.place(x=145,y=290)

food2name.place(x=240,y=50)
food2carbo.place(x=240,y=130)
food2protein.place(x=240,y=210)
food2lipid.place(x=240,y=290)

food3name.place(x=335,y=50)
food3carbo.place(x=335,y=130)
food3protein.place(x=335,y=210)
food3lipid.place(x=335,y=290)

food4name.place(x=430,y=50)
food4carbo.place(x=430,y=130)
food4protein.place(x=430,y=210)
food4lipid.place(x=430,y=290)

food5name.place(x=525,y=50)
food5carbo.place(x=525,y=130)
food5protein.place(x=525,y=210)
food5lipid.place(x=525,y=290)

food6name.place(x=620,y=50)
food6carbo.place(x=620,y=130)
food6protein.place(x=620,y=210)
food6lipid.place(x=620,y=290)


label3_5=Label(frame3, text='음식').place(x=75,y=420)
label3_6=Label(frame3, text='탄수화물').place(x=225,y=420)
label3_7=Label(frame3, text='단백질').place(x=405,y=420)
label3_8=Label(frame3, text='지방').place(x=565,y=420)

entry3_1=Entry(frame3,textvariable=age).place(x=115,y=420,width=80)
entry3_2=Entry(frame3,textvariable=age).place(x=285,y=420,width=80)
entry3_3=Entry(frame3,textvariable=age).place(x=455,y=420,width=80)
entry3_4=Entry(frame3,textvariable=age).place(x=605,y=420,width=80)

button3_2=Button(frame3,text='음식 추가',width=10,height=3).place(x=230,y=500)
button3_3=Button(frame3,text='초기화',width=10,height=3).place(x=360,y=500)
button3_4=Button(frame3,text='세이브',width=10,height=3).place(x=490,y=500)
button3_5=Button(frame3,text='로드',width=10,height=3).place(x=610,y=500)


btnToFrame1 = Button(frame3,
                             text="처음으로",
                             width=10,
                             height=3,
                             command=lambda:[openFrame(frame1)]).place(x=100,y=500)

openFrame(frame1)
w.mainloop()

# data[].attributes.attachment_link.readable_text

import math
import tkinter
import tkinter.ttk
from tkinter import *
from tkinter import ttk
from tkinter.messagebox import *

def openFrame(frame):
    frame.tkraise()

w=Tk()
w.title('다이어트 프로그램')
w.geometry('800x800')

frame1 = Frame(w,width = 800, height = 800)
frame2 = Frame(w,width = 800, height = 800)
frame3 = Frame(w,width = 800, height = 800)
frame4 = Frame(w,width = 800, height = 800)

frame1.grid(row=0, column=0, sticky="nsew")
frame2.grid(row=0, column=0, sticky="nsew")
frame3.grid(row=0, column=0, sticky="nsew")
frame4.grid(row=0, column=0, sticky="nsew")

age=IntVar()
weight=IntVar()

def openFrame(frame):
    frame.tkraise()

def Bmr():
    bmr=math.floor((10*weight)+int(6.25*high)-(5*age))
    if ismale==1 :
        bmr+=5

    elif ismale==2 :
        bmr-=161

def Amr():
    if radio==1:
        amr==math.floor(Bmr*1.2)

    elif radio==2:
        amr==math.floor(Bmr*1.375)

    elif radio==3:
        amr==math.floor(Bmr*1.55)

    elif radio==4:
        amr==math.floor(Bmr*1.725)

    elif radio==5:
        amr==math.floor(Bmr*1.9)

carbohy=0
protein=0
lipid=0


#첫 화면에 들어가는 요소들

label1_1=Label(frame1, text='다이어트 프로그램').place(x=350,y=20)

label1_2=Label(frame1, text='사용자 나이').place(x=60,y=80)

entry1_1=Entry(frame1,textvariable=age).place(x=130,y=80)

label1_3=Label(frame1, text='체중').place(x=320,y=80)

entry1_2=Entry(frame1,textvariable=weight).place(x=350,y=80)

label1_4=Label(frame1, text='성별').place(x=550,y=80)


ismale=IntVar()
radiobutton1=Radiobutton(frame1,text='남자',value=1,variable=ismale).place(x=600,y=80)
radiobutton2=Radiobutton(frame1,text='여자',value=2,variable=ismale).place(x=650,y=80)

radio=IntVar()
amr_radiobutton1=Radiobutton(frame1,text='거의 운동하지 않음',value=1,variable=radio).place(x=600,y=120)
amr_radiobutton2=Radiobutton(frame1,text='가벼운 운동',value=2,variable=radio).place(x=600,y=140)
amr_radiobutton3=Radiobutton(frame1,text='보통 수준',value=3,variable=radio).place(x=600,y=160)
amr_radiobutton4=Radiobutton(frame1,text='적극적으로 운동',value=4,variable=radio).place(x=600,y=180)
amr_radiobutton5=Radiobutton(frame1,text='매우 적극적으로 운동',value=5,variable=radio).place(x=600,y=200)


button1_1=Button(frame1,text='초기화')
button1_1.place(x=360,y=150)

btnToFrame2 = Button(frame1,
                             text="확인",
                             height=3,
                             width = 10 ,
                             command=lambda:[openFrame(frame2)]).place(x=300,y=200)

btnToFrame2_1 = Button(frame1,
                             text="식단 불러오기",
                             width = 10,
                                height = 3,
                        
                             command=lambda:[openFrame(frame3)]).place(x=400,y=200)


#결과지에 들어가는 요소들

label2_1=Label(frame2, text='결과지').place(x=350,y=20)
label2_2=Label(frame2, text='탄수화물').place(x=50,y=100)
label2_3=Label(frame2, text='기초대사량').place(x=450,y=100)
label2_4=Label(frame2, text='단백질').place(x=50,y=200)
label2_5=Label(frame2, text='활동대사량').place(x=450,y=200)
label2_6=Label(frame2, text='지방').place(x=50,y=300)

label2_2text=Label(frame2, text=f'{carbohy}').place(x=110,y=100)
label2_3text=Label(frame2, text=f'{Bmr}').place(x=520,y=100)
label2_4text=Label(frame2, text=f'{protein}').place(x=110,y=200)
label2_5text=Label(frame2, text=f'{Amr}').place(x=520,y=200)
label2_6text=Label(frame2, text=f'{lipid}').place(x=110,y=300)



btnToFrame3 = Button(frame2,
                             text="처음으로",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame1)]).place(x=300,y=400)

btnToFrame3_1 = Button(frame2,
                             text="식단 작성",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame3)]).place(x=400,y=400)


#식단에 들어가는 요소들

label_3_1=Label(frame3,text='식단').place(x=370,y=10)

table3_01=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_02=Label(frame3,text='필요 탄수화물',borderwidth=2,width=13,height=5,relief='ridge')
table3_03=Label(frame3,text='필요 단백질',borderwidth=2,width=13,height=5,relief='ridge')
table3_04=Label(frame3,text='필요 지방',borderwidth=2,width=13,height=5,relief='ridge')

table3_11=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_12=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_13=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_14=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

table3_21=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_22=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_23=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_24=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

table3_31=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_32=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_33=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_34=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

table3_41=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_42=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_43=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_44=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

table3_51=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_52=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_53=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_54=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')

table3_61=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_62=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_63=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')
table3_64=Label(frame3,borderwidth=2,width=13,height=5,relief='ridge')


table3_01.place(x=50,y=50)
table3_02.place(x=50,y=130)
table3_03.place(x=50,y=210)
table3_04.place(x=50,y=290)

table3_11.place(x=145,y=50)
table3_12.place(x=145,y=130)
table3_13.place(x=145,y=210)
table3_14.place(x=145,y=290)

table3_21.place(x=240,y=50)
table3_22.place(x=240,y=130)
table3_23.place(x=240,y=210)
table3_24.place(x=240,y=290)

table3_31.place(x=335,y=50)
table3_32.place(x=335,y=130)
table3_33.place(x=335,y=210)
table3_34.place(x=335,y=290)

table3_41.place(x=430,y=50)
table3_42.place(x=430,y=130)
table3_43.place(x=430,y=210)
table3_44.place(x=430,y=290)

table3_51.place(x=525,y=50)
table3_52.place(x=525,y=130)
table3_53.place(x=525,y=210)
table3_54.place(x=525,y=290)

table3_61.place(x=620,y=50)
table3_62.place(x=620,y=130)
table3_63.place(x=620,y=210)
table3_64.place(x=620,y=290)


label3_5=Label(frame3, text='음식').place(x=75,y=420)
label3_6=Label(frame3, text='탄수화물').place(x=225,y=420)
label3_7=Label(frame3, text='단백질').place(x=405,y=420)
label3_8=Label(frame3, text='지방').place(x=565,y=420)

entry3_1=Entry(frame3,textvariable=age).place(x=115,y=420,width=80)
entry3_2=Entry(frame3,textvariable=age).place(x=285,y=420,width=80)
entry3_3=Entry(frame3,textvariable=age).place(x=455,y=420,width=80)
entry3_4=Entry(frame3,textvariable=age).place(x=605,y=420,width=80)

button3_2=Button(frame3,text='음식 추가',width=10,height=3).place(x=230,y=500)
button3_3=Button(frame3,text='초기화',width=10,height=3).place(x=360,y=500)
button3_4=Button(frame3,text='세이브',width=10,height=3).place(x=490,y=500)
button3_5=Button(frame3,text='로드',width=10,height=3).place(x=610,y=500)


btnToFrame1 = Button(frame3,
                             text="처음으로",
                             width=10,
                             height=3,
                             command=lambda:[openFrame(frame1)]).place(x=100,y=500)

openFrame(frame1)
w.mainloop()

    

# data[].attributes.attachment_link.readable_text
import math
from tkinter import *
from tkinter import ttk
from tkinter.messagebox import *

def openFrame(frame):
    frame.tkraise()

w=Tk()
w.title('다이어트 프로그램')
w.geometry('800x800')

frame1 = Frame(w,width = 800, height = 800)
frame2 = Frame(w,width = 800, height = 800)
frame3 = Frame(w,width = 800, height = 800)
frame4 = Frame(w,width = 800, height = 800)

frame1.grid(row=0, column=0, sticky="nsew")
frame2.grid(row=0, column=0, sticky="nsew")
frame3.grid(row=0, column=0, sticky="nsew")
frame4.grid(row=0, column=0, sticky="nsew")

age=IntVar()
weight=IntVar()

def openFrame(frame):
    frame.tkraise()

def Bmr():
    bmr=math.floor((10*weight)+int(6.25*high)-(5*age))
    if ismale==1 :
        bmr+=5

    elif ismale==2 :
        bmr-=161

def Amr():
    if radio==1:
        amr==math.floor(Bmr*1.2)

    elif radio==2:
        amr==math.floor(Bmr*1.375)

    elif radio==3:
        amr==math.floor(Bmr*1.55)

    elif radio==4:
        amr==math.floor(Bmr*1.725)

    elif radio==5:
        amr==math.floor(Bmr*1.9)

carbohy=math.floor(Amr*0.5)
protein=math.floor(Amr*0.3)
lipid=math.floor(Amr*0.2)



#첫 화면에 들어가는 요소들

label1_1=Label(frame1, text='다이어트 프로그램').place(x=350,y=20)

label1_2=Label(frame1, text='사용자 나이').place(x=60,y=80)

entry1_1=Entry(frame1,textvariable=age).place(x=130,y=80)

label1_3=Label(frame1, text='체중').place(x=320,y=80)

entry1_2=Entry(frame1,textvariable=weight).place(x=350,y=80)

label1_4=Label(frame1, text='성별').place(x=550,y=80)


ismale=IntVar()
radiobutton1=Radiobutton(frame1,text='남자',value=1,variable=ismale).place(x=600,y=80)
radiobutton2=Radiobutton(frame1,text='여자',value=2,variable=ismale).place(x=650,y=80)

radio=IntVar()
amr_radiobutton1=Radiobutton(frame1,text='거의 운동하지 않음',value=1,variable=radio).place(x=600,y=120)
amr_radiobutton2=Radiobutton(frame1,text='가벼운 운동',value=2,variable=radio).place(x=600,y=140)
amr_radiobutton3=Radiobutton(frame1,text='보통 수준',value=3,variable=radio).place(x=600,y=160)
amr_radiobutton4=Radiobutton(frame1,text='적극적으로 운동',value=4,variable=radio).place(x=600,y=180)
amr_radiobutton5=Radiobutton(frame1,text='매우 적극적으로 운동',value=5,variable=radio).place(x=600,y=200)




button1_1=Button(frame1,text='초기화')
button1_1.place(x=360,y=150)

btnToFrame2 = Button(frame1,
                             text="확인",
                             height=3,
                             width = 10 ,
                             command=lambda:[openFrame(frame2)]).place(x=300,y=200)

btnToFrame2_1 = Button(frame1,
                             text="식단 불러오기",
                             width = 10,
                                height = 3,
                        
                             command=lambda:[openFrame(frame3)]).place(x=400,y=200)


#결과지에 들어가는 요소들

label2_1=Label(frame2, text='결과지').place(x=350,y=20)
label2_2=Label(frame2, text='탄수화물').place(x=50,y=100)
label2_3=Label(frame2, text='기초대사량').place(x=450,y=100)
label2_4=Label(frame2, text='단백질').place(x=50,y=200)
label2_5=Label(frame2, text='활동대사량').place(x=450,y=200)
label2_6=Label(frame2, text='지방').place(x=50,y=300)

label2_2text=Label(frame2, text=f'{carbohy}').place(x=110,y=100)
label2_3text=Label(frame2, text=f'{Bmr}').place(x=520,y=100)
label2_4text=Label(frame2, text=f'{protein}').place(x=110,y=200)
label2_5text=Label(frame2, text=f'{Amr}').place(x=520,y=200)
label2_6text=Label(frame2, text=f'{lipid}').place(x=110,y=300)



btnToFrame3 = Button(frame2,
                             text="처음으로",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame1)]).place(x=300,y=400)

btnToFrame3_1 = Button(frame2,
                             text="식단 작성",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame3)]).place(x=400,y=400)


#식단에 들어가는 요소들

label3_1=Label(frame3, text='식단').place(x=350,y=20)
label3_2=Label(frame3, text='필요 탄수화물').place(x=10,y=150)
label3_3=Label(frame3, text='필요 단백질').place(x=10,y=250)
label3_4=Label(frame3, text='필요 지방').place(x=10,y=350)

button3_1=Button(frame3,text='음식 추가').place(x=400,y=450)
button3_2=Button(frame3,text='초기화').place(x=300,y=450)

btnToFrame1 = Button(frame3,
                             text="처음으로",
                             command=lambda:[openFrame(frame1)]).place(x=350,y=500)

openFrame(frame1)
w.mainloop()

# data[].attributes.attachment_link.readable_text
from tkinter import *
from tkinter.messagebox import *

def openFrame(frame):
    frame.tkraise()

w=Tk()
w.title('다이어트 프로그램')
w.geometry('800x800')

frame1 = Frame(w,width = 800, height = 800)
frame2 = Frame(w,width = 800, height = 800)
frame3 = Frame(w,width = 800, height = 800)
frame4 = Frame(w,width = 800, height = 800)

frame1.grid(row=0, column=0, sticky="nsew")
frame2.grid(row=0, column=0, sticky="nsew")
frame3.grid(row=0, column=0, sticky="nsew")
frame4.grid(row=0, column=0, sticky="nsew")

def openFrame(frame):
    frame.tkraise()
   





#첫 화면에 들어가는 요소들

label1_1=Label(frame1, text='다이어트 프로그램').place(x=350,y=20)

label1_2=Label(frame1, text='사용자 나이').place(x=60,y=80)

entry1_1=Entry(frame1).place(x=130,y=80)

label1_3=Label(frame1, text='체중').place(x=320,y=80)

entry1_2=Entry(frame1).place(x=350,y=80)

label1_4=Label(frame1, text='성별').place(x=550,y=80)

radio_value=IntVar()
radiobutton1=Radiobutton(frame1,text='남자',value=1,variable=radio_value).place(x=600,y=80)
radiobutton2=Radiobutton(frame1,text='여자',value=2,variable=radio_value).place(x=650,y=80)

button1_1=Button(frame1,text='초기화').place(x=360,y=150)

btnToFrame2 = Button(frame1,
                             text="확인",
                             height=3,
                             width = 10 ,
                             command=lambda:[openFrame(frame2)]).place(x=300,y=200)

btnToFrame2_1 = Button(frame1,
                             text="식단 불러오기",
                             width = 10,
                                height = 3,
                        
                             command=lambda:[openFrame(frame3)]).place(x=400,y=200)


#결과지에 들어가는 요소들

label2_1=Label(frame2, text='결과지').place(x=350,y=20)
label2_2=Label(frame2, text='탄수화물').place(x=50,y=100)
label2_3=Label(frame2, text='기초대사량').place(x=450,y=100)
label2_4=Label(frame2, text='단백질').place(x=50,y=200)
label2_5=Label(frame2, text='활동대사량').place(x=450,y=200)
label2_6=Label(frame2, text='지방').place(x=50,y=300)

btnToFrame3 = Button(frame2,
                             text="처음으로",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame1)]).place(x=300,y=400)

btnToFrame3_1 = Button(frame2,
                             text="식단 작성",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame3)]).place(x=400,y=400)


#식단에 들어가는 요소들

label3_1=Label(frame3, text='식단').place(x=350,y=20)
label3_2=Label(frame3, text='필요 탄수화물').place(x=10,y=150)
label3_3=Label(frame3, text='필요 단백질').place(x=10,y=250)
label3_4=Label(frame3, text='필요 지방').place(x=10,y=350)

button3_1=Button(frame3,text='음식 추가').place(x=400,y=450)
button3_2=Button(frame3,text='초기화').place(x=300,y=450)

btnToFrame1 = Button(frame3,
                             text="처음으로",
                             command=lambda:[openFrame(frame1)]).place(x=350,y=500)

openFrame(frame3)
w.mainloop()

# data[].attributes.body
심호현님과 디스코드로 대화하면서 기본 레이아웃 배치했습니다

# data[].attributes.headline
프레임 나누고 레이블 배치

# data[].attributes.subject
프레임 나누고 레이블 배치

# data[].attributes.body
레이아웃 구성하는 중입니다

# data[].attributes.attachment_link.readable_text
from tkinter import *
from tkinter.messagebox import *

def openFrame(frame):
    frame.tkraise()

w=Tk()
w.title('다이어트 프로그램')
w.geometry('800x800')

frame1 = Frame(w)
frame2 = Frame(w)
frame3 = Frame(w)
frame4 = Frame(w)

frame1.grid(row=0, column=0, sticky="nsew")
frame2.grid(row=0, column=0, sticky="nsew")
frame3.grid(row=0, column=0, sticky="nsew")
frame4.grid(row=0, column=0, sticky="nsew")

def openFrame(frame):
    frame.tkraise()
   
btnToFrame1 = Button(frame3,
                             text="처음으로",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame1)]).pack(side='bottom')

btnToFrame2 = Button(frame1,
                             text="확인",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame2)]).pack(side='bottom')

btnToFrame2_1 = Button(frame1,
                             text="식단 불러오기",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame3)]).pack(side='bottom')

btnToFrame3 = Button(frame2,
                             text="처음으로",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame1)]).pack(side='bottom')

btnToFrame3_1 = Button(frame2,
                             text="식단 작성",
                             padx=10,
                             pady=10,
                             command=lambda:[openFrame(frame3)]).pack(side='bottom')

#첫 화면에 들어가는 요소들

label1_1=Label(frame1, text='다이어트 프로그램').pack(side='top')

label1_2=Label(frame1, text='사용자 나이').pack(side='left')

entry1_1=Entry(frame1).pack(side='left')

label1_3=Label(frame1, text='체중').pack(side='left')

entry1_2=Entry(frame1).pack(side='left')

label1_4=Label(frame1, text='성별').pack(side='left')

radio_value=IntVar()
radiobutton1=Radiobutton(frame1,text='남자',value=1,variable=radio_value).pack(side='left')
radiobutton2=Radiobutton(frame1,text='여자',value=2,variable=radio_value).pack(side='left')

button1_1=Button(frame1,text='초기화').pack(side='bottom')


#결과지에 들어가는 요소들

label2_1=Label(frame2, text='결과지').pack(side='top')
label2_2=Label(frame2, text='탄수화물').pack(side='left')
label2_3=Label(frame2, text='기초대사량').pack(side='left')
label2_4=Label(frame2, text='단백질').pack(side='left')
label2_5=Label(frame2, text='활동대사량').pack(side='left')
label2_6=Label(frame2, text='지방').pack(side='left')


#식단에 들어가는 요소들

label3_1=Label(frame3, text='식단').pack(side='top')
label3_2=Label(frame3, text='필요 탄수화물').pack()
label3_3=Label(frame3, text='필요 단백질').pack()
label3_4=Label(frame3, text='필요 지방').pack()

button3_1=Button(frame3,text='음식 추가').pack(side='bottom')
button3_2=Button(frame3,text='초기화').pack(side='bottom')

openFrame(frame1)
w.mainloop()




# data[].attributes.body
https://docs.google.com/presentation/d/1QITHeHsdQmQoT7ysSTz1XSgW_ROrtkoyb4SK6HVMAJI/edit#slide=id.p

# data[].attributes.attachment_link.title
알고리즘 다이어트 프로그램

# data[].attributes.headline
1. 강의실 상황 조회 + 메모장

# data[].attributes.subject
1. 강의실 상황 조회 + 메모장

# data[].attributes.body
ex) 조회 : 218호 목요일 4~5시(몇교시)

.

★수업 중이면 과목명 표시

★비어 있으면 빈 강의실이라고 안내

​

ex) 218호 메모장

​

7, 8번 컴퓨터 고장

16번 자리 의자 부서졌어요

26번 자리에 OOO님 usb 가져가세요

# data[].attributes.headline
2. 캘린더에 부가 기능 추가​

# data[].attributes.subject
2. 캘린더에 부가 기능 추가​

# data[].attributes.body
ex) 민수랑 오후 4시에 만나기로 함

​

캘린더에서 지정된 사람에게 전화 / 문자 할 수 있게 연결

​

가능하다면 설정한 특정 시간에 알람 기능

​

+ 작은 메모

# data[].attributes.body
키 / 몸무게 - BMI 수치

​

몇 가지 체크리스트(질병, 심리상태, 이런저런) 항목 개수에 따라 정도 보여주기

​

등등

​

# data[].attributes.headline
4. 개인정보 보호/보관

# data[].attributes.subject
4. 개인정보 보호/보관

# data[].attributes.body
각 사이트별

아이디, 비밀번호 보관 기능

​

정보에 접근할 때 별도 비밀번호 입력 절차 추가

# data[].attributes.headline
5. 동영상이나 사진 넣을 수 있는 다이어리 

# data[].attributes.subject
5. 동영상이나 사진 넣을 수 있는 다이어리 

# data[].attributes.body
다이어리에 텍스트 뿐만 아닌 추억이 있는 사진 혹은 동영상등을 올려 쉽게 과거들을 떠올릴 수 있게 만드는 프로그램

# data[].attributes.body
나이, 체중, 성별을 기반으로 기초대사량과 활동대사량을 구하고 그것을 기반으로 필요 탄수화물,단백질,지방을 구함