Learners should be familiar with the following topics before completing this lesson:
- Arithmetic Operations
- String Operations
- Lists
range()
- Loops
- Conditionals
- Functions
Solution: Ubuntu distros lower than 18.10
will not work in this laptop, as minimum kernal version required is 4.18
.
So install ubuntu 18.10 / xubuntu 18.10 / lubuntu 18.10 / kubuntu 18.10 in UEFI
mode
# SGR color constants | |
# rene-d 2018 | |
class Colors: | |
""" ANSI color codes """ | |
BLACK = "\033[0;30m" | |
RED = "\033[0;31m" | |
GREEN = "\033[0;32m" | |
BROWN = "\033[0;33m" | |
BLUE = "\033[0;34m" |
# -*- coding: utf-8 -*- | |
# Print iterations progress | |
def print_progress(iteration, total, prefix='', suffix='', decimals=1, bar_length=100): | |
""" | |
Call in a loop to create terminal progress bar | |
@params: | |
iteration - Required : current iteration (Int) | |
total - Required : total iterations (Int) | |
prefix - Optional : prefix string (Str) |
-- | |
-- Table structure for table "site_cities" | |
-- | |
DROP TABLE IF EXISTS "site_cities" CASCADE; | |
CREATE TABLE "site_cities" ( | |
"city_id" serial NOT NULL, | |
"city_name" varchar(20) NOT NULL, | |
"plate_code" smallint NOT NULL, | |
"area_code" smallint NOT NULL, | |
"lat" decimal(20,8) NOT NULL, |