-1

Example

ballEntry = Entry(window,width=10, textvariable=total)
TenisballlEntry = Entry(window,width=10, textvariable=total)


total =  ballEntry.get() + TenisballlEntry.get()

I don't know how to take the input from the what the users enter, and then sort of "turn them" into an integer that the program can understand so they can be added?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Drafter
  • 21
  • 6
  • This is too broad/vague. You'll probably be better served by a tutorial, guide, or some documentation. – AMC Dec 30 '19 at 02:05

1 Answers1

1

if you want numerical input from the user then just try converting those to integers or floats before adding them.

Like this:

e1 = int(ballEntry.get())
e2 = int(TenisballlEntry.get())

total = e1 + e2

Or:

e1 = float(ballEntry.get())
e2 = float(TenisballlEntry.get())

total = e1 + e2
DaniyalAhmadSE
  • 807
  • 11
  • 20