I have done a program with 2 apis that show forecast and city info of diffrent citys that the user choose. But now I need help cause Im stuck on how to get my make\_request, make\_requests and city\_data to print the info in the GUI! I think I need a Label but I dont know how to do it, any tips/help would be great! Thanks:

```
from tkinter import *
import requests
import json

    class Application(Frame):

        def __init__(self, master=None):
            Frame.__init__(self, master)
            self.root = master
            self.pack()
            self.create_widgets()

        def create_widgets(self):
            self.var = StringVar()
            self.countryImage = Label(self, textvariable=self.var, text=self.var.get)
            self.countryImage.pack(side="top")

            self.var.set("The Tripinator" '\n' "Welcome to Tripinator!" '\n' "To get forecast, enter a country and city then press forecast." '\n'"To get tips, JUST enter city then choose beetween Eat / Drink / Party / Shop / Outdoor!")
            self.var.get()

            self.enterCountry = StringVar()
            self.inputCountry = Entry(self, textvariable=self.enterCountry)
            self.inputCountry.pack(side="left")

            self.enterCountry.set("Enter Country")
            self.enterCountry.get()
            self.inputCountry.focus_set()

            self.v = StringVar()
            self.e = Entry(self, textvariable=self.v)
            self.e.pack(side="left")

            self.v.set("Enter City")
            self.v.get()
            self.e.focus_set()

            self.preCategory = StringVar()
            self.enterCategory = Entry(self, textvariable=self.preCategory)
            self.enterCategory.pack(side="left")

            self.preCategory.set("Eat/Drink/Party/Shop/Outdoor")
            self.preCategory.get()
            self.enterCategory.focus_set()

            self.preDay = StringVar()
            self.enterDay = Entry(self, textvariable=self.preDay)
            self.enterDay.pack(side="left")

            self.preDay.set("Enter day")
            self.preDay.get()
            self.enterDay.focus_set()

            self.preTime = StringVar()
            self.enterTime = Entry(self, textvariable=self.preTime)
            self.enterTime.pack(side="left")

            self.preTime.set("morning/midday/evening/night/latenight")
            self.preTime.get()
            self.enterTime.focus_set()

            # Knappen utlöser funktionen make_request som skriver ut väderprognosen
            self.butn = Button(self)
            self.butn["text"] = "Forecast"
            self.butn["command"] = self.make_request
            self.butn.pack(side="left")

            self.b = Button(self)
            self.b["text"] = "City info"
            self.b["command"] = self.make_requests
            self.b.pack(side="left")

            self.getButton = Button(self)
            self.getButton["text"] = "City list"
            self.getButton["command"] = self.city_data
            self.getButton.pack(side="left")

            self.QUIT = Button(self, text="QUIT", command=self.root.destroy)
            self.QUIT.pack(side="left")

        def make_request(self):
            r = requests.get("http://api.wunderground.com/api/61418d709872f773/forecast/q/" + self.enterCountry.get() +"/" + self.v.get() +".json")
            data = r.json()
            for day in data['forecast']['simpleforecast']['forecastday']:
                print (day['date']['weekday'] + ":")
                print ("Conditions: ", day['conditions'])
                print ("High: ", day['high']['celsius'] + "C", "Low: ", day['low']['celsius'] + "C", '\n')
            return data

        def make_requests(self):
            c = requests.get("http://api.v1.trippinin.com/City/" + self.v.get() + "/" + self.preCategory.get() + "?day=" + self.preDay.get() +"&time=" + self.preTime.get() + "&limit=10& offset=2&KEY=58ffb98334528b72937ce3390c0de2b7")
            datan = c.json()
            for info in datan['response']['data']:
                print ("Place:", info['title'])
                print ("Category:", info['maincategory'])
                print ("Likes:", info['totallikes'], '\n')
            return datan

        def city_data(self):
            cityList = requests.get ("http://api.v1.trippinin.com/citylist?key=58ffb98334528b72937ce3390c0de2b7")
            cityData = cityList.json()
            for cityInfo in cityData['response']['data']:
                print ("City:", cityInfo['title'])
                print ("Places we cover:", cityInfo['totalPlaces'], '\n')
            return cityData

    rot = Tk()
    rot.geometry("900x650+200+50")
    rot.title("The Tripinator")

    app = Application(master=rot)
    app.mainloop()

```