Skip to main content

Getting Started With Python (1)

As per addition on my previous post on Python Basic Programming, I want to add how to download and install Python, running it, and create basic Python program.

Download and Install Python
You can visit official Python website, https://www.python.org/. The latest version, as per October 2018 is Python 3.7.1rc2 and I think it is advisable to start learning using latest version to avoid any problems with older, legacy version.
Python officially release version on many platforms, like Windows, Linux, Mac OS, and iOS.

Run IDLE (Integrated Development and Learning Environment) Python

With this IDLE, let's start writing Python program :

  •  Click File, then New File. We can also press Ctrl+N.
  • A blank editor window will open. That is for us write the code.
         
  • Enter the following commands on separate lines :
          print("Hello World")
          print("Welcome to Python for Beginner!")
          print("My name is Anityo")

  • To save file, click File, then Save, or press Ctrl+S
  • On Save As window, type Hello as the file name and then click Save.
  • Herewith the result :


The picture above also show the result of your file if you using IDLE.
Another way to open is using command prompt as follow :



Working in Interactive Mode using IDLE
Python can processes the code you entered in the shell window.
Let's try some commands :
1. Run IDLE and on the >>, enter the following command :
    print("My name is Anityo")
    press Enter, this will print My name is Anityo on the next line.
2. Let's try other commands :
    Enter 3+5, then press Enter and the result will appear on next line
    Enter 256*1.5/1024+4096-0.384 and press Enter.
3. Enter the following command with press Enter after each line
    x=10
    print(x)
    The answer 10 will appear on the next line
4. Enter the following command :
    name="Anityo"
    print(name)
    The answer Anityo will appear on the next line.
5. Enter print(x) once more and value 10 will appear as we defined x from before.
    
herewith the result :


To clear the IDLE, we can use this way :
Click Shell, then Restart Shell, or by pressing Ctrl+F6


Executing Python on Command Line
Other than using IDLE shell and editor window to create and run the programs that we write, we can use text editor to code our Python's program before running it on the command line.
I will try using Notepad and try to coding as follow :

Save the file into any folder of your computer with extension .py
To run that file, you can use command prompt and type the filename as follow :

Comments

Popular posts from this blog

Satellite Communication - Part 4 (CPI)

Cross Polar Isolation (CPI) In installation and pointing/peaking antenna, Orthogonal Mode Transducer (OMT) must be set to be as precise as possible to get the best CPI value. above is picture of OMT Feed assembly include with BUC and LNB The minimum value for CPI is 30 dB (better will be good) in Linier Polarized Antennas. The reason is for our receive (Rx)-side as not to get interferenced (distrubed) by other (polarity) Down-Link users, therefore our transmit (Tx) shoild as well not interfere other users that operates at 90 deg (Orthogonal) Polarization. Note : In LH/RH Circular Polarizations, usually CPI of 27dB (=AR of 1.09) is acceptable enough. picture above is careless/miss-aligned OMT setting

Satellite Communication : Transmission Bands

A satellite link is a radio link between a transmitting earth station and receiving earth station through a communications satellite. A satellite link consists of one uplink and one downlink; the satellite electronics (i.e., the transponder) will remap the uplink  frequency to the downlink frequency. The transmission channel of a satellite system is a radio channel using a direct-wave approach, operating in at specific RF bands within the overall electromagnetic spectrum as seen below : The table below shown some key of physical parameters of relevance to satellite communication,  The frequency of operation is in the super high frequency (SHF) range (3-30 GHz). Regulation and practice dictate the frequency of operation, the channel bandwidth, and the bandwidth of the subchannels within the larger channel. Different frequencies are used for the uplink and for the downlink. Frequencies above about 30 MHz can pass through the ionos...

Satellite Communication - Part 1

In this occasion, i want to share about Satellite communication. First, please look at the picture below, Planets of our Solar System God created Moon as our Earth satellite. In order to broading our communication, people tend to use artificial satellite for communication. Based on orbits, these are the type of satellites : Low Earth Orbit (LEO)              Height : 750-2500 Km,       Period : 2 - 2.5 hours Medium Earth Orbit (MEO)       Height : 7500-10000 Km,   Period : 4.5 - 6 hours High Earth Orbit (HEO)             Height : 15000-20000 Km, Period : 11-12 hours Geo-Stationary Orbit (GSO)      Height : 36000 Km,             Period : 24 hours Incline Orbit Satellite (drifting > 0.1 deg. N-S an...