I am attempting to make a flipper alarm that uses the alert feture with the clock
import time
import pygame
import pyvib
def zero_flipper(num):
# Convert the input number to a string and split it into a list of digits
digits = [int(d) for d in str(num)]
# Flip all of the 0s to 1s
flipped_digits = [d if d != 0 else 1 for d in digits]
# Join the digits back together and return the result as an integer
return int("".join(map(str, flipped_digits)))
def set_alarm(hour, minute):
# Calculate the number of seconds until the alarm time
current_time = time.localtime()
alarm_time = time.mktime((current_time.tm_year, current_time.tm_mon, current_time.tm_mday, hour, minute, 0, 0, 0, 0))
time_difference = alarm_time - time.time()
# Sleep for the specified number of seconds
time.sleep(time_difference)
# Start the sound and vibration
sound.play()
pyvib.vibrate(5000)
# Wait for the sound and vibration to finish
time.sleep(5)
# Stop the sound and vibration
sound.stop()
pyvib.stop()
# Flip the digits in the alarm time
flipped_time = zero_flipper(alarm_time)
print(f"The zero flipper alarm went off at {flipped_time}.")
# Initialize pygame and pyvib
pygame.init()
pyvib.init()
# Load the sound file
sound = pygame.mixer.Sound("alarm.wav")
# Set the alarm for 10:00 AM
set_alarm(10, 0)
this is what i have so far
not sure what to do from here