this is the way i did it:
E US/3.5 mm crochet hook
Row 1: sc in 2nd ch from hook, sc in next ch, hdc in next 5 ch, sc in last 2 ch. (9 sts)
Row 2: ch 1, turn, sc in next 3 sts, hdc in next 3 sts, sc in next 3 sts
Row 3: ch 1, turn, sc in next 2 sts, hdc in next 5 sts, sc in next 2 sts
Rows 4-15: repeat Rows 2 and 3 six times more
Row 16: repeat Row 2 once more
Fold the rectangle in half so that Row 16 is matched up with the starting chain. Sl st through both layers (Row 16 and the starting chain) to form a tube. Fasten off, leaving a long yarn end to close the ends of the pumpkin.
To form the bottom of the pumpkin, use a yarn needle and the long yarn end to gather around one of the open edges with running stitch. Draw the stitches tightly together, then knot the yarn to keep the end closed.
Make sure the yarn end and needle are on the outside of the base of the pumpkin, then stuff the pumpkin through the top opening. Pass the yarn end up through the middle of the pumpkin to the open edge, then use a running stitch around the stitches of the top edge. Draw up the stitches around the top to close it. Knot the yarn in this position.
For the stalk I cut a green piece of yarn about 12 inches long, folded it in half, and made a slip knot on the folded end to make a loop. Using a yarn needle I brought the long tails of the slip knot through the top center of the pumpkin and out through the bottom center (loop on top for stalk) and tied a knot with the tails at the bottom of the pumpkin and weaved in ends.
To make them into a garland, I chained 20, attached the stalk of the pumpkin with a slip stitch, and chained 20, attached a pumpkin and so on.