Esempio n. 1
0
import time
import snaps
current_time = time.localtime()
hour = current_time.tm_hour
minute = current_time.tm_min

if (hour > 7) or (hour == 7 and minute > 29):
    snaps.display_message("TIME TO GET UP")
    snaps.play_sound("alarm.wav")
    time.sleep(10)
print("The time is", hour, ":", minute)
Esempio n. 2
0
# EG5-03 Siren Alarm Clock

import time
import snaps

current_time = time.localtime()

hour = current_time.tm_hour
minute = current_time.tm_min

if (hour > 7) or (hour == 7 and minute > 29):
    snaps.display_message('TIME TO GET UP')
    snaps.play_sound('siren.wav')
    # pause the program to give the sound time to play
    time.sleep(10)
Esempio n. 3
0
#Program z użyciem biblioteki SNAPS
#Wersja 1.1
#Autor: Oskar Tyniec
import pygame
import snaps
import time
snaps.display_image("background.jpg")
# Funkcja wyświetla tekst w kolorze 0,0,200 o rozmiarze 30 , usytuowany w lewo-horyzontalnie i na środek-vertykalnie
snaps.display_message("witaj w prostym programie",color=(255,255,255),size=40,horiz='right',vert='bottom')
time.sleep(3)
snaps.display_message("DING!")
snaps.play_sound("ding.wav")
time.sleep(3)
# EG3-06 Ding

import snaps

snaps.play_sound('ding.wav')