Answers for "small basic chat bot"

1

small basic chat bot

TextWindow.WriteLine("Text Bot Made By Yasin")
TextWindow.WriteLine("Battery:100%")

TextWindow.WriteLine("Hi i am a text bot What's your name?")

name = TextWindow.Read()

TextWindow.WriteLine("Hi "+name+" Nice To Meet You!")
TextWindow.WriteLine("Battery:90%")
TextWindow.WriteLine("How's Your Day Going Fine/Notfine?/Not Sure?")
day = TextWindow.Read()

if day = "fine" then
    TextWindow.WriteLine("OK :)")
    
    ElseIf day = "not fine" Then
        TextWindow.WriteLine("OK :(")
        Program.End()

Else
  
            TextWindow.WriteLine("OK? :\")
    EndIf
TextWindow.WriteLine("Battery:75%")
    TextWindow.WriteLine("Anyway What Should You Call Me?")

    botname = TextWindow.Read()
    TextWindow.WriteLine(botname+"? Yeah Sure Ill Remember That")

    if clock.hour = 10 Then
        TextWindow.WriteLine("Oh? Sir Its Night Time you should go and sleep bye!")
        Program.End()
        EndIf
        
        TextWindow.WriteLine("What Should You Tell Next ?")
        TextWindow.Write("I Like You :) , i hate you, ____?")

        next = TextWindow.Read()
TextWindow.WriteLine("Battery:55%")
        if next = "i hate you" Then
            TextWindow.WriteLine("Ok :(")
            Program.End()

            ElseIf next = "I Like You :)" Then
                TextWindow.WriteLine("Thank You")

            else
                TextWindow.WriteLine("Ok :\")
        endif

        TextWindow.WriteLine("Anyways Do You Want To End This Conversation____?")
        TextWindow.WriteLine("Yes")
        TextWindow.WriteLine("or")
        TextWindow.WriteLine("NO")

        conversation = TextWindow.Read()
TextWindow.WriteLine("Battery:44%")

        If conversation = "Yes" Then
            TextWindow.WriteLine("Ok Bye :(")
            Program.End()
        Elseif conversation = "NO" Then
                TextWindow.WriteLine("Ok :)")
        EndIf
        TextWindow.WriteLine("Battery:10%")
        TextWindow.WriteLine("Notification !")
        TextWindow.WriteLine("Friend:Hi Are You Coming to hangout Yes,no")

        msg = TextWindow.Read()
        If msg = "Yes" Then
            TextWindow.WriteLine("Friend:OK See You On 4'o clock Bye :0)")
        elseif msg = "no" then
            TextWindow.WriteLine("Well? Ok Bye :|")
            Program.End()
        EndIf


        TextWindow.WriteLine("Hi "+botname+" Here The Battery Is Low Plug It In The charger or it will switch off :)")

        TextWindow.WriteLine("Yes,no")

        switch = TextWindow.Read()

        If switch ="Yes"  Then
            TextWindow.WriteLine("Ok Bye :)")
            TextWindow.BackgroundColor = "green"
            Program.End()
        Elseif switch = "no" Then

            TextWindow.WriteLine("Power OFF")
            TextWindow.BackgroundColor = "red"

            TextWindow.WriteLine("Battery: 100%")
            Program.End()
        Endif
Posted by: Guest on August-03-2021

Code answers related to "BASIC"

Browse Popular Code Answers by Language