Deep Learning and Machine Learning is the fastest growing technology that has a wide range of applications, one of which is the medical field. The cardiac attack has become a global alarming issue, that is leading to 17.9 million deaths worldwide every year. There is a necessity of predicting the cardiac attack at the earlier phase to avoid further growth in the death rate due to cardiac attacks. There are many techniques proposed so far in prediction of the heart stroke. Yet, many deaths take place every year globally. The major contribution of this research work is to find the best approach, that can give better accuracy to predict the cardiac attack. In this research work, we used both machine learning and the deep learning approach, to predict heart stroke with the best accuracy. This research work is conducted on different machine learning models such as, the support vector machine, the decision tree algorithm, the random forest algorithm, and the logistic regression, the study also includes the implementation of the dense artificial neural network to find an appropriate model that can predict the heart stroke with the best accuracy. In this research work, the deep learning approach gave 93.80 percent accuracy. The accuracy acquired by the machine learning models posed a problem with low accuracy, the accuracy can be improved in future by working with the hyperparameters. The results ac-quired by each model are presented in this study.