The latest advances in science and technology have resulted in great advances in artificial intelligence (AI), including the creation of chatbots. Chatbots simulate human conversation and allow humans to ask questions and receive answers based on a large volume of electronically stored information. Faculties of universities around the world are trying to come to grips with the availability of AI tools, such as chatbots, and are debating the ethical and moral questions surrounding the use of AI in education. This paper presents the results of a study which intended to answer three research questions. RQ1: how familiar are students with AI and tools that utilize it? RQ2: are students aware of the ethical issues involving AI and are they familiar with the university’s policies regarding the use of AI? RQ3: can ChatGPT be used as an efficient tool to teach science majors to code in Python? In this project, a chatbot was used to instruct students on the use of the Python programming language. Introductory college physics students were tasked with using an AI chatbot, ChatGPT (chat generative pre-trained transformer), to learn how to effectively code in the coding program, Python. Before using ChatGPT to code, the students were given a pre-test survey to determine their skill level in Python coding and their familiarity of AI and issues pertaining the use of AI. After completing exercises in Python coding using ChatGPT, a post-test survey was conducted to determine how well the students have learned to code in Python as well as how effective ChatGPT was in assisting their study.