Answer:
This is because of the lone pairs present in the molecules. Bond and lone pairs of electrons have maximum mutual repulsion but lone pairs of electrons have a stronger mutual repulsion than bond pairs thus creating a bent or v shape in water and trigonal pyramidal shape in ammonia.
There are 4 pairs of electrons in water. if all were bond pairs then the bond angle would be 109.5 but because of the the two lone pairs you take away 2.5 per lone pair from 109.5. Same goes to ammonia if they were all bond pairs then it would be 109.5 but because of the one lone pair it becomes 107.
Step-by-step explanation: