Python Forum
Generate questions from excel to test my chatbot
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generate questions from excel to test my chatbot
#1
Hello Everyone!
I am new in Python, but I am learning a lot from a Coursera Course. I have an excel document with lots of questions/phrases, i.e. "What color do you like the most?" , "my computer is not working", how can I ad moe ram? I would like Python to grab one question at the time and insert it in my ChatBot Website, wait for the response and insert another question. At the end of my question, my chatbot asks... Did I answer your question? YES or NO? . I want Python to reply YES or NO at random, and continue inserting questions from the excel document, line by line, the Website where my Bot is located
Is this possible? and can someone show me how I can start it please?
Thank you
Reply
#2
You can use openpyxl to read Excel files.

Out of interest, why are you storing the data in a spreadsheet rather than just as plain text? Of course Python can read from plain text files without any third-party libraries. I'm just curious really.
Reply
#3
Thank you for the response
I can also use a TXT file, I don't think that is the problem,
but how do I make python ask the question to robin.. wait and ask YES or NO, or another question?
Thanks!
Reply
#4
What have you tried? We aren't here to do the work for you.
Reply
#5
okas, I will try before asking
Thanks!
Reply
#6
So this is the script i did, it works in python, it shows each line in the Terminal. I want the information in the text file to run in a website. I used to do this in autohotkeys, but I am learning Python, any suggestions?

test1 = open("C:\\Users\\USERs\\Google Drive\\Certification - Coursera\\Python\\test.txt")
for word in test1:
        pyautogui.typewrite(word)
        pyautogui.press("enter")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Working with Excel and Word, Several Questions Regarding Find and Replace Brandon_Pickert 4 1,570 Feb-11-2023, 03:59 PM
Last Post: Brandon_Pickert
  Presenting random test questions oradba4u 2 909 Sep-27-2022, 04:23 PM
Last Post: deanhystad
Bug beginner attempting to make chatbot MonikaDreemur 1 1,112 Feb-02-2022, 10:24 PM
Last Post: BashBedlam
  how do I return Max Test result + corresponding student name from an excel dataset? sean1 3 1,271 Jan-16-2022, 09:07 PM
Last Post: snippsat
  Help with simple nltk Chatbot Extra 3 1,893 Jan-02-2022, 07:50 AM
Last Post: bepammoifoge
  Python Reminder MSTeams Chatbot ajaymedidi 0 1,149 Sep-16-2021, 07:13 AM
Last Post: ajaymedidi
  How to test and import a model form computer to test accuracy using Sklearn library Anldra12 6 3,142 Jul-03-2021, 10:07 AM
Last Post: Anldra12
  Trying to pass an exe filepath to tkinter Chatbot & expecting the chatbot to run it svkroy 0 1,591 Jul-16-2020, 07:46 AM
Last Post: svkroy
  How to write test cases for a init function by Unit test in python? binhduonggttn 2 3,130 Feb-24-2020, 12:06 PM
Last Post: Larz60+
  How to write test cases by Unit test for database configuration file? binhduonggttn 0 2,566 Feb-18-2020, 08:03 AM
Last Post: binhduonggttn

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020