THINKER TRONE

By AF


Skip to main content
NOT WORK IF PYGAME MODULE NOT INSTALLED




import pygame

#Globals
# Colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 0)

# width and height of each snake segment
segment_width = 15
segment_height = 15
# Margin between each segment
segment_margin = 3

# initial speed
x_change = segment_width + segment_margin
y_change = 0


class Segment(pygame.sprite.Sprite):
    # Methods
    # Constructor function
    def __init__(self, x, y):
        # Call the parent's constructor
        super().__init__()

        # Set height, width
        self.image = pygame.Surface([segment_width, segment_height])
        self.image.fill(WHITE)

        # Make our top-left corner the passed-in location.
        self.rect = self.image.get_rect()
        self.rect.x = x
        self.rect.y = y

# Call this function so the Pygame library can initialize itself
pygame.init()

# Create an 800x600 sized screen
screen = pygame.display.set_mode([800, 600])

# Set the title of the window
pygame.display.set_caption('ALAN AF SNAKE GAME')

allspriteslist = pygame.sprite.Group()

# Create an initial snake
snake_segments = []
for i in range(15):
    x = 250 - (segment_width + segment_margin) * i
    y = 30
    segment = Segment(x, y)
    snake_segments.append(segment)
    allspriteslist.add(segment)


clock = pygame.time.Clock()
done = False

while not done:

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            done = True

        # Set the speed based on the key pressed
        # We want the speed to be enough that we move a full
        # segment, plus the margin.
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_LEFT:
                x_change = (segment_width + segment_margin) * -1
                y_change = 0
            if event.key == pygame.K_RIGHT:
                x_change = (segment_width + segment_margin)
                y_change = 0
            if event.key == pygame.K_UP:
                x_change = 0
                y_change = (segment_height + segment_margin) * -1
            if event.key == pygame.K_DOWN:
                x_change = 0
                y_change = (segment_height + segment_margin)

    # Get rid of last segment of the snake
    # .pop() command removes last item in list
    old_segment = snake_segments.pop()
    allspriteslist.remove(old_segment)

    # Figure out where new segment will be
    x = snake_segments[0].rect.x + x_change
    y = snake_segments[0].rect.y + y_change
    segment = Segment(x, y)

    # Insert new segment into the list
    snake_segments.insert(0, segment)
    allspriteslist.add(segment)

    # Draw everything
    # Clear screen
    screen.fill(BLACK)

    allspriteslist.draw(screen)

    # Flip screen
    pygame.display.flip()

    # Pause
    clock.tick(5)

pygame.quit()

NOT WORK IF PYGAME MODULE IS NOT INSTALLED

import pygame

pygame.init()

white = (255, 255, 255)
black = (0, 0, 0)
red = (255, 0, 0)

dis = pygame.display.set_mode((800, 600))
pygame.display.set_caption('ANITHA')

game_over = False

x1 = 300
y1 = 300

x1_change = 0      
y1_change = 0

clock = pygame.time.Clock()

while not game_over:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            game_over = True
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_LEFT:
                x1_change = -10
                y1_change = 0
            elif event.key == pygame.K_RIGHT:
                x1_change = 10
                y1_change = 0
            elif event.key == pygame.K_UP:
                y1_change = -10
                x1_change = 0
            elif event.key == pygame.K_DOWN:
                y1_change = 10
                x1_change = 0

    x1 += x1_change
    y1 += y1_change
    dis.fill(white)
    pygame.draw.rect(dis, black, [x1, y1, 10, 10])

    pygame.display.update()

    clock.tick(30)

pygame.quit()
quit()




from turtle import*
import turtle as a
a.width(8)
a.color('red')
a.left(60)
a.forward(250)


a.begin_fill()
a.color('red')
a.right(80)
a.forward(150)
a.left(120)
a.forward(120)
a.left(110)
a.forward(135)
a.end_fill()


a.begin_fill()
a.color('blue')
a.left(130)
a.forward(145)
a.right(100)
a.forward(250)
a.right(80)
a.forward(147)
a.right(100)
a.forward(252)
a.right(180)
a.forward(250)
a.end_fill()


a.begin_fill()
a.color('green')
a.right(80)
a.forward(60)
a.right(100)
a.forward(90)
a.right(80)
a.forward(60)
a.right(100)
a.forward(90)
a.left(180)
a.forward(90)
a.end_fill()

