วันพุธที่ 14 เมษายน พ.ศ. 2564

Make the multiplication table application by Python.

Download Python from :  https://www.python.org/downloads/

Download pycharm community from https://www.jetbrains.com/pycharm/download/#section=windows


This is the code of my calculator for any number of multiplication tables.


import tkinter as tk


def show_output():
number = int(number_input.get())

output = ''
for i in range(1,26):
output += str(number) + ' x ' + str(i)
output += ' = ' + str(number * i) + '\n'

output_label.configure(text=output)



window = tk.Tk()
window.title('Multiply list formula')
window.minsize(width=360,height=440)

title_label = tk.Label(master=window, text ='Number')
title_label.pack(pady=20)

number_input = tk.Entry(master=window, width=22)
number_input.pack()

go_button = tk.Button(
master=window, text='is',
command=show_output, width=20 , height = 2
)
go_button.pack(pady = 20)

output_label = tk.Label(master=window)
output_label.pack(pady = 20)



window.mainloop()



ไม่มีความคิดเห็น:

แสดงความคิดเห็น

Welcome.

SolidWorks Drawing Template Show Errors Properties Fields like $PRP:"ANCDEXXX"

 Good morning of 1/14/2026 to my readers. Today, I found a problem on my drawing template about property text in drawing template fields. I ...