0% found this document useful (0 votes)
2 views4 pages

Python Fidget Spinner Game Project

The document outlines a mini project for a Python GUI application titled 'Fidget Spinner Game' created by a group of students from the Department of Computer Engineering at New Horizon Institute of Technology and Management. It includes a code snippet that utilizes the Turtle graphics library to create an animated fidget spinner game, where the spinner's rotation is controlled by user input. The project is part of their coursework for the academic year 2024-25.

Uploaded by

hannanwaknis232
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Python Fidget Spinner Game Project

The document outlines a mini project for a Python GUI application titled 'Fidget Spinner Game' created by a group of students from the Department of Computer Engineering at New Horizon Institute of Technology and Management. It includes a code snippet that utilizes the Turtle graphics library to create an animated fidget spinner game, where the spinner's rotation is controlled by user input. The project is part of their coursework for the academic year 2024-25.

Uploaded by

hannanwaknis232
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PYTHON MINI PROJECT

(Mini Project)
(SEM-IV)

PYTHON GUI APPLICATION ON


“FIDGET SPINNER GAME”

GROUP MEMBERS:

Tirtha Bharat Kharade, 12312077


Shubhadra Barik, 12312012
Madhura Birwadkar, 12312037

Department of Computer Engineering


New Horizon Institute of Technology and Management,Thane
(2024-25)
CODE:
from turtle import *
state = {'turn': 0}
def spinner():
clear()
angle = state['turn']/10
right(angle)
forward(100)
dot(120, 'red')
back(100)
right(120)
forward(100)
dot(120, 'green')
back(100)
right(120)
forward(100)
dot(120, 'blue')
back(100)
right(120)
update()
def animate():
if state['turn']>0:
state['turn']-=1
spinner()
ontimer(animate, 20)
def flick():
state['turn']+=10

setup(420, 420, 370, 0)


hideturtle()
tracer(False)
width(20)
onkey(flick, 'space')
listen()
animate()
done()
OUTPUT:

You might also like