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 oct_to_hex(oct): | |
# write your code here | |
oct_list = [int(number) for number in str(oct)] | |
number_pos = len(oct_list) - 1 | |
decimal_list = [] | |
for number in oct_list: | |
decimal_number = number | |
for _ in range(number_pos): | |
decimal_number *= 8 | |
number_pos -= 1 |
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 colorama import init, Fore, Back, Style | |
#اذا كنت تريد تشغيل الخطوط من ويندوز فعل هذه الدالة | |
init() | |
#الألوان الخطوط الموجودة | |
FORES = [ Fore.BLACK, Fore.RED, Fore.GREEN, Fore.YELLOW, Fore.BLUE, Fore.MAGENTA, Fore.CYAN, Fore.WHITE ] | |
# ألوان الخلفيات الموجودة | |
BACKS = [ Back.BLACK, Back.RED, Back.GREEN, Back.YELLOW, Back.BLUE, Back.MAGENTA, Back.CYAN, Back.WHITE ] | |
# شدة الألوان او الأضاءة | |
BRIGHTNESS = [ Style.DIM, Style.NORMAL, Style.BRIGHT ] |
NewerOlder