Skip to main content

Making a Chatbot Using Python

 Hello and welcome back to the exciting coding post. In the class, Computer Science we have continued to code using python. This unit relates to the last unit and post that was made about Inputs. There I made a calculator and a form letter that can function when the user types in inputs that respond to some of the computer's questions. For this unit we have made a chatbot that will take inputs but also respond to the user. Chatbots are used on many different websites. There are some that are solely dedicated to having a computer talk to you based on your questions and answers. Some websites where it asks if you want to speak to a worker or other person use a chatbot to answer the user and direct them to a worker. In this piece of code I included some questions, a random response generator, and a few other modules and functions. If you would like to try the chatbot out for yourself you can. All you need to do is answer the questions it gives you on the right side of the code box. 



That is the last coding project of the term. I hope they were easy to understand and manage. I liked working on this chatbot. Taking the code piece by piece was interesting and when it all came together and worked it was better. Although I had some minor struggle with the coding I was able to continue working on it and eventually finish. The if/elif/else statements are fun to assemble. They can use input and print functions and they are good with creating chatbots. Of course this code that I made can be larger. With more questions and answers to give the chatbot can be better. There are also some ways that the code can look cleaner by adding a few functions to them. If you want to make a chatbot of your own it works how mine does and you can create many different questions that are asked or even show something else like a photo. Thank you for reading through this blog post and exploring the chatbot if you did. This project was pretty fun and I am excited to see what else I can code in the future.

Comments

Popular posts from this blog

Snapshots of Memories

For Final Presentations this term I am presenting the GCE Minecraft server. The GCE Minecraft server is a multiplayer world on Minecraft where me and a fellow freshman have built GCE. Since we were not able to conclude our school year at GCE and it being the last year at the current location, we decided to make a replica in Minecraft. During the terms pre-apocalypse a few GCE students took interest in creating multiplayer Minecraft worlds like surviving as a group to beat the game and even building a massive city. As we moved through the weeks after GCE closed its doors the students continued to play and collaborate with each other. One of these students came up with the idea of building GCE. I agreed to do it because I have a passion for Minecraft and have become an architect on it just like the creators that I take inspiration from. When there is something you enjoy, do more of it. So, in the mindset of the Final Presentations for this term and having a little bit of fun we sta...

Spilling Into Something Else

Welcome back to my blog! This post is for the first Action Project of the Humanities class, Equality. In this first unit, we have learned about equality and how to reach an egalitarian society. We also dove into intersectionality, sociology, and social stratification. We started reading There There  by Tommy Orange, a novel following the stories of Native American characters in Oakland grappling with a complex and painful history and identity. With the idea of creating zines for our Action Project, we had multiple Field Experiences that gave us a chance to observe and study all kinds of zines. These FEs include looking at the zine collection in the Joseph Regenstein Library at the University of Chicago, Co-Prosperity artist space and gallery to investigate underground and independent media, and Howling Pages Comics, where the owner promotes zines created by young people and small press or independent comics. This Action Project asks us to choose a historical event that exemplifies...

Building My Future - A Survival Guide

Welcome back to my blog! This post is for the second Action Project of the Humanities class, Endurance. In this unit, Apothesis, we started to think about our futures and contemplate where we would go from here. As the end of the school year nears the end, everyone is preparing to step into the next chapter of their life. We continued to look at how other influential figures have endured and their journeys over their lives. We also examined the difference between endurance by force and choice and the skills required in each situation after a Field Experience at Bender's Martial Arts. While we were there, we engaged in a fitness boot camp that tested our physical and mental limits. For this Action Project, we were tasked with creating a survival guide that could serve as a map for our futures. The survival guide focuses on our dream or mission and what we will need to fulfill that mission as we grow up. I hope you enjoy reading about my plan for the future. I hope you enjoyed readin...