
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
Python entorno visual
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
Python entorno visual
# Configurar la ventana
ventana = tk.Tk()
ventana.title("Calculadora de Suma")
ventana.geometry("280x160")
5
Python entorno visual
# Variables para los números y el resultado
entry_num1 = tk.Entry(ventana)
entry_num2 = tk.Entry(ventana)
resultado = tk.StringVar()
6
Python entorno visual
# 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
Python entorno visual
# 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
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
4 questions
ILUSTRASI
Presentation
•
11th Grade
Popular Resources on Wayground
20 questions
STAAR Review Quiz #3
Quiz
•
8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
6 questions
Marshmallow Farm Quiz
Quiz
•
2nd - 5th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
12 questions
What makes Nebraska's government unique?
Quiz
•
4th - 5th Grade
Discover more resources for Computers
20 questions
Grammar
Quiz
•
9th - 12th Grade
31 questions
Easter Trivia
Quiz
•
KG - 12th Grade
16 questions
Circles - Equations, Central & Inscribed Angles
Quiz
•
9th - 12th Grade
46 questions
Unit 4 Geosphere Test Review
Quiz
•
9th - 12th Grade
25 questions
Early Cold War Quizziz
Quiz
•
11th Grade
10 questions
Climate Change and Its Impact
Interactive video
•
9th - 12th Grade
35 questions
Venn Diagrams, Theoretical, & Experimental Review
Quiz
•
9th - 12th Grade
20 questions
Food Chains and Food Webs
Quiz
•
7th - 12th Grade