Skip to main content

Wikipedia Search software using python.

Project Name:- Wikipedia Search software using python.

Dependencies:-
                    1) Install Tkinter-

Link- https://www.techinfected.net/2015/09/how-to-install-and-use-tkinter-in-ubuntu-debian-linux-mint.html

                    2) Install wikipedia-

                   for python3- pip3 install wikipedia

                   for python2- pip install wikipedia




****************************************//****************************************

from tkinter import *
import wikipedia
def search_me():
    result=entry.get(1.0,END)
    text.delete(1.0,END)
    try:
        answer=wikipedia.summary(result)
        text.insert(INSERT,answer)
    except:
        text.insert(INSERT,"Pease check your spelling or Internet connection")


root=Tk()
root.geometry("450x450")
root.title("Ganesh")
topframe=Frame(root)
entry=Text(topframe,width=50,height=4)
entry.pack()
button=Button(topframe,width=20,height=2,text="search",command=search_me)
button.pack()
topframe.pack(side=TOP)


bottomframe=Frame(root)
scroll=Scrollbar(bottomframe)
scroll.pack(side=RIGHT,fill=Y)
text=Text(bottomframe,width=50,height=25,yscrollcommand=scroll.set,bd=5)
text.pack()
scroll.config(command=text.yview)
bottomframe.pack()
root.mainloop()

****************************************//*****************************************




Comments

Unknown said…
Hey bro please share coding answers and related sources,need them very much

Favourite post

Part 2 : TCS DCA python coding questions

TCS wings1 DCA python coding TCS elevate wings1 coding questions This post contains only coding questions asked in TCS digital wings1 or tcs elevate wings1 exam. If anyone want coding answer of these questions please comment me or reach me through email provided. Given a string str which consists of only 3 letters representing the color,(H) Hue, (S) Saturation, (L) Lightness, called HSL colors. The task is to count the occurrence of ordered triplet “H, S, L” in a given string and give this count as the output. This question was asked in April 21 Digital Capababilty Assessment Examples: A) Input HHSL Output 2 Explanation : There are two triplets of RGB in the given string: H at index O, S at index 2 and Lat index 3 forms one triplet of HSL. H at index 1, S at index 2 and Lat index 3 forms the second triplet of HSL. B) Input:   SHL Output: 0 Explanation : No triplets exists. In this 3 Palindrome, Given an input string word, split the string into exactly 3 palindromic substrings. Work...

Part 1 : TCS DCA python coding questions

TCS wings1 DCA python coding TCS elevate wings1 coding questions This post contains only coding questions asked in TCS digital wings1 or tcs elevate wings1 exam. If anyone want coding answer of these questions please comment me or reach me through email provided. Find how many Sexy Prime Numbers in a given range k and p.  Sexy prime means the prime numbers that differ from each other by 6. Where difference between two sexy prime numbers is 6. Constraint: 2 <=p<k<= 1000,000,000. Sample Input: 4  40 Output: 7 Explanation: [5,11] [7,13] [11,17] [13,19] [17,23]  [23,29] [31,37] Problem Description -: Given two non-negative integers n1 and n2, where n1 For example: Suppose n1=11 and n2=15. There is the number 11, which has repeated digits, but 12, 13, 14 and 15 have no repeated digits. So, the output is 4. Example1: Input: 11 — Vlaue of n1 15 — value of n2 Output: 4 Example 2: Input: 101 — value of n1 200 — value of n2 Output: 72 Consider the string S1 = 321 All char...

Calculator program using python tkinter

Project Name:- Simple Calculator Software using Python Tkinter. Dependencies:-                           1)Install  Tkinter- https://www.techinfected.net/2015/09/how-to-install-and-use-tkinter-in-ubuntu-debian-linux-mint.html                                 2)Install Math Library- for python3- pip3 install math  for python2- pip install math  ******************************************//************************************************************************ from tkinter import * from math import * class cal: def press( self ,n): self .text.insert(INSERT,n) def dl( self ): self .text.delete( 1.0 , 2.0 ) def equal( self ): self .exp= self .text.get( 1.0 ,END) try : self .result= eval ( self .exp) self .text.delete( 1.0 , 2.0 ) ...