I have been working with numbers in tkinter using operators but I'm unsure on how to process the input and using maths on them. I also wouldn't mind knowing how to use words either for future reference. Reply if you know anything.
a general Tkinter program to enter two data items
process the data and display the result
tested with Python27/33
import Tkinter as tk
import tkinter as tk
in this case the data items are floating point numbers
that are simply added in the example data process
the result is displayed in a label
x = float(enter1.get())
y = float(enter2.get())
# the process step, customize to your needs ...
s = str(x + y)
# display the result
label3.config(text='Enter numeric values for x and y')
# create the root window
root = tk.Tk()
# create all the components/widgets
label1 = tk.Label(root, text='Enter number x:', width=28)
enter1 = tk.Entry(root, bg='yellow')
label2 = tk.Label(root, text='Enter number y:')
enter2 = tk.Entry(root, bg='yellow')
button1 = tk.Button(root, text='Add the numbers', command=calculate)
# the result label
label3 = tk.Label(root, text='', bg='green')
# pack widgets vertically in the root window in that order
# cursor in enter1
# return key in enter1 sets focus to enter2
# start the event loop
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...