Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 54673fb

Browse files
Merge branch 'main' into main
2 parents 270073f + cb3a1b7 commit 54673fb

10 files changed

Lines changed: 1813 additions & 582 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,5 @@ cython_debug/
156156
.idea/
157157

158158
#.DS_Store
159-
.DS_Store.DS_Store
159+
.DS_Store
160+

README.md

Lines changed: 583 additions & 576 deletions
Large diffs are not rendered by default.

projects/Guess Number/guess_number.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
larger_number = 10
66
upper_limit = 10
77
lower_limit = 1
8-
num_of_guesses=0
98

109

1110
# function to prompt user for input. will continue to ask user for proper int if invalid num passed
@@ -36,25 +35,26 @@ def guess(num, user_guess):
3635
print(f"\nNumber is higher than {user_guess}")
3736
lower_limit = user_guess
3837
user_guess = enter_and_verification(lower_limit + 1, upper_limit)
39-
num_of_guesses++
38+
num_of_guesses=num_of_guesses+1
4039
elif num < user_guess:
4140
print(f"\nNumber is lower than {user_guess}")
4241
upper_limit = user_guess
4342
user_guess = enter_and_verification(lower_limit, upper_limit - 1)
44-
num_of_guesses++
43+
num_of_guesses=num_of_guesses+1
4544
else:
4645
print()
4746
print(f"\nCongrats! You've guessed the correct number! It was {num}.\n")
48-
print("\nYou have tried {num_of_guesses} times to find the number.\n")
47+
print(f"\nYou have tried {num_of_guesses+1} times to find the number.\n")
4948

5049

5150
# while loop to prompt user to play intially, then continue to play or not
5251
while True:
5352
play_y_n = input("Welcome to Number Guesser. If you'd like to play, press 'Y': ")
5453
if play_y_n.lower() == "y":
54+
num_of_guesses=0
5555
num = random.randint(smaller_number, larger_number)
5656
user_guess = enter_and_verification(lower_limit, upper_limit)
57-
guess(num, user_guess)
57+
guess(num, user_guess, num_of_guesses)
5858
else:
5959
print("Thanks for playing!")
6060
break

projects/Message-Spam/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# WhatsApp Random Message Sender
2+
3+
## Usage
4+
5+
1. Install required libraries:
6+
7+
- `pip install -r requirements.txt`
8+
9+
2. Run the script:
10+
```
11+
python mesaage_spam.py
12+
```
13+
14+
3. Follow on-screen instructions to log in to WhatsApp Web.
15+
16+
4. The script will send random messages to the current chat.
17+
18+
## Customization
19+
20+
- Edit the `messages` variable to change the list of messages to send.
21+
- Adjust the sleep interval for message timing..
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Import necessary libraries
2+
import random
3+
import pyautogui as pg
4+
import webbrowser as wb
5+
import time
6+
7+
# Define the WhatsApp Web URL
8+
web_url = "https://web.whatsapp.com"
9+
10+
# Open the web browser to the WhatsApp Web URL
11+
wb.open(web_url)
12+
13+
# Wait for 10 seconds to allow the user to log in by scanning the QR code
14+
time.sleep(10)
15+
16+
# List of messages to send
17+
messages = ('Hello', 'Hey', 'Good Morning')
18+
19+
# Send 10 random messages
20+
for _ in range(10):
21+
# Choose a random message from the list
22+
message = random.choice(messages)
23+
24+
# Type and send the message using PyAutoGUI
25+
pg.write(message)
26+
pg.press('enter')
27+
28+
# Pause for a random duration between 1 to 3 seconds
29+
time.sleep(random.uniform(1, 3))
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
random
2+
pyautogui
3+
webbrowser
4+
time

0 commit comments

Comments
 (0)