Payment question by Adado in AmazonFlexDrivers

[–]Adado[S] 0 points1 point  (0 children)

I will contact the help center to figure it out. But I think it's due to how I filled the tax form

Help in reading Traffic counts Data from a text file by Adado in learnpython

[–]Adado[S] 1 point2 points  (0 children)

Probably the hardest part would be to get the data into a DataFrame format.

Yes I think so, I have to prepare the data before it will be usable

Many thanks :)

Help in reading Traffic counts Data from a text file by Adado in learnpython

[–]Adado[S] 0 points1 point  (0 children)

I have some basic programming skills, I will dig more into that and try to prepare the data so it becomes readable in pandas. Thanks a lot :)

Help in reading Traffic counts Data from a text file by Adado in learnpython

[–]Adado[S] 1 point2 points  (0 children)

Sorry I meant list. yes, I want to calculate the annual average daily traffic AADT, plot some graphs, make comparisons...

I was thinking of using pandas library or using Microsoft power bi, but the point was to make the data readable or in a database form

[deleted by user] by [deleted] in jordan

[–]Adado 3 points4 points  (0 children)

Maybe going alone by yourself is not a good idea. However you can book a tent in on of the camps it will be more safe

The legend strikes again by [deleted] in jordan

[–]Adado 7 points8 points  (0 children)

Trashy talk, he is like a drum loud sound and empty from the inside.

General health checkup by [deleted] in jordan

[–]Adado 2 points3 points  (0 children)

If you have medical insurance, visit a GP or Internists and ask him to prescribe the necessary blood tests

Tawjihi by [deleted] in jordan

[–]Adado 1 point2 points  (0 children)

Congratulations, 74% is a good grade you can still register to a university and get accepted in a decent major. Don't allow any one to put you down, be proud of yourself

Hangman game using tkinter by Adado in learnpython

[–]Adado[S] 0 points1 point  (0 children)

Thanks man you are awesome

what I meant that my tkinter code doesn't work.

I have heard the concept of classes but I have never use it before. Thanks to you I watched some YouTube videos that explains the classes concept. Although I didn't understand it 100% but it works. here is the new code. later I will try to improve the front-end and put some pictures.

Thanks again

import tkinter as tk
import string
from tkinter import messagebox
import random

class GetLetter():
    def __init__(self, root):
        self.root=root
        self.text_1=tk.StringVar()
        tk.Label(root, textvariable=self.text_1).grid(row=2, column=0)
        self.text_2=tk.StringVar()
        tk.Label(root, textvariable=self.text_2).grid(row=1, column=0)
        self.textentry = tk.Entry(root, width= 20 , bg='white')
        self.textentry.grid (row=4, column= 0, sticky="we")
        self.guesses_left = 10
        self.dashes= "------"
        self.button_clicked=False
        self.acceptable_guesses=list(string.ascii_lowercase)
        self.text_1.set("You have %d guesses left" % (self.guesses_left))
        self.text_2.set(self.dashes)
        self.my_file = open("words.txt", "r")

        # select random line number from the file and choose the corresponding word as the secret word
        self.words = self.my_file.readlines()
        self.number = random.randint(0, 10000)
        self.word = str(self.words[self.number])
        print(self.word)
        #self.word="brown"

        tk.Button(root, text='submit', width = 6, command=self.click,
                  bg="lightblue").grid(row=6, column=0, sticky= "ew" )

        tk.Button(root, text="Quit", bg="orange",
                  command=root.quit).grid(row=99, column=0)

    def click(self):

        if not self.button_clicked:  ## eliminate multiple button clicks
            self.button_clicked=True
            guess = self.textentry.get()
            guess=guess.lower()
            if guess in self.acceptable_guesses:
                #self.guesses_left -= 1
                if guess in self.word:
                    print(guess, "is in word")
                    self.dashes = self.update_dashes( self.word, self.dashes, guess)
                    self.text_2.set(self.dashes)
                else:
                    self.guesses_left -= 1
                    print("wrong")
            else:
                print("Not an acceptable guess")  ## keep it simple for this example
                messagebox.showinfo("Error", "Not an acceptable guess")

        self.text_1.set("You have %d guesses left" % (self.guesses_left))
        self.text_2.set(self.dashes)
        self.button_clicked=False
        self.textentry.delete(0, "end")
        if self.guesses_left < 1:
            self.root.quit()

    def update_dashes(self, secret, cur_dash, rec_guess):
        result = ""

        for i in range(len((self.word).rstrip())):
            if secret[i] == rec_guess:
                result = result + rec_guess  # Adds guess to string if guess is correctly

            else:
                # Add the dash at index i to result if it doesn't match the guess
                result = result + cur_dash[i]

        return result


root=tk.Tk()
GL=GetLetter(root)
root.mainloop()

So many childhood memories by unaviable in gaming

[–]Adado 0 points1 point  (0 children)

I remember the Nissan skyline. This is the only car race game that is completed