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 as r | |
def randomName(syllable: int, pattern: str) -> str: | |
out = [] | |
c, v = "bcdfghjklmnpqrstvwxz", "aeiouy" | |
for i in range(syllable): | |
buf = "" | |
for char in pattern: | |
if char.lower() == "c": | |
if r.choice((True, True, True, True, False)): |
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 clamp(num,l,h): | |
num=float(num) | |
if num<float(l):return float(l) | |
elif num>float(h):return float(h) | |
else:return num |
NewerOlder