First we can find the total volume of the gumball machine. It's composed of a sphere and a cylinder. Luckily, we have volume equations for both.
V_sphere = (4/3)pi*r^3, where r is radius
V_cylinder = h*pi*r^2, where h is height and r is radius.
We can use the information from the question to fill in the equations. Recall that the radius = diameter/2.
V_sphere = (4/3)pi*(12in/2)^3
V_sphere = 904.32 in^3
V_cylinder = 7in*pi*(6in/2)^2
V_cylinder = 197.82 in^3
The total volume of the gumball machine, V_machine = V_sphere + V_cylinder = 1102.14 in^3
Now we can find out how many gumballs will fit in V_machine. They give us some information: since the gumballs will leave some empty spacing, only 75% of the total volume can be filled with gumballs (instead of the dead space from the gaps)
So V_tot_gumballs = 0.75(V_machine) = 826.605 in^3 = number_gumballs*volume_1_gumball
Let's find the volume of a single gumball, using the sphere volume equation shown above.
V_1_gumball = (4/3)*pi*(1in/2)^3
V_1_gumball = 0.523 in^3
V_tot_gumballs = number_gumballs*V_1_gumball
826.605 in^3 = number_gumballs*0.523 in^3
number_gumballs = 1,580.51
I imagine fractional gumballs won't be put in the machine, so we can round down to a whole number.
The machine can fit 1580 gumballs.