This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import * | |
score = 0 | |
fuse = 100 | |
pressEnter = True | |
def start(event): | |
global pressEnter | |
global fuse | |
global score | |
if not pressEnter: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from playsound import playsound | |
""" | |
def validate_time(alarm_time): | |
if len(alarm_time) != 11: | |
return "Invalid time format! Please try again..." | |
else: | |
if int(alarm_time[0:2]) > 12: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import * | |
eqal = "" | |
def render(): | |
global displayLabel | |
global eqal | |
displayLabel.config(text=eqal) | |
def one(): | |
global eqal | |
eqal += "1" | |
render() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from playsound import playsound | |
""" | |
def validate_time(alarm_time): | |
if len(alarm_time) != 11: | |
return "Invalid time format! Please try again..." | |
else: | |
if int(alarm_time[0:2]) > 12: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def corrector(string, width, symbol): | |
a = width-len(string) | |
b = a//2 | |
result = f'{symbol*b}{string}{symbol*b}' | |
return result | |
print(corrector('ABOBA', 50, "-")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def game(result): | |
print("") | |
print("====== Start Game: Rock, Paper, Scissors! ======") | |
while result['computer'] == 3 or result['player'] == 3: | |
choice = input("Select R / P / S / L / Z(spock) >>") | |
computer_choice = random.choice("rpslz") | |
print('You selected ---', str.capitalize(choice)) | |
if str.lower(choice) == computer_choice: | |
print("Draw") |