Author: Matthew
-
how to make an auto clicker
import pyautogui import keyboard import time import keyboard # pip install keyboard pyautogui.PAUSE = 0 time.sleep(2) sleep_time = 0.02 count = 100000000000 print(f”Autoclicking {count} times with {sleep_time} sleep. Press ‘q’ to stop early.”) for _ in range(count): if keyboard.is_pressed(‘q’): # check if user pressed q print(“Stopped by user.”)…
-
how to make your robot finch dance to music.
from BirdBrain import Finchimport random bird = Finch() print(“Sound: “, bird.getSound()) bird.getSound() def random_lights(t, count):for i in range(count):bird.setTail(1, random.randint(1,100),random.randint(1,100),random.randint(1,100))bird.setTail(2, random.randint(1,100),random.randint(1,100),random.randint(1,100))bird.setTail(3, random.randint(1,100),random.randint(1,100),random.randint(1,100))bird.setTail(4, random.randint(1,100),random.randint(1,100),random.randint(1,100)) while True:sound = bird.getSound()print(sound)if sound >= 50:break random_lights(.2, 10)for i in range(10):bird.setTurn(“R”,1000,100)bird.setTurn(“L”,1000,100)bird.print(“its chrismas time “)random_lights(.1, 30)
-
How to make hangman
import random words = [‘python’, ‘java’, ‘kotlin’, ‘javascript’, ‘ruby’, ‘swift’] #randomly choose a word from this list chosen_word = random.choice(words) word_display = [‘_’ for _ in chosen_word] # Create a list of underscores attempts = 8 # Number of allowed attempts print(“Welcome to hangman”) while attempts > 0 and ‘_’ in word_display: print(“\n”…