Cs Project File by Maneet Gupta Class 12 A1
Cs Project File by Maneet Gupta Class 12 A1
INTERNATIONAL
SCHOOL
Session 2023-24
:Investigatory Project:
“Satellite Management and Systems”
Execution:
dump = []
for i in master:
if (i[int(b[0])] == b[1]):
dump.append(i)
return dump
for i in master:
if (i[0] == satidd):
i[int(b[0])] = b[1]
print("Your data has been updated")
except:
print("TRY AGAIN")
Lets suppose I have to update the status of satellite of index
A01: Chandrayaan from ACTIVE to FINISHED, then the update
dialogue would look like:
turtle.write("")
while d == 1:
for i in range(5):
a = satid[i]
a.penup()
a.shape("circle")
a.shapesize(1)
a.color(colors[i])
c = speed[i] + 0.1
speed[i] = c
a.setpos(rad[i] * math.sin(c), rad[i] * math.cos(c))
a.pendown()
Using the power of python and turtle, we can animate satellites to
depict them around our planet earth.
def Describe(b):
a = datetime.datetime.now(pytz.timezone('Asia/Kolkata'))
print("************** Sattelite services Online *****************")
print("Date: ", a.date())
print("time", a.time())
print("----------------------------------------------------------------
------------")
print(
"**| Sattelite ID | Sattelite name | Company |
Date of Launch | Mission Status | Duration in orbit |")
for i in b:
print("--| ", end="")
for j in i:
x = (" " * (18 - len(j))) + "| "
print(j, end=x)
print()
Finally, we can close, save the file and exit the code using option
5
Using python and turtle I have created a nomial database visualiser.
def imagine():
d = 1
c = 1
screen = turtle.getscreen()
screen.bgcolor("black")
earth = turtle.getturtle()
earth.shapesize(3)
earth.color("blue")
earth.pencolor("green")
earth.pensize(3)
earth.shape("circle")
a1, a2, a3, a4, a5 = [turtle.Turtle(), turtle.Turtle(),
turtle.Turtle(), turtle.Turtle(), turtle.Turtle()]
satid = [a1, a2, a3, a4, a5]
colors = ["red", "orange", "yellow", "brown", "white"]
speed = [0.8, 0.6, 0.5, 0.4, 0.3]
rad = [100, 150, 200, 250, 300]
for a in range(5):
t = satid[a]
t = turtle.Turtle()
turtle.write("")
while d == 1:
for i in range(5):
a = satid[i]
a.penup()
a.shape("circle")
a.shapesize(1)
a.color(colors[i])
c = speed[i] + 0.1
speed[i] = c
a.setpos(rad[i] * math.sin(c), rad[i] *
math.cos(c))
a.pendown()
def add():
try:
a =
datetime.datetime.now(pytz.timezone('Asia/Kolkata'))
n = int(input("Enter the number of entries you wish to
enter: "))
for i in range(n):
a1 = input("Enter Sattelite ID: ")
a2 = input("Enter Sattelite Name: ")
a3 = input("Enter Sattelite Company: ")
a4 = input("Enter Sattelite Date of launch in
yyyymmdd: ")
a5 = input("Enter Mission Status: ")
y =
datetime.datetime.now(pytz.timezone('Asia/Kolkata'))
x = datetime.date(int(a4[:4]), int(a4[4:6]),
int(a4[6:8]))
a6 = y.date() - x
z = (a4[6:8]) + "-" + (a4[4:6]) + "-" + (a4[:4])
lst = [a1, a2, a3, z, a5, a6.__str__()]
master.append(lst)
if n != 1:
print("Entry ",i+1, " Successful")
error = 0
t = (master,error)
print("Congractulations, Entry ADDED succesfully!!!!")
return t
except:
print("TRY AGAIN")
def update():
try:
satidd = input("enter sattelite id you want to change:
")
print("Change parameter: index")
print(" Sattelite name: 1 || company: 2 || date of
launch: 3 || Mission Status :4")
change = input("enter parameter index you want to
change and new value seperated by space: ")
b = change.split()
for i in master:
if (i[0] == satidd):
i[int(b[0])] = b[1]
print("Your data has been updated")
except:
print("TRY AGAIN")
def filter():
print("Filter parameter: index")
print(" Sattelite name: 1 || company: 2 || date of
launch: 3 || Mission Status :4")
change = input("enter parameter index you want to filter
with and the value seprated by space: ")
b = change.split()
dump = []
for i in master:
if (i[int(b[0])] == b[1]):
dump.append(i)
return dump
def Describe(b):
a = datetime.datetime.now(pytz.timezone('Asia/Kolkata'))
print("************** Sattelite services Online
*****************")
print("Date: ", a.date())
print("time", a.time())
print("---------------------------------------------------
-------------------------")
print(
"**| Sattelite ID | Sattelite name | Company
| Date of Launch | Mission Status | Duration in orbit
|")
for i in b:
print("--| ", end="")
for j in i:
x = (" " * (18 - len(j))) + "| "
print(j, end=x)
print()
'''###########################################################
##############################################################
##############################################################
##############################################################
##############################################################
###################################'''
f = open("file.dat","rb+")
master = pickle.load(f)
x= 1
print("Welcome to satellite database managment system by
maneet gupta !!!!!!!!!")
while x == 1:
elif n == 4:
imagine()
elif n== 5:
x=0
pickle.dump(master,f)
print("Closed successfully")
f.close()
else:
Describe(master)
• https://www.python.org/
• https://docs.python.org/3/library/turtle.html
• https://www.google.com/
• https://www.geeksforgeeks.org/
• Computer science: NCERT Class 12