a.begin_fill()
a.color('purple')
a.left(30)
a.forward(60)
a.left(125)
a.forward(68)
a.left(125)
a.forward(60)
a.end_fill()
a.color('blue')

a.right(100)
a.forward(92)
a.left(100)
a.forward(150)
a.begin_fill()
a.color('green')
a.forward(60)
a.left(80)
a.forward(90)
a.left(100)
a.forward(65)
a.left(82)
a.forward(90)
a.end_fill()

a.left(180)
a.forward(90)
a.begin_fill()
a.color('purple')
a.right(80)
a.forward(65)
a.left(120)
a.forward(60)
a.left(115)
a.forward(60)
a.end_fill()
a.color('green')
a.left(25)
a.forward(92)

a.begin_fill()
a.color('orange')
a.left(20)
a.forward(120)
a.left(150)
a.forward(125)
a.left(109)
a.forward(70)
a.end_fill()

a.begin_fill()
a.color('orange')
a.forward(200)
a.left(90)
a.forward(120)
a.left(155)
a.forward(133)
a.end_fill()

a.begin_fill()
a.color('red')
a.right(130)
a.forward(100)
a.left(60)
a.forward(50)
a.left(63)
a.forward(110)
a.right(240)
a.forward(160)
a.end_fill()


# Python program to create a simple GUI
# calculator using Tkinter

# import everything from tkinter module
from tkinter import *

# globally declare the expression variable
expression = ""


# Function to update expressiom
# in the text entry box
def press(num):
    # point out the global expression variable
    global expression

    # concatenation of string
    expression = expression + str(num)

    # update the expression by using set method
    equation.set(expression)


# Function to evaluate the final expression
def equalpress():
    # Try and except statement is used
    # for handling the errors like zero
    # division error etc.

    # Put that code inside the try block
    # which may generate the error
    try:

        global expression

        # eval function evaluate the expression
        # and str function convert the result
        # into string
        total = str(eval(expression))

        equation.set(total)

        # initialze the expression variable
        # by empty string
        expression = ""

    # if error is generate then handle
    # by the except block
    except:

        equation.set(" error ")
        expression = ""


# Function to clear the contents
# of text entry box
def clear():
    global expression
    expression = ""
    equation.set("")


# Driver code
if __name__ == "__main__":
    # create a GUI window
    gui = Tk()

    # set the background colour of GUI window
    gui.configure(background="light green")

    # set the title of GUI window
    gui.title("Simple Calculator by faiasl")

    # set the configuration of GUI window
    gui.geometry("265x125")

    # StringVar() is the variable class
    # we create an instance of this class
    equation = StringVar()

    # create the text entry box for
    # showing the expression .
    expression_field = Entry(gui, textvariable=equation)

    # grid method is used for placing
    # the widgets at respective positions
    # in table like structure .
    expression_field.grid(columnspan=4, ipadx=70)

    equation.set('enter your expression')

    # create a Buttons and place at a particular
    # location inside the root window .
    # when user press the button, the command or
    # function affiliated to that button is executed .
    button1 = Button(gui, text=' 1 ', fg='black', bg='light blue',
                    command=lambda: press(1), height=1, width=7)
    button1.grid(row=2, column=0)

    button2 = Button(gui, text=' 2 ', fg='black', bg='light blue',
                    command=lambda: press(2), height=1, width=7)
    button2.grid(row=2, column=1)

    button3 = Button(gui, text=' 3 ', fg='black', bg='light blue',
                    command=lambda: press(3), height=1, width=7)
    button3.grid(row=2, column=2)

    button4 = Button(gui, text=' 4 ', fg='black', bg='light blue',
                    command=lambda: press(4), height=1, width=7)
    button4.grid(row=3, column=0)

    button5 = Button(gui, text=' 5 ', fg='black', bg='light blue',
                    command=lambda: press(5), height=1, width=7)
    button5.grid(row=3, column=1)

    button6 = Button(gui, text=' 6 ', fg='black', bg='light blue',
                    command=lambda: press(6), height=1, width=7)
    button6.grid(row=3, column=2)

    button7 = Button(gui, text=' 7 ', fg='black', bg='light blue',
                    command=lambda: press(7), height=1, width=7)
    button7.grid(row=4, column=0)

    button8 = Button(gui, text=' 8 ', fg='black', bg='light blue',
                    command=lambda: press(8), height=1, width=7)
    button8.grid(row=4, column=1)

    button9 = Button(gui, text=' 9 ', fg='black', bg='light blue',
                    command=lambda: press(9), height=1, width=7)
    button9.grid(row=4, column=2)

    button0 = Button(gui, text=' 0 ', fg='black', bg='light blue',
                    command=lambda: press(0), height=1, width=7)
    button0.grid(row=5, column=0)

    plus = Button(gui, text=' + ', fg='black', bg='light blue',
                command=lambda: press("+"), height=1, width=7)
    plus.grid(row=2, column=3)

    minus = Button(gui, text=' - ', fg='black', bg='light blue',
                command=lambda: press("-"), height=1, width=7)
    minus.grid(row=3, column=3)

    multiply = Button(gui, text=' * ', fg='black', bg='light blue',
                    command=lambda: press("*"), height=1, width=7)
    multiply.grid(row=4, column=3)

    divide = Button(gui, text=' / ', fg='black', bg='light blue',
                    command=lambda: press("/"), height=1, width=7)
    divide.grid(row=5, column=3)

    equal = Button(gui, text=' = ', fg='black', bg='light blue',
                command=equalpress, height=1, width=7)
    equal.grid(row=5, column=2)

    clear = Button(gui, text='Clear', fg='black', bg='light blue',
                command=clear, height=1, width=7)
    clear.grid(row=5, column='1')

    # start the GUI
    gui.mainloop()



