I'm fairly new to the gardening world and I've started to have a fair amount of plants indoors on my window sill. A while back though, I discovered a flowering plant that was not a species of flower I purchased seeds for. It grows yellow flowers that drop its petals very quickly and leave these exposed seed pods on its stem. The seeds it drops vary from a dusty dark green color to pale gray/white and the little protruding "thorns" from the seeds are quite sharp when dry. I've tried my hardest to find any sort of resemblance to other common yellow flowers but I haven't had much luck on my own. I'm located in Texas, so hopefully that might help!
What you have here is a species of Bidens, commonly known as Beggarticks.
Wikipedia: "Bidens is a genus of flowering plants in the aster family, Asteraceae. The common names beggarticks, black jack, burr marigolds, cobbler's pegs, Spanish needles, stickseeds, tickseeds and tickseed sunflowers refer to the fruits of the plants, most of which are bristly and barbed, with two sharp pappi at the end. The generic name refers to the same character; Bidens comes from the Latin bis ("two") and dens ("tooth")."
Being in Texas, it's likely they're Bidens aristosa, or Bearded beggarticks.