import random
import string
# The pool of characters to pick the characters for your password from
password_char_set = string.ascii_letters + string.digits + string.punctuation
def random_character():
return password_char_set[random.randint(0, len(password_char_set))]
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
COLOR_MAP = { | |
'black': '30', | |
'red': '31', | |
'green': '32', | |
'yellow': '33', | |
'blue': '34', | |
'magenta': '35', | |
'cyan': '36', | |
'white': '37', | |
} |
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
/* | |
TL;DR: Compile the program as follows: | |
------ | |
g++ add.cpp -O2 && ./a.out | |
RIGOROUS DISCUSSION: | |
-------------------- | |
Suppose you want to compute the sum of the series: |
NewerOlder