Skip to content

Commit 28e22a3

Browse files
Merge pull request #3056 from mr-d-luffy/mr-temp
Mr temp
2 parents 8350a0f + 64ecc54 commit 28e22a3

File tree

8 files changed

+57
-38
lines changed

8 files changed

+57
-38
lines changed

BrowserHistory/rock_paper_scissors.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
2-
Rock, Paper, Scissors Game (CLI Version)
2+
Triple Round : Rock, Paper, Scissors Game (CLI Version)
3+
Final round is the Winning Round
34
Author: Your Name
45
"""
56

@@ -38,10 +39,13 @@ def decide_winner(player, computer):
3839

3940
def main():
4041
"""Main function to play the game."""
41-
user_choice = get_user_choice()
42-
computer_choice = get_computer_choice()
43-
print(f"Computer chose: {computer_choice}")
44-
print(decide_winner(user_choice, computer_choice))
42+
for i in range(1, 4):
43+
print(f"round -> {i}\n")
44+
user_choice = get_user_choice()
45+
computer_choice = get_computer_choice()
46+
print(f"Computer chose: {computer_choice}")
47+
48+
print(f"Final result : {decide_winner(user_choice, computer_choice)}")
4549

4650

4751
if __name__ == "__main__":

BrowserHistory/tests/test_browser_history.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ def test_complex_navigation(self):
8888
# Verify we can't go forward to cleared history
8989
self.assertEqual(self.browser.forward(1), "page4.com")
9090

91-
91+
# starting point of code
9292
if __name__ == "__main__":
9393
unittest.main()

Cat/cat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def no_files():
4747
# Graceful exit for Ctrl + C, Ctrl + D
4848
except KeyboardInterrupt:
4949
exit()
50+
# exit when no data found in file
5051
except EOFError:
5152
exit()
5253

oryx-build-commands.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PlatformWithVersion=Python
2+
BuildCommands=conda env create --file environment.yml --prefix ./venv --quiet

sha1.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,6 @@ def main():
132132
print(SHA1Hash(hash_input).final_hash())
133133

134134

135+
# starting point of code
135136
if __name__ == "__main__":
136137
main()

voice.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1+
# modules for use of voice
12
from gtts import gTTS
3+
from colorama import Fore
24
import os
35

46
# Define the text you want to convert to speech
57
text = "Hello! This is a sample text to convert to speech."
68

7-
# Create a gTTS object
8-
tts = gTTS(text=text, lang="en")
9+
# Exception Handaled.
10+
try:
11+
# Create a gTTS object
12+
tts = gTTS(text=text, lang="en")
913

10-
# Save the audio file
11-
tts.save("output.mp3")
14+
# Save the audio file in mp3 format
15+
tts.save("output.mp3")
1216

13-
# Play the audio file
14-
os.system("start output.mp3")
17+
# Play the audio file from system
18+
os.system("start output.mp3")
19+
except Exception as e:
20+
print(Fore.RED, e, Fore.RESET)

vowel remover function.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ def vowel_remover(text):
44
if l.lower() not in "aeiou":
55
string += l
66
return string
7-
print(vowel_remover("hello world!"))
7+
8+
# this code runes on only this file
9+
if __name__=="__main__":
10+
print(vowel_remover("hello world!"))

youtubedownloader.py

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,33 @@ def download():
2020
except Exception:
2121
messagebox.showerror("Error", "An error occurred while downloading the video.")
2222

23+
24+
# This code runes on only this file
25+
if __name__=="__main__":
26+
root = Tk()
27+
root.title("YouTube Downloader")
28+
root.geometry("780x500+200+200")
29+
root.configure(bg="olivedrab1")
30+
root.resizable(False, False)
31+
# Label widgets
32+
introlable = Label(
33+
root,
34+
text="YouTube Video Downloader",
35+
width=30,
36+
relief="ridge",
37+
bd=4,
38+
font=("chiller", 26, "italic bold"),
39+
fg="red",
40+
)
41+
introlable.place(x=35, y=20)
2342

24-
root = Tk()
25-
root.title("YouTube Downloader")
26-
root.geometry("780x500+200+200")
27-
root.configure(bg="olivedrab1")
28-
root.resizable(False, False)
29-
# Label widgets
30-
introlable = Label(
31-
root,
32-
text="YouTube Video Downloader",
33-
width=30,
34-
relief="ridge",
35-
bd=4,
36-
font=("chiller", 26, "italic bold"),
37-
fg="red",
38-
)
39-
introlable.place(x=35, y=20)
43+
Label(root, text="Enter YouTube Link", font=("sans-serif", 16), bg="olivedrab1").place(
44+
x=40, y=150
45+
)
4046

41-
Label(root, text="Enter YouTube Link", font=("sans-serif", 16), bg="olivedrab1").place(
42-
x=40, y=150
43-
)
47+
url_box = Entry(root, font=("arial", 30), width=30)
48+
url_box.place(x=40, y=180)
4449

45-
url_box = Entry(root, font=("arial", 30), width=30)
46-
url_box.place(x=40, y=180)
47-
48-
btn = Button(root, text="DOWNLOAD", font=("sans-serif", 25), command=threading)
49-
btn.place(x=270, y=240)
50-
root.mainloop()
50+
btn = Button(root, text="DOWNLOAD", font=("sans-serif", 25), command=threading)
51+
btn.place(x=270, y=240)
52+
root.mainloop()

0 commit comments

Comments
 (0)