why does a computer need a floopy drive as well as a hard drive

It doesn't . None of my computers have floppy drives.

Floppy drives were used in ancient times to have portable data input/export.

These days we use CD/DVD drives and flash drives for portable data devices.

=)

You're correct! In modern computer systems, floppy drives are rarely used or even found on many computers. However, in the past, floppy drives were commonly used alongside hard drives for various reasons.

One of the main reasons was that floppy drives provided a portable and accessible means of transferring and sharing data. They allowed users to store files or programs on floppy disks, which could then be easily inserted and removed from the floppy drive on different computers. This made it convenient for users to exchange data without relying on network connections or other more complex methods of file transfer.

Another reason was that floppy drives were often used as boot devices. Before the introduction of bootable hard drives, floppy disks were the primary method of booting up a computer and accessing the operating system. Users would insert a bootable floppy disk into the floppy drive to start up their computer.

However, with the advancement of technology and the introduction of more reliable and efficient storage options, floppy drives were gradually phased out. CD/DVD drives and USB flash drives became more popular for portable data transfer, and hard drives became the standard for storing and booting up operating systems.

So, while floppy drives were once an essential component of computer systems, they have been superseded by more modern and efficient alternatives.