- continue keyword in loops:
- same as break, but only to exit the current iteration and continue stay in the loop.
- basic algorithm of the maximum and minimum numbers.
- None-type:
- The None keyword is used to define a null value, or no value at all.
- None is not the same as 0, False, or an empty string. None is a data type of its own (NoneType) and only None can be None.
- shortcut conditions:
max_n=None; ... if max_n is None or num>max_n: max_n=num - instead max_num==0 you can write: max_n is None
- colors in console- build-in:
-
colors of tables references:
-
in the print() , you can style the output with text color, bold/bold intensity,underline ,background colors
-
examples:
print("\033[1;92mBINGO\033[0m") ## in BOLD with intensity in color green print(f"you guessed the number in \033[1;33m{tries}\033[0m tries") ## on the value of {tries} in yellow color print(f"\033[4;31mStatistical results:\033[0m") #text and underline in red
-