Python Forum
Not Getting The desired output on my system
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Getting The desired output on my system
#1
from tkinter import *
import random

class ExamGuru:
    def _init_(self, parent):
        self.parent=parent
        self.index=0
        self.question_num=1
        self.score=0
        self.questions=[Question("First Insurance Company In India ? ", "Oreintal Life Insurance",["Bombay Mutual Insurance","Western India Insurance","LIC"]),
                        Question("Which Of The Following Risks Are Insurable ?", "Financial Risk",["Non Financial","Both","None"])]

        self.mainquestionframe= Frame(parent, bg="orange", width=800, height=500)
        self.mainquestionframe.pack_propagate(0)
        self.mainquestionframe.pack(pady=5)

        self.headingframe= Frame(self.mainquestionframe, bg="blue",Width=800, height=40)
        self.headingframe.pack_propagate()
        self.headingframe.pack(pady=5)


class Question:
    def _init_(self,question,answer,dummies):
        self.question=question
        self.answer=answer
        self.dummies=dummies
        self.set_answers()

    def set_answers(self):
        self.answers=self.dummies
        self.answer.insert(random.randrange(len(self.dummies)+1), self.answer)


if __name__=='__main__':
    root=Tk()
    
    root.title("Exam Guru")
    root.mainloop()
not getting any anything on the tkinter window
system- ubuntu 14.04
python version - 3.4.3
Reply


Messages In This Thread
Not Getting The desired output on my system - by Rashi - Apr-01-2017, 02:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Json filter is not capturing desired key/element mrapple2020 1 1,148 Nov-24-2022, 09:22 AM
Last Post: ibreeden
  how can I display only desired items? 3lnyn0 5 2,055 Dec-25-2021, 06:49 PM
Last Post: menator01
  ERROR: importing desired module mbgamer28 0 1,692 Apr-05-2021, 07:46 PM
Last Post: mbgamer28
  Not rounding to desired decimal places? pprod 2 2,580 Mar-05-2021, 11:11 AM
Last Post: pprod
  Difference between os.system("clear") and os.system("cls") chmsrohit 7 16,668 Jan-11-2021, 06:30 PM
Last Post: ykumar34
  Why this code not getting desired output ? MDRI 2 2,547 Sep-18-2020, 02:11 AM
Last Post: MDRI
  showing only desired part of a plot grknkilicaslan 1 2,352 Jul-10-2020, 03:51 PM
Last Post: Marbelous
  [Beginner] Code is not producing desired result fakej171 2 2,447 Mar-21-2020, 10:26 AM
Last Post: buran
  Not Getting the Desired value using json.dumps saurabh210 0 1,519 Feb-03-2020, 06:48 PM
Last Post: saurabh210
Question Difference between Python's os.system and Perl's system command Agile741 13 6,874 Dec-02-2019, 04:41 PM
Last Post: Agile741

Forum Jump:

User Panel Messages

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