print("Hello World \nou\nOlá Mundo\n") # Alternativa
eng = 'Hello World'
ou = 'ou'
pt = 'Olá Mundo'
frase = eng+'\n'+ou+'\n'+pt
print(frase)
# Usar Tkinter
from tkinter import *
import tkinter.messagebox
root = Tk()
def mentexing():
tkinter.messagebox.showinfo("Hello World!", " Abriu o butão do Hello World")
def mentexpt ():
tkinter.messagebox.showinfo("Olá Mundo!", " Abriu o butão do Olá Mundo")
def fechar():
exit()
# título
root.title("Olá Mundo")
root.resizable(False,False)
# Tamanho
root.geometry("300x300")
# Texto Português
textpt = Label(text="Olá Mundo!",font=("arial",'12','bold'))
textpt.place(relx=0.35,rely=0.15)
# Texto Inglês
texteng = Label(text="Hello World!",font=("arial",'12','bold'))
texteng.place(relx=0.35,rely=0.3)
butaoingle = Button(text='Hello World',font=("arial",'12','bold'),fg='blue',
bg='white',command=mentexing)
butaoingle.place(relx=0.1,rely=0.5)
butaopt = Button(text='Olá Mundo',font=("arial",'12','bold'),fg='white',
bg='blue',command=mentexpt)
butaopt.place(relx=0.5,rely=0.5)
butaoquint = Button(text='Exit',font=("arial",'12','bold'),fg='white',
bg='black',command=fechar)
butaoquint.place(relx=0.45,rely=0.7)
root.mainloop()