It ain't quite that simple as you will find out if you take chemistry further, but in general, if an element has a low ionisation potential it will be a reactive metal - because its positive ion forms easily. If it has a high electron affinity it will be a reactive nonmetal, because its negative ion forms easily.
Gold has a very high ionisation potential and is a very unreactive metal, as you might expect. But it also has a very high electron affinity yet is most definitely a metal! That's an example you may study later, but just as a taste of the delights (or horrors) in store, although a metal its chemistry has many similarities to that of iodine!