Skip to content

Commit a1ada5f

Browse files
committed
merge~3
1 parent 4532eac commit a1ada5f

File tree

75 files changed

+8837
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+8837
-0
lines changed

Indian Capital Game/Indian Map.gif

17.1 KB
Loading

Indian Capital Game/main.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import turtle
2+
import pandas
3+
4+
data= pandas.read_csv("indian_capital.csv")
5+
screen=turtle.Screen()
6+
its = turtle.Turtle()
7+
screen.title("Indian States Guess")
8+
screen.addshape("Indian Map.gif")
9+
turtle.shape("Indian Map.gif")
10+
11+
# Here generate X and y coordinate in map of each state
12+
13+
# def get_x_y(x, y):
14+
# state_name=screen.textinput(title="state_name", prompt="enter")
15+
# print(state_name)
16+
# print(x, y)
17+
#
18+
# screen.onscreenclick(get_x_y)
19+
# turtle.mainloop()
20+
21+
guessed_state_list ={}
22+
23+
while len(guessed_state_list)<31:
24+
guess_states= (screen.textinput(title=f"{len(guessed_state_list)} |50 States Correct", prompt="Guess Indian States")
25+
.title())
26+
27+
states= data.States.to_list()
28+
29+
if guess_states == "Exit":
30+
not_guess_state = []
31+
for i in states:
32+
if i not in guessed_state_list:
33+
not_guess_state.append(i)
34+
data = pandas.DataFrame(not_guess_state)
35+
data.to_csv('which you not answered.csv')
36+
break
37+
38+
elif guess_states in states:
39+
40+
if guess_states not in guessed_state_list:
41+
guessed_state_list.append(guess_states)
42+
its = turtle.Turtle()
43+
its.hideturtle()
44+
its.penup()
45+
coordinates=data[data.States==guess_states]
46+
its.goto(coordinates.x.item(), coordinates.y.item())
47+
its.write(guess_states)
48+
49+
50+
screen .exitonclick()
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
for i in range(5):
2+
for j in range(5-i):
3+
print(" ",end=" ")
4+
for j in range(1):
5+
print("*",end=" ")
6+
# for j in range(5-i):
7+
# print("*",end=" ")
8+
# for j in range(i):
9+
# print("*",end=' ')
10+
# for j in range(1):
11+
# print("*",end=" ")
12+
print()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
x=4
2+
3+
def hello():
4+
global x
5+
x=5
6+
print(x)
7+
hello()
8+
print(x)

PYTHON/Python Codes/main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# from math import sqrt , pi
2+
# result= sqrt(9)
3+
# print(result)
4+
# a=result*pi
5+
# print(a)
6+
# import time
7+
# print(dir(time))
8+
9+
# import shubham
10+
11+
# shubham.hello()

PYTHON/Python Codes/os module.py

Whitespace-only changes.

PYTHON/Python Codes/shubham.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
def hello():
2+
print("hello shubham")
3+
if __name__== "__main__":
4+
hello()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
sqr=[]
2+
x=int(input())
3+
4+
for x in range(x):
5+
6+
j=int(input())
7+
8+
sqr.append(j)
9+
print(sqr)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# decode the given msg
2+
def main():
3+
print("the program converts a sequence of unicode number into")
4+
print("the string of text that it represents.\n")
5+
6+
inString=input("enter the unicode- decode:")
7+
message=""
8+
9+
print("\nHere are the Unicode codes:")
10+
11+
for numstr in inString.split():
12+
Codenum=int(numstr)
13+
message=message+chr(Codenum)
14+
print(message)
15+
16+
main()
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#encode the given message
2+
def main():
3+
print("the program converts a textual message into a sequence")
4+
print("of numbers reprsenting the unicode encoding of the message.")
5+
6+
message = input("enter the number you want to encode:")
7+
8+
print("\nHere are the Unicode codes:")
9+
10+
for ch in message:
11+
print(ord(ch), end=" ")
12+
13+
14+
main()

0 commit comments

Comments
 (0)