x = int(input(' enter any one number 1 to 10\n'.upper()))

while x < 11:
    a = input('    HI  \n\n')
    print('******    MY NAME IS "AI 7S2OS"   ******\n\n')
    a = input('    Unga Name Sollunga   \n\n')
    print('               welcome  '.upper(),a.upper(),'\n\n')
    f = int(input('enter the number\n\n'))

    for t in a:
        print(t,t,t,t,t,t,t,t,t,t,t)
        print()

    if f == 1 or f == 11 or f == 21 or f == 31 or f == 41 or f == 51 or f == 61 or f == 71 or f == 81 or f == 91 :
        print(' ennakku terinji nee oru loosu'.upper(),a.upper(),'\n\n')
    elif f == 2 or f == 12 or f == 22 or f == 32 or f == 42 or f == 52 or f == 62 or f == 72 or f == 82 or f == 92 :
        print('lifella konjam brain use pannu full dust aittu unnoda brain',a,'\n\n')
    elif f == 3 or f == 13 or f == 23 or f == 33 or f == 43 or f == 53 or f == 63 or f == 73 or f == 83 or f == 93 :
        print('nee human na irrukka chance illa',a,'\n\n')
    elif f == 4 or f == 14 or f == 24 or f == 34 or f == 44 or f == 54 or f == 64 or f == 74 or f == 84 or f == 94 :
        print("O my god indha",a,"nu name pathalle bayama irrukku\n\n")
    elif f == 5 or f == 15 or f == 25 or f == 35 or f == 45 or f == 55 or f == 65 or f == 75 or f == 85 or f == 95 :
        print('unnalla ethalla adikkallu neenaikkura',a,'\n\n')
    elif f == 6 or f == 16 or f == 26 or f == 36 or f == 46 or f == 56 or f == 66 or f == 76 or f == 86 or f == 96 :
        print(a,'indha namell type panna system na thangamatta viddichidduva\n\n')
    elif f == 7 or f == 17 or f == 27 or f == 37 or f == 47 or f == 57 or f == 67 or f == 77 or f == 87 or f == 97 :
        print('nee oru Dheiva piravitha',a,'\n\n')
    elif f == 8 or f == 18 or f == 28 or f == 38 or f == 48 or f == 58 or f == 68 or f == 78 or f == 88 or f == 98 :
        print(a,'nee monkeyllethu vanthannu proof pannidduva\n\n')
    elif f == 9 or f == 19 or f == 29 or f == 39 or f == 49 or f == 59 or f == 69 or f == 79 or f == 89 or f == 99 :
        print('unnalla patha ennakke kasstama irrukku eppadi brain illa ippadi irrukka',a,'\n\n')
    elif f == 0 or f == 10 or f == 20 or f == 30 or f == 40 or f == 50 or f == 60 or f == 70 or f == 80 or f == 90 :
        print('very dangerous person',a,'\n\n')
        print('laptop thotta konnudduva',a,'\n\n')
    elif f == 100 or f > 100 and f < 121:
        print('Ooo enna kodduma ',a,'\n\n')
        print('vallurathukku sapudalla , sapudurathukku valla kuddathu ',a,'\n\n')
    elif f == 121 or f > 121 and f < 131:
        print('nothing to say',a,'\n\n')
        print('unna pathi sonna system na thanga matta oddiddu illa viraus maridduva',a,'\n\n')
    else:
        print('ennakku terinji nee oru mental doctor porathu nallathu',a,'\n\n')
        print('visit your near by doctor fast',a,'\n\n')
    print()
    print('THANK YOU USING ME')
    print()
    print('GOOD DAY TO YOU')
    print()
    print('press " 11 " to EXIT\n')
    print('press " any number to " continue\n')
    if 11 == int(input('')):
        break
    else:
        x = int(input(' enter any one number 1 to 10\n'))





