
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
4 questions
ILUSTRASI
Presentation
•
11th Grade
8 questions
💻 Unit 11 1990s & 2000s Notes pt.2
Presentation
•
11th Grade
7 questions
EMT I Exam 1 Review
Presentation
•
11th - 12th Grade
6 questions
Crime Scene Reconstruction and Evidence Collection
Presentation
•
12th Grade
9 questions
tanaman
Presentation
•
KG
6 questions
Bush 9/11 Speech
Presentation
•
11th Grade
7 questions
presentasi quizizz
Presentation
•
KG
6 questions
Respiration System
Presentation
•
11th - 12th Grade
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