Powerpoint EDUCATIONAL gameS - Classroom chatbot

In this PowerPoint Educational Game, we shall be creating a chatbot which will ask questions from the students, and then the students can answer the chatbot’s question in Microsoft PowerPoint.

This PowerPoint Template can be downloaded and used in your classroom to engage the students and to bring interactivity. 

You can customise the questions and the required answer in the chatbot using Visual Basic Application Codes.

This game was suggested by Udayan Gera and we collaborated to make it happen!

Adding your own questions and responses to the PowerPoint Game - Classroom Chatbot

As a teacher, you would want to customise the ChatBot of this PowerPoint Game and insert your own questions and responses. Luckily, the process is very simple!

My premium template allows you to input your data in an Excel Sheet. The ChatBot can go through that Excel Sheet and bring the data over to PowerPoint; thus, making your work easy!

To insert your own questions and answers, you would first have to change the number of packets within the Q() and A() Array. In the following case, we have 3 questions and answers. We increase the Q() Array by one more in order to fit the last statement of the chatbot.

Dim Q(4) As String 'number of packets'
Dim A(3) As String 'number of packets'
Dim query As Shape
Dim x As Integer 

Now, you can insert your own questions and answers that you’d want the chatbot to ask your students. Make sure the corresponding A() of Q() has the answer within it.

Sub Database()
x = 0
Set query = ActivePresentation.Slides(3).Shapes("query")
Q(1) = "Who is the CEO of Google?"
Q(2) = "Who is the CEO of Apple?"
Q(3) = "Who is the CEO of Microsoft?"
Q(4) = "Thank you for answering!"
A(1) = "Sunder Pichai"
A(2) = "Tim Cook"
A(3) = "Satya Nadella"
End Sub 
Sub StartGame()
Database
query.TextFrame.TextRange = Q(1)
SlideShowWindows(1).View.Next
End Sub 

Working with Input in PowerPoint Educational Game

The students can submit their answer (reply to the chatbot) by typing within an ActiveX Element TextBox which would be present in the PowerPoint Educational Game.

 The VBA code will take the input and then process it.

Based on an If-Then-Else Condition, the chatbot will reply back to the student in this  PowerPoint Educational Game.

In this case, the chatbot replies with “Correct!” / “Wrong” based on the response of the student in the classroom and then proceeds to ask the next question from the database.

Sub EvaluateA()
x = x + 1
If UCase(reply.Value) = UCase(A(x)) Then
query.TextFrame.TextRange = "Correct! " & Q(x + 1)
Else
query.TextFrame.TextRange = "Wrong! " & Q(x + 1)
End If
reply.Value = ""
End Sub