# creating a keyboard pro

from tkinter import *
class App:#class

    def __init__(self, master):
        frame = Frame(master)
        frame.pack()
       
        self.hi_there = Button(frame, text="A",fg="red",command=self.a)# create button with value
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="B",fg="red",command=self.b)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="c",fg="red",command=self.c)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="d",fg="red",command=self.d)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="e",fg="red",command=self.e)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="f",fg="red",command=self.f)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="g",fg="red",command=self.g)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="h",fg="red",command=self.h)
        self.hi_there.pack(side=LEFT)       
        self.hi_there = Button(frame, text="i",fg="red",command=self.i)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="j",fg="red",command=self.j)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="k",fg="red",command=self.k)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="l",fg="red",command=self.l)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="m",fg="red",command=self.m)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="n",fg="red",command=self.n)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="o",fg="red",command=self.o)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="p",fg="red",command=self.p)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="q",fg="red",command=self.q)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="r",fg="red",command=self.r)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="s",fg="red",command=self.s)
        self.hi_there.pack(side=LEFT)       
        self.hi_there = Button(frame, text="t",fg="red",command=self.t)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="u",fg="red",command=self.u)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="v",fg="red",command=self.v)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="w",fg="red",command=self.w)
        self.hi_there.pack(side=LEFT)       
        self.hi_there = Button(frame, text="x",fg="red",command=self.x)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="y",fg="red",command=self.y)
        self.hi_there.pack(side=LEFT)
        self.hi_there = Button(frame, text="z",fg="red",command=self.z)
        self.hi_there.pack(side=LEFT)

       
        self.button = Button(frame, text="QUIT" , fg="red",command=frame.quit)# button with out value
        self.button.pack(side=LEFT)

       
    def a(self):#storege value of button
       print("A")
    def b(self):
       print("B")
    def c(self):
        print("c")
    def d(self):
        print("d")
    def e(self):
       print("e")
    def f(self):
       print("f")
    def g(self):
        print("g")
    def h(self):
        print("h")
    def i(self):
       print("i")
    def j(self):
       print("j")
    def k(self):
        print("k")
    def l(self):
        print("l")
    def m(self):
       print("m")
    def n(self):
       print("n")
    def p(self):
        print("p")
    def q(self):
        print("q")
    def r(self):
       print("r")
    def s(self):
       print("s")
    def t(self):
        print("t")
    def v(self):
        print("v")
    def x(self):
       print("x")
    def w(self):
       print("w")
    def z(self):
        print("z")
    def u(self):
        print("u")
    def y(self):
        print("y")
    def o(self):
        print("o")



       
message_label = Label(text='Enter the text',font=('Verdana', 16))
output_label = Label(font=('Verdana', 16))
entry = Entry(font=('verdana', 20), width=20)
entry.grid(row=4, column=6)


# for label       
root = Tk()#import Tk

root.title("FAISAL")#for the title
w = Label(root, text='''THE KEYBOARD PRO''')
w.pack()
app = App(root)

root.mainloop()






from turtle import *
import turtle


