I am planning to buy an xbox 360 console. my budget permits me acess to only the 4 GB one which needs extra space for many games' install. I have an external HDD of size 40GB. My question is can I divide it into partitions such thet I can use one for gaming on xbox and the other for data storage.
Sure you can partition it, but you'll only have access to only one of the partitions when connected. Keep in mind though that the 360 will only recognize external drives formatted using FAT32 at 2TB max.
Just make sure you partition using a computer or other device. If configured from the 360, it will attempt to use all the available space on the drive. It won't allow you to create those partitions.