Skip to content

Commit 0e3fc9e

Browse files
authored
Add files via upload
1 parent 4cd483c commit 0e3fc9e

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

guess_game.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import random
2+
3+
secret_number = random.randint(1, 20)
4+
5+
print("I'm thinking a number between 1 to 20")
6+
7+
for guesses_taken in range(1, 7):
8+
print('Guess the number: ')
9+
guess = int(input())
10+
11+
if guess > secret_number:
12+
print('Your guess is too high')
13+
14+
elif guess < secret_number:
15+
print('Your guess is too low')
16+
17+
else:
18+
break
19+
20+
if guess == secret_number:
21+
print(f'You Won! You guess my number in {guesses_taken} guesses.')
22+
23+
else:
24+
print(f'Nope. The number I was thinking of was {secret_number}')

insta.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from instapy_cli import client
2+
from textwrap import dedent
3+
4+
username = 'atulkumar.98'
5+
6+
password = 'ABCD@1234'
7+
8+
img = 'IMG.jpg'
9+
10+
text = dedent("""This picture uploaded with python code on instagram' +
11+
'\r\n' + '#pythoncode #programming
12+
""")
13+
14+
with client(username, password) as cli:
15+
cli.upload(img, text)

0 commit comments

Comments
 (0)