turtle = turtle.Turtle()
def draw_square(turtle):
    turtle.width(7)
    turtle.color('red', 'yellow')
    turtle.begin_fill()
    turtle.forward(80)
    turtle.left(120)
    turtle.forward(100)
    turtle.left(60)
    turtle.forward(80)
    turtle.left(120)
    turtle.forward(100)
    turtle.left(60)
    turtle.end_fill()

    turtle.width(7)
    turtle.color('blue', 'yellow')
    turtle.forward(20)
    turtle.left(230)
    turtle.forward(70)
    turtle.left(60)
    turtle.forward(70)
    turtle.left(80)
    turtle.forward(20)
    turtle.left(270)
    turtle.forward(20)
    turtle.left(270)
    turtle.forward(40)
    turtle.left(270)
    turtle.forward(20)
    turtle.left(270)
    turtle.forward(20)
    turtle.up()
    turtle.left(50)
    turtle.forward(70)
    turtle.down()
    turtle.left(0)
    turtle.forward(70)
    turtle.left(180)
    turtle.forward(70)
    turtle.left(100)
    turtle.forward(70)

    turtle.left(270)
    turtle.forward(40)
    turtle.left(270)
    turtle.forward(20)
    turtle.left(270)
    turtle.forward(40)
    turtle.up()
    turtle.forward(90)
    turtle.down()
    turtle.circle(10)
    turtle.up()
    turtle.left(45)
    turtle.forward(15)
    turtle.down()
    turtle.forward(50)
    turtle.left(45)
    turtle.forward(60)
    turtle.left(20)
    turtle.forward(80)
    turtle.left(40)
    turtle.forward(70)
    turtle.left(40)
    turtle.forward(70)
    turtle.circle(10)
    turtle.up()
    turtle.left(120)
    turtle.forward(90)
    turtle.left(50)
    turtle.forward(120)
    turtle.down()

    turtle.width(5)
    turtle.color('red', 'yellow')
    turtle.circle(30)
    turtle.up()
    turtle.left(35)
    turtle.forward(10)
    turtle.down()
    turtle.width(7)
    turtle.color('blue', 'yellow')
    turtle.circle(7)
    turtle.up()
    turtle.left(70)
    turtle.forward(40)
    turtle.down()
    turtle.width(7)
    turtle.color('blue', 'yellow')
    turtle.circle(7)
    turtle.up()

    turtle.width(5)
    turtle.color('red', 'yellow')
    turtle.forward(90)
    turtle.down()
    turtle.left(70)
    turtle.forward(40)
    turtle.backward(40)
    turtle.left(50)
    turtle.forward(40)
    turtle.left(340)
    turtle.backward(35)
    turtle.left(70)
    turtle.forward(40)
    turtle.backward(40)
    turtle.left(290)
    turtle.forward(17)
    turtle.left(70)
    turtle.forward(40)
    turtle.backward(65)



    done()


t = Turtle()
draw_square(t)




  THINK TRONE 


ANNAI COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPT OF CSE 


print("anitha") 


from turtle import*
import turtle as a
a.bgcolor("black")
a.pensize(16)

def ani():
    for i in range(200):
        a.right(1)
        a.forward(1)
a.speed(0)
a.color("red","pink")
a.begin_fill()
a.left(140)
a.forward(111.65)
ani()
a.left(120)
ani()
a.forward(111.65)
a.end_fill()
a.hideturtle()


a.right(1)
a.forward(1)
a.speed(0)
a.color("blue","red")
a.begin_fill()
a.left(210)
a.forward(111.65)
ani()
a.left(120)
ani()
a.forward(111.65)
a.end_fill()
a.hideturtle()

a.right(1)
a.forward(1)
a.speed(0)
a.color("brown","green")
a.begin_fill()
a.left(210)
a.forward(111.65)
ani()
a.left(120)
ani()
forward(111.65)
a.end_fill()
a.hideturtle()


a.right(1)
a.forward(1)
a.speed(0)
a.color("orange","yellow")
begin_fill()
a.left(210)
a.forward(111.65)
ani()
a.left(120)
ani()
a.forward(111.65)
a.end_fill()
a.hideturtle()


a.right(1)
a.forward(1)
a.speed(0)
a.color("green","blue")
a.begin_fill()
a.left(210)
a.forward(111.65)
ani()
a.left(120)
ani()
a.forward(111.65)
a.end_fill()
a.hideturtle()



  THINK TRONE 


ANNAI COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPT OF CSE 



print("anitha")


import turtle

