如何实施调查?

How to implement a survey?

我想建立一个调查,其中包含一些问题 (<10),每个问题有 4 个选项。我尝试了不同的方式(Microsoft 调查、SurveyMonkey 或 Excel 等),最后转向 Python,这样我就可以学到一些东西并实现我想要的。我能够通过列表和循环正确列出问题和选项。现在我想将它们保存在 Excel 或其他类似数据库的地方。尽量避免使用 Xls,因为我会将此调查发送给大约 50 人,Excel 可能会带来一些危险。我不太确定它是否可能,但我的想法是在 Python 中创建一个 .exe 并与小组分享,当他们提供答案时(而 运行 .exe),这些答案应该记录在某处。我不是在寻找太多的分析或超级报告,但欢迎拥有。我写的下面的示例代码:

print("enter your name")
name=input()

print("how many teams you play for ?")
number_of_teams=int(input())
s=number_of_teams
print("you have to fill this form",s,"times")

//list of question in my survey

questions_list = ["Q1.A ?","Q2. B? ", "Q3. C?", "Q4. D?", "Q5. E ?", "Q6. F 
?","Q7. G ? "]

//list of options for each of those questions

answers_list = [["A.1 ", " B.2 ", " C.3 "," D.4 "],
               ["A.1 ", " B.2 ", " C.3 "," D.4 "],
               ["A.1 ", " B.2 ", " C.3 "," D.4 "],
               ["A.1 ", " B.2 ", " C.3 "," D.4 "],
               ["A.1 ", " B.2 ", " C.3 "," D.4 "],
               ["A.1 ", " B.2 ", " C.3 "," D.4 "],
               ["A.1 ", " B.2 ", " C.3 "," D.4 "],]

i=0
while i<s:
    print("enter your team name")
    team=input()
    for questions, answers in zip(questions_list, answers_list):
        print(questions + '\n' + ''.join(answers)+'\n')
        get_answer = input()
        print('\n')
    i=i+1

不能使用第三方库(因为数据共享问题)。

可以使用 PyInstaller python 创建 .exe。我建议创建一个与 SQLite 数据库交互的 python 程序。然后,使用 PyInstaller 将其转换为 .exe 程序。

我提供了一些可能有用的链接:Python Excel Tutorial, Python SQLite and PyInstaller