35
38
sqlStringEnd = ");"
37
41
def qinput(): ## question input
38
42
""" this function ruturns 1 or 0 or -1 when error """
39
43
q = str(input("svara med 1 för sant och 0 för falskt:"))
41
if(q != "0" or q != "1"):
45
if(q != "0" and q != "1"):
42
46
print("!!! the input is invalid !!! \n !!! Try again !!!")
60
63
awnserSheet.question1()
62
65
awnserSheet.addToSqlString(q)
66
70
print("tror du på spöken?")
67
71
q = awnserSheet.qinput()
69
awnserSheet.question3()
73
awnserSheet.question2()
71
75
awnserSheet.addToSqlString(q)
75
80
print("Är du religiös?")
76
81
q = awnserSheet.qinput()
78
83
awnserSheet.question3()
80
85
awnserSheet.addToSqlString(q)
84
90
print("är du för ett sekelärt samhälle?")
85
91
q = awnserSheet.qinput()
87
93
awnserSheet.question4()
89
95
awnserSheet.addToSqlString(q)
92
100
print("Är du vegetarian/vegan?")
93
101
q = awnserSheet.qinput()
95
103
awnserSheet.question5()
97
105
awnserSheet.addToSqlString(q)
101
110
print("Tycker du att mänskligheten skall besöka mars inom en snar framtid?")
102
111
q = awnserSheet.qinput()
104
113
awnserSheet.question6()
106
115
awnserSheet.addToSqlString(q)
110
120
print(" Tror du att mänskligheten är orsaken till den observerade globalauppvärmingen?")
111
121
q = awnserSheet.qinput()
113
123
awnserSheet.question7()
115
125
awnserSheet.addToSqlString(q)
117
def questionAndReturn():
130
print("tror du att vi varit på månen?")
131
q = awnserSheet.qinput()
133
awnserSheet.question8()
135
awnserSheet.addToSqlString(q)
140
print("Motionerar du regelbundet?")
141
q = awnserSheet.qinput()
143
awnserSheet.question9()
145
awnserSheet.addToSqlString(q)
150
print("Anser du att du har en sund livsstil?")
151
q = awnserSheet.qinput()
153
awnserSheet.question10()
155
awnserSheet.addToSqlString(q)
160
print("Blir du deprimerad/nedstämd på hösten/vintern?")
161
q = awnserSheet.qinput()
163
awnserSheet.question11()
165
awnserSheet.addToSqlString(q)
170
print("Gillar du snö?")
171
q = awnserSheet.qinput()
173
awnserSheet.question12()
175
awnserSheet.addToSqlString(q)
180
print("Är du för ett öppet samhälle?")
181
q = awnserSheet.qinput()
183
awnserSheet.question13()
185
awnserSheet.addToSqlString(q)
190
print("Är du för dödsstraff?")
191
q = awnserSheet.qinput()
193
awnserSheet.question14()
195
awnserSheet.addToSqlString(q)
200
print("Är du för kvinnors rättigheter?")
201
q = awnserSheet.qinput()
203
awnserSheet.question15()
205
awnserSheet.addToSqlString(q)
210
print("Är du för abort?")
211
q = awnserSheet.qinput()
213
awnserSheet.question16()
215
awnserSheet.addToSqlString(q)
220
print("Är du för kvinnors rätt att bestämma över sin egen kropp?")
221
q = awnserSheet.qinput()
223
awnserSheet.question17()
225
awnserSheet.addToSqlString(q)
229
print("Blir du deprimerad/nedstämd på våren?")
230
q = awnserSheet.qinput()
232
awnserSheet.question18()
234
awnserSheet.addToSqlString(q)
239
print("Är du gäststuderande här i Sverige?")
240
q = awnserSheet.qinput()
242
awnserSheet.questionI()
244
awnserSheet.addToSqlString(q)
248
print("Är du född i Sverige?")
249
q = awnserSheet.qinput()
251
awnserSheet.questionI()
253
awnserSheet.addToSqlString(q)
257
print("Är en eller båda av dina föreldrar inte födda i Sverige?")
258
q = awnserSheet.qinput()
260
awnserSheet.questionI()
262
awnserSheet.addToSqlString(q)
264
def questionCommentry():
266
print("Skriv en komentar på denna undörsökning:")
267
q = str(input(">>>>>>"))
268
wnserSheet.addToSqlString(q)
272
def questionAndReturn(self):
118
273
awnserSheet.question1()
119
274
awnserSheet.question2()
121
return( sqlStringStart + sqlString + sqlStringEnd )
275
awnserSheet.question3()
276
awnserSheet.question4()
277
awnserSheet.question5()
278
awnserSheet.question6()
279
awnserSheet.question7()
280
awnserSheet.question8()
281
awnserSheet.question9()
282
awnserSheet.question10()
283
awnserSheet.question11()
284
awnserSheet.question12()
285
awnserSheet.question13()
286
awnserSheet.question14()
287
awnserSheet.question15()
288
awnserSheet.question16()
289
awnserSheet.question18()
290
awnserSheet.questionI()
291
awnserSheet.questionII()
292
awnserSheet.questionIII()
293
awnserSheet.questionCommentry()
296
print("\n\n======================== tack och adjöken ^_^ ===================\n\n")
298
return( awnserSheet.sqlStringStart + awnserSheet.sqlString + awnserSheet.sqlStringEnd )