t = turtle.Turtle()
t.speed(10)
cl=['red','green','blue']
d=200
angle = 140
for i in range(1,100):
       t.pencolor(cl[2])
       t.forward(d)
       t.left(angle)
       d=d-1
      


   THINK TRONE 


ANNAI COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPT OF CSE 



print("anitha")

from turtle import*
import turtle as a
a.width(12)
a.bgcolor('black')
a.color('blue')
a.begin_fill()
a.left(60)
a.forward(160)
a.right(60)
a.forward(160)
a.right(60)
a.forward(160)
a.right(60)
a.right(60)
a.forward(320)


a.begin_fill()
a.left(90)
a.forward(180)
a.left(90)
a.forward(320)
a.left(90)
a.forward(180)




a.right(90)
a.forward(290)
a.left(120)
a.forward(150)
a.left(60)
a.forward(290)

a.right(180)
a.forward(290)
a.right(60)
a.forward(150)


a.right(30)
a.forward(180)
a.right(90)
a.forward(290)
a.left(180)
a.forward(90)
a.left(90)
a.forward(60)
a.right(90)
a.forward(40)
a.right(90)
a.forward(60)
a.right(90)
a.forward(270)

a.right(90)
a.forward(80)
a.left(90)
a.forward(60)
a.left(90)
a.forward(80)

a.right(90)
a.forward(410)
a.right(90)
a.forward(180)
a.right(90)
a.forward(290)

a.left(60)
a.forward(320)
a.right(120)
a.forward(160)
a.right(120)
a.forward(160)
a.left(60)
a.forward(10)
a.right(60)
a.forward(290)
a.left(60)
a.forward(150)


a.left(30)
a.forward(180)
a.left(90)
a.forward(90)
a.left(90)
a.forward(90)
a.right(90)
a.forward(70)
a.right(90)
a.forward(90)
a.done()


   THINK TRONE 


ANNAI COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPT OF CSE 


print("maya")




# program 1
import turtle

colors = ['red','purple','blue','green','orange','yellow']
t = turtle.Pen()
turtle.bgcolor('black')
for x in range(120):
    t.pencolor(colors[x%6])
    t.width(x/100+1)
    t.forward(x)







# program 2

import turtle

colors = ['red','purple','blue','green','orange','yellow']
t = turtle.Pen()
turtle.bgcolor('black')
for x in range(120):
    t.pencolor(colors[x%6])
    t.width(30)
    t.forward(10)





# program 3

import turtle

colors = ['red','purple','blue','green','orange','yellow']
t = turtle.Pen()
turtle.bgcolor('black')
for x in range(120):
    t.pencolor(colors[x%6])
    t.width(300)
    t.forward(50)

   THINK TRONE 


ANNAI COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPT OF CSE 


print("maya")

import turtle
t=turtle.Turtle()
turtle.bgcolor('light green')
t.color('black')

def maya():
    t.width(7)
    t.left(60)
    t.forward(170)
    t.right(120)
    t.forward(170)
    t.right(120)
    t.forward(170)
   
   
    t.left(90)
    t.forward(200)
    t.left(90)
    t.forward(170)
    t.left(90)
    t.forward(200)

    t.right(90)
    t.forward(250)
    t.left(120)
    t.forward(170)
    t.left(60)
    t.forward(250)
    t.backward(250)
    t.left(120)
    t.forward(170)

    t.right(29)
    t.forward(200)
    t.right(91)
    t.forward(250)
    t.forward(50)
    t.right(90)
    t.forward(100)
    t.left(90)
    t.forward(75)
    t.left(90)
    t.forward(100)

maya()  
turtle.done()








  THINK TRONE 


ANNAI COLLEGE OF ENGINEERING AND TECHNOLOGY
DEPT OF CSE  


print("faizal")


simple adding and saving system in file and using tkinter


from tkinter import *
from os import path
save = 'data.txt'
a = 0
b = 0
c = 0
d = 0
e = 0
f = 0
date = 'A.faisal'
def ca():
    global a
    a = float(ety.get())
    ot.configure(text=("amount 1 = :".upper(),a))
    ety.delete(0, END)
    print(a)
def ca1():
    global b
    b = float(ety1.get())
    ot1.configure(text=("amount 2 = :".upper(),b))
    ety1.delete(0, END)
    print(b)
