What will happen if you open up a terminal, then type “import this”? In windows: >>> import this C:\Users\darwin>python Python 3.9.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Warning: This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail…
Category: Blog
Python>>String Interpolation and Formatting
String Interpolation is a process substituting values of variables into placeholders in a string Few methods as follow: a. .format() = is for simple positional formatting that uses to substitute in place of braces {}. Example: >> print (‘Welcome to {}’.format(‘ Linux Tutorials’)) Welcome to Linux Tutorials >> title = “Linux Tutorials” >>> print(‘Welcome to…
Basic Data Types in Python
There are few data types in Python namely: integers (int) – numeric type, whole numbers (can be positive or negative), e.g. 1,2,3 floating (float) – numeric type,numbers with decimal point, e.g. 1.1, 2.20, 3.450 complex (complex) – numeric type, real + imaginary,e.g. 5+6q strings (str) – text type, sequences of characters,e.g. “Euan”, “1234” dictionaries (dict)…
The immortal “Hello World”
To test our setup, we will going to run the very simple print code, and there’s no other contents better than the word “Hello World” Our very first code of course: print (‘Hello world’) Note: -it will be inside the open and close parenthesis -can use single or double quote There are few ways (in Window) 1….
Show me the Tools
Trying to document as much as possible on what tools or apps am I going to use to learn Python.I’m running dual boot OS on my laptop and I switch once in a while OS: Windows 10 Pro 64-bitUbuntu Linux 20.04 LTS Kernel 5.110-25-generic x86_64Tools: Jupyter Notebook via Anaconda.com (Individual Edition) it comes with the following apps…