We get systems in all the time with power cords that are partially broken or have been taped up with electrical tape. While this might make the cord work again temporarily, you run a great risk of severely damaging your system. When the AC adapter cord has intermittent shorts, it can cause an overvoltage situation that will permanently damage the motherboard.
A new original manufacturer AC adapter usually only costs $25-30 while a motherboard replacement is going to run in excess of $200 for most systems. If the connector on the end of your power cord (the side that plugs into the computer) appears bent at all or you need to wiggle the cord to make it charge, it is time to replace it before you damage your computer.
Put away the electrical tape and buy a new original AC adapter.