def ca2():
    global c
    c = float(ety2.get())
    ot2.configure(text=("amount 3 = :".upper(),c))
    ety2.delete(0, END)
    print(c)
def ca3():
    global d
    d = float(ety3.get())
    ot3.configure(text=("amount 4 = :".upper(),d))
    ety3.delete(0, END)
    print(d)
def ca4():
    global e
    e = float(ety4.get())
    ot4.configure(text=("amount 5 = :".upper(),e))
    ety4.delete(0, END)
    print(e)

def tol():
    global f
    f = a+b+c+d+e
    ot5.configure(text=("total: = ".upper(),f))

def dat():
    global date
    date = (ety6.get())
    ot6.configure(text=("date: = ".upper(),date))
    ety6.delete(0, END)

   

root = Tk()
root.title(" just for total by AF")
#a entry
mge = Label(text='Enter the work amount',font=('Verdana', 16),width = 34 ,bg='light blue',height = 2)
ot = Label(font=('Verdana', 12))
ety = Entry(font=('verdana', 16), width=10)
pro = Button(text='OK', font=('Verdana', 16),bg='light blue', command=ca)
mge.grid(row=0, column=1)
ety.grid(row=0, column=2)
pro.grid(row=0, column=7)
ot.grid(row=1, column=2, columnspan=10)

#b entry
mge1 = Label(text='Enter the part time  amount',font=('Verdana', 16),width = 34 ,bg='light blue',height = 2)
ot1 = Label(font=('Verdana', 12))
ety1 = Entry(font=('verdana', 16), width=10)
pro1 = Button(text='OK', font=('Verdana', 16), bg='light blue', command=ca1)
mge1.grid(row=2, column=1)
ety1.grid(row=2, column=2)
pro1.grid(row=2, column=7)
ot1.grid(row=3, column=2, columnspan=10)

#c entry
mge2 = Label(text='Enter the official amount',font=('Verdana', 16),width = 34 ,bg='light blue',height = 2)
ot2 = Label(font=('Verdana', 12))
ety2 = Entry(font=('verdana', 16), width=10)
pro2 = Button(text='OK', font=('Verdana', 16),bg='light blue', command=ca2)
mge2.grid(row=4, column=1)
ety2.grid(row=4, column=2)
pro2.grid(row=4, column=7)
ot2.grid(row=5, column=2, columnspan=10)

#d entry
mge3 = Label(text='Enter the etho amount',font=('Verdana', 16),width = 34 ,bg='light blue',height = 2)
ot3 = Label(font=('Verdana', 12))
ety3 = Entry(font=('verdana', 16), width=10)
pro3 = Button(text='OK', font=('Verdana', 16),bg='light blue', command=ca3)
mge3.grid(row=6, column=1)
ety3.grid(row=6, column=2)
pro3.grid(row=6, column=7)
ot3.grid(row=7, column=2, columnspan=10)

#e entry
mge4 = Label(text='Enter the extra amount',font=('Verdana', 16),width = 34 ,bg='light blue',height = 2)
ot4 = Label(font=('Verdana', 12))
ety4 = Entry(font=('verdana', 16), width=10)
pro4 = Button(text='OK', font=('Verdana', 16),bg='light blue', command=ca4)
mge4.grid(row=8, column=1)
ety4.grid(row=8, column=2)
pro4.grid(row=8, column=7)
ot4.grid(row=9, column=2, columnspan=10)

#tol entry
mge5 = Label(text='TOTAL',font=('Verdana', 16),width = 34 ,bg='light blue',height = 2)
ot5 = Label(font=('Verdana', 20))
pro5 = Button(text='OK', font=('Verdana', 16),bg='light blue', command=tol)
mge5.grid(row=10, column=1)
pro5.grid(row=10, column=7)
ot5.grid(row=11, column=2, columnspan=10)

#date entry
mge6 = Label(text='Enter the date',font=('Verdana', 16),width = 34 ,bg='light blue',height = 2)
ot6 = Label(font=('Verdana', 12))
ety6 = Entry(font=('verdana', 16), width=10)
pro6 = Button(text='OK', font=('Verdana', 16),bg='light blue', command=dat)
mge6.grid(row=12, column=1)
ety6.grid(row=12, column=2)
pro6.grid(row=12, column=7)
ot6.grid(row=13, column=2, columnspan=10)

root.mainloop()

def ca(self):
    print(calculate)
def ca1(self):
    print(calculate)
def ca2(self):
    print(calculate)
def ca3(self):
    print(calculate)
def ca4(self):
    print(calculate)
def tol(self):
    print(calculate)
def dat(self):
    print(calculate)

total = a+b+c+d+e
print(total)
a = str(a)
f = str(f)
c = str(c)
d = str(d)
e = str(e)
b = str(b)
date = str(date)
file = open(save,'a')
file.write('\n')
file.write(date)
file.write('\nwork amount        ')
file.write(a)
file.write('    \n')
file.write('part time amount   ')
file.write(b)
file.write('    \n')
file.write('official amount    ')
file.write(c)
file.write('    \n')
file.write('etho amount        ')
file.write(d)
file.write('    \n')
file.write('extra  amount      ')
file.write(e)
file.write('    \n')
file.write('\nTOTAL =            ')
file.write(f)
file.write('                 \n')  
file.close()
root = (root)




THINK TRONE



from turtle import *
import turtle as t

t.color('pink')
t.begin_fill()
t.right(300)
t.fd(200)
t.rt(120)
t.fd(200)
t.rt(120)
t.fd(200)
t.end_fill()

t.color('blue')
t.begin_fill()
t.rt(90)
t.backward(200)
t.rt(90)
t.fd(200)
t.lt(90)
t.fd(200)
t.end_fill()

t.color('green')
t.begin_fill()
t.rt(90)
t.fd(300)
t.rt(90)
t.fd(200)
t.rt(90)
t.fd(300)
t.end_fill()

t.color('brown')
t.begin_fill()
t.rt(90)
t.fd(200)
t.rt(330)
t.fd(200)
t.rt(120)
t.fd(300)
t.rt(60)
t.fd(200)
t.rt(120)
t.fd(300)
t.end_fill()

t.penup()
t.fd(60)
t.rt(90)
t.backward(50)
t.pendown()

t.color('white')
t.begin_fill()
t.backward(140)
t.lt(90)
t.fd(80)
t.rt(90)
t.fd(140)
t.rt(90)
t.fd(80)
t.end_fill()

t.color('brown')
t.begin_fill()
t.rt(140)
t.fd(50)
t.lt(230)
t.backward(110)
t.rt(90)
t.fd(38.5)
t.lt(90)
t.fd(142)
t.end_fill()  # by    p. Abirami



import turtle
t = turtle.pen()
turtle.bgcolor('skyblue')
turtle.width(5)
def curve():
    for i in range(200):
        turtle.right(1)
        turtle.fd(1)
turtle.speed(2)
turtle.color('red','pink')
turtle.begin_fill()
turtle.lt(140)
turtle.fd(111.65)
curve()
turtle.lt(120)
curve()
turtle.fd(111.65)
turtle.end_fill()

turtle.penup()
turtle.left(90)
turtle.backward(300)
turtle.pendown()

def aaa():
    for i in range(200):
        turtle.right(1)
        turtle.forward(1)
turtle.speed(2)
turtle.color('blue','yellow')
turtle.begin_fill()
turtle.lt(140)
turtle.fd(111.65)
aaa()
turtle.lt(120)
aaa()
turtle.fd(111.65)
turtle.end_fill()

#turtle.color('skyblue')
#turtle.forward(100)

turtle.penup()
turtle.right(70)
turtle.backward(300)
turtle.pendown()

def bbbb():
    for i in range(200):
        turtle.right(1)
        turtle.forward(1)
turtle.speed(2)
turtle.color('green','red')
turtle.begin_fill()
turtle.lt(140)
turtle.fd(111.65)
aaa()
turtle.lt(120)
bbbb()
turtle.fd(111.65)
turtle.end_fill()


turtle.penup()
turtle.left(90)
turtle.forward(100)
turtle.left(110)
turtle.forward(450)
turtle.pendown()
def cccc():
    for i in range(200):
        turtle.right(1)
        turtle.forward(1)
turtle.speed(2)
turtle.color('black','orange')
turtle.begin_fill()
turtle.rt(140)
turtle.fd(111.65)
cccc()
turtle.lt(120)
cccc()
turtle.fd(111.65)
turtle.end_fill()
turtle.done()         # p. Abirami



© 2021 Thinker Trone . All Rights Reserved