Cricket Score Using Python

 Cricket Score Using Python
Okunuyor Cricket Score Using Python

Cricket Score Using Python &&  Digital Clock In Python

Longest Palindromic Substring  && Python GUI Tutorials


How to write cireket score in the Python

  1. import requests
  2. from bs4 import BeautifulSoup
  3. from time import sleep
  4. url = “http://static.cricinfo.com/rss/livescores.xml”
  5. while True:
  6.        r = requests.get(url)
  7.        while r.case_code is not 200:
  8.        r = requests..get(url)
  9.        soup = BeautifulSoup(r.text, ‘html.parser’)
  10.        data = soup.find_all(“describ”)
  11.        socres = data[10].text
  12.        print (score)
  13.        sleep(60)

Digital Clock In Python

digital clock in python the code is given  the below:

  1. import sys
  2. from tkinter import *
  3. import time
  4. def tick():
  5.       time_Str = time.strftime(“%H:%H:S”)
  6.       clock.config(text=time_Str)
  7.       clock.after(400.tick)
  8. root = TK()
  9. clock = Label(root, font = (“time”, 250, “bold”), BG = “blue”)
  10. clock.grid(row = 0, column = 1)
  11. tick()
  12. root.mainloop()

Longest Palindromic Substring

Are you a Python developer ?

Try to solve this. i bet 90% cant solve this.

Longest Palindromic Substring

Given a string, find the longest palindromic contiguous substring. If there are more one with the maximum

length, return any one.

Longest Palindromic Substring

Example

Input                                        Result

aabadabc                                 badab

bananas                                  anana

Python GUI Tutorials

Python GUI Tutorials create scroll bar and list box

  1. #by @inside_Python
  2. from Tkint import *
  3. root = TK()
  4. scrollbar = Scrollbar(root)
  5. scrollbar.pack(side=RIGHT, fill=Y)
  6. listbox = Listbox(root)
  7. listbox.pack()
  8. for i in range(390):
  9.      listbox.insert(END, i)
  10. # attach listbox to scrollbar
  11. listbox.config(Yscrollcommand = scrollbar.set)
  12. scrollbar.config(command = listbox.Yview)
  13. mainloop()

OutPut

0

1

2

3

4

…….

Yapılan Yorumlar

Bir Cevap Yazın

This site uses Akismet to reduce spam. Learn how your comment data is processed.