
Python entorno visual
Presentation
•
Computers
•
11th Grade
•
Practice Problem
•
Hard
Alvaro Mendoza
Used 9+ times
FREE Resource
7 Slides • 0 Questions
1

Interfaces gráficas en Python con Tkinter - Adictos al trabajo
You can open this webpage in a new tab.
2
3
import tkinter as tk
# Función para calcular la suma
def sumar():
num1 = float(entry_num1.get())
num2 = float(entry_num2.get())
resultado.set(num1 + num2)
4
# Configurar la ventana
ventana = tk.Tk()
ventana.title("Calculadora de Suma")
ventana.geometry("280x160")
5
# Variables para los números y el resultado
entry_num1 = tk.Entry(ventana)
entry_num2 = tk.Entry(ventana)
resultado = tk.StringVar()
6
# Configurar los elementos en la ventana
label_num1 = tk.Label(ventana, text="Numero 1:")
label_num2 = tk.Label(ventana, text="Numero 2:")
label_titulo = tk.Label(ventana, text="Programa para sumar")
label_resultado = tk.Label(ventana, text="Resultado:")
label_mostrar_resultado = tk.Label(ventana, textvariable=resultado)
boton_sumar = tk.Button(ventana, text="Sumar", command=sumar)
7
# Colocar los elementos en la ventana
label_titulo.grid(row=1, column=0)
label_num1.grid(row=2, column=0)
label_num2.grid(row=3, column=0)
label_resultado.grid(row=2, column=0)
entry_num1.grid(row=2, column=1)
entry_num2.grid(row=3, column=1)
label_mostrar_resultado.grid(row=4, column=1)
boton_sumar.grid(row=5, column=0, columnspan=2)
ventana.mainloop()

Interfaces gráficas en Python con Tkinter - Adictos al trabajo
You can open this webpage in a new tab.
Show answer
Auto Play
Slide 1 / 7
SLIDE
Similar Resources on Wayground
7 questions
Media Sosial
Presentation
•
10th Grade
4 questions
#2 App Inventor project ClickImage
Presentation
•
12th Grade
5 questions
Rancangan Kemasandan Label Produk Nonpangan
Presentation
•
11th Grade
7 questions
Purpose and Structure of DNA
Presentation
•
10th Grade
8 questions
PERSIAPAN UAS PKK
Presentation
•
12th Grade
9 questions
20. Tuesday: 11/17 ~ Topic 6 Composition of Transformation 2
Presentation
•
10th Grade
10 questions
Creating your APB Research Team
Presentation
•
11th - 12th Grade
6 questions
"Mari berkenalan"
Presentation
•
KG
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade