3
3
4
4
root = Tk ()
5
5
6
- root .geometry ("500x500 " )
6
+ root .geometry ("800x800 " )
7
7
8
8
root .title ("Hacktoberfest Quiz" )
9
9
@@ -24,30 +24,30 @@ def ask_question(self):
24
24
answer = input ('Are you ready to play the Quiz ? (yes/no) :' )
25
25
26
26
if answer .lower ()== 'yes' :
27
- answer = input ('Question 1: What programming language was this quiz created in? Hint: Java, C++, Python ' )
27
+ answer = input ('Question 1: What programming language was this quiz created in?' )
28
28
if answer .lower ()== 'python' :
29
29
self .score += 1
30
30
print ('correct' )
31
31
else :
32
32
print ('Wrong Answer :(' )
33
33
34
34
35
- answer = input ('Question 2: Is one of the values of Hacktoberfest 2022 "EVERYONE IS WELCOME" ? ' )
36
- if answer .lower ()== 'yes ' :
35
+ answer = input ('Question 2: What is software Engineering? ' )
36
+ if answer .lower ()== 'application of engineering principle to the design a software ' :
37
37
self .score += 1
38
38
print ('correct' )
39
39
else :
40
40
print ('Wrong Answer :(' )
41
41
42
- answer = input ('Question 3: Does Hacktoberfest end on December 31 ?' )
43
- if answer .lower ()== 'no ' :
42
+ answer = input ('Question 3: what does SDLC stand for ?' )
43
+ if answer .lower ()== 'software Development Life Cycle ' :
44
44
self .score += 1
45
45
print ('correct' )
46
46
else :
47
47
print ('Wrong Answer :(' )
48
48
49
- answer = input ('Question 3: Does Hacktoberfest have a discord server? ' )
50
- if answer .lower ()== 'yes ' :
49
+ answer = input ('Question 4: First phase of software development is: ' )
50
+ if answer .lower ()== 'requirement ananlysi ' :
51
51
self .score += 1
52
52
print ('correct' )
53
53
else :
@@ -67,35 +67,35 @@ def validate_question_one(self, question_one_value = ''):
67
67
print ('correct' )
68
68
else :
69
69
print ('Wrong Answer1' )
70
- print ('correct answer is python ' )
70
+ print ('correct answer is python. ' )
71
71
return True if question_one_value .lower ()== 'python' else False
72
72
73
73
def validate_question_two (self , question_two_value ):
74
- if question_two_value .lower ()== 'yes ' :
74
+ if question_two_value .lower ()== 'application of engineering principle to the design a software ' :
75
75
self .score += 1
76
76
print ('correct' )
77
77
else :
78
78
print ('Wrong Answer2' )
79
- print ('correct answer is yes ' )
80
- return True if question_two_value .lower ()== 'yes ' else False
79
+ print ('correct answer is application of engineering principle to the design a software. It is the Application of engineering principles to the design,development, and support of software and it helps to solve the challenges of low- quality software project. ' )
80
+ return True if question_two_value .lower ()== 'application of engineering principle to the design a software ' else False
81
81
82
82
def validate_question_three (self , question_three_value ):
83
- if question_three_value .lower ()== 'no ' :
83
+ if question_three_value .lower ()== 'software development life cycle ' :
84
84
self .score += 1
85
85
print ('correct' )
86
86
else :
87
87
print ('Wrong Answer2' )
88
- print ('correct answer is no ' )
89
- return True if question_three_value .lower ()== 'no ' else False
88
+ print ('correct answer is software development life cycle. it is a method for designing, developing, and testing high-quality softwarte. ' )
89
+ return True if question_three_value .lower ()== 'software development life cycle ' else False
90
90
91
91
def validate_question_four (self , question_four_value ):
92
- if question_four_value .lower ()== 'yes ' :
92
+ if question_four_value .lower ()== 'requirement ananlysis ' :
93
93
self .score += 1
94
94
print ('correct' )
95
95
else :
96
96
print ('Wrong Answer2' )
97
- print ('correct answer is yes ' )
98
- return True if question_four_value .lower ()== 'yes ' else False
97
+ print ('correct answer is requirement ananlysis, as based on it developer design and developed the software. ' )
98
+ return True if question_four_value .lower ()== 'requirement ananlysis ' else False
99
99
100
100
def evaluate (self ):
101
101
self .score = 0
@@ -123,41 +123,42 @@ def evaluate(self):
123
123
124
124
quiz = Quiz ()
125
125
126
- w1_label = Label (root ,text = "Question 1: What programming language was this quiz created in? Hint: Java, C++, Python ?" ,font = ("arial" ,10 ),width = 100 ,height = 4 )
126
+ w1_label = Label (root ,text = "Question 1: What programming language was this quiz created in?" ,font = ("arial" ,10 ),width = 100 ,height = 4 )
127
+ w1_label .pack ()
128
+ question_one = ttk .Combobox (root ,value = ["Python" ,"Java" ,"C++" ],width = 50 ,height = 4 )
127
129
w1_label .pack ()
128
- question_one = ttk .Combobox (root ,value = ["Python" ,"Java" ,"C++" ])
129
130
question_one .current (0 )
130
131
question_one .pack ()
131
132
132
- w1_label = Label (root ,text = "" ,font = ("arial" ,10 ),width = 100 ,height = 4 )
133
+ w1_label = Label (root ,text = "" ,font = ("arial" ,10 ),width = 200 ,height = 4 )
133
134
w1_label .pack ()
134
135
135
- w2_label = Label (root ,text = "Question 2: Is one of the values of Hacktoberfest 2022 'EVERYONE IS WELCOME' ?" ,font = ("arial" ,10 ),width = 100 ,height = 4 )
136
+ w2_label = Label (root ,text = "Question 2:What is software Engineering ?" ,font = ("arial" ,10 ),width = 200 ,height = 4 )
136
137
w2_label .pack ()
137
- question_two = ttk .Combobox (root ,value = ["Yes " ,"No " ])
138
+ question_two = ttk .Combobox (root ,width = 50 , height = 4 , value = ["Designing a software " ,"Testing a software" , "Application of engineering principle to the design a software" , "None of the above " ])
138
139
question_two .current (0 )
139
140
question_two .pack ()
140
141
141
- w2_label = Label (root ,text = "" ,font = ("arial" ,10 ),width = 100 ,height = 4 )
142
+ w2_label = Label (root ,text = "" ,font = ("arial" ,10 ),width = 200 ,height = 4 )
142
143
w2_label .pack ()
143
144
144
145
145
- w3_label = Label (root ,text = "Question 3: Does Hacktoberfest end on December 31 ?" ,font = ("arial" ,10 ),width = 100 ,height = 4 )
146
+ w3_label = Label (root ,text = "Question 3:what does SDLC stand for ?" ,font = ("arial" ,10 ),width = 200 ,height = 4 )
146
147
w3_label .pack ()
147
- question_three = ttk .Combobox (root ,value = ["Yes " ,"No " ])
148
+ question_three = ttk .Combobox (root ,width = 50 , height = 4 , value = ["System Design Life Cycle " ,"Software Design Life Cycle" , "System Development Life Cycle" , "Software Development Life Cycle " ])
148
149
question_three .current (0 )
149
150
question_three .pack ()
150
151
151
- w3_label = Label (root ,text = "" ,font = ("arial" ,10 ),width = 100 ,height = 4 )
152
+ w3_label = Label (root ,text = "" ,font = ("arial" ,10 ),width = 200 ,height = 4 )
152
153
w3_label .pack ()
153
154
154
- w4_label = Label (root ,text = "Question 4: Does Hacktoberfest have a discord server? " ,font = ("arial" ,10 ),width = 50 ,height = 4 )
155
+ w4_label = Label (root ,text = "Question 4: First phase of software development is: " ,font = ("arial" ,10 ),width = 200 ,height = 4 )
155
156
w4_label .pack ()
156
- question_four = ttk .Combobox (root ,value = ["Yes " ,"No " ])
157
+ question_four = ttk .Combobox (root ,width = 50 , height = 4 , value = ["Coding " ,"Testing" , "Design" , "Requirement ananlysis " ])
157
158
question_four .current (0 )
158
159
question_four .pack ()
159
160
160
- w4_label = Label (root ,text = "" ,font = ("arial" ,10 ),width = 50 ,height = 4 )
161
+ w4_label = Label (root ,text = "" ,font = ("arial" ,10 ),width = 200 ,height = 4 )
161
162
w4_label .pack ()
162
163
163
164
0 commit comments