Python Function Review for Jetson Nano Projects Pt.1

It is sometimes necessary to hash-out a range of code functions to prepare for projects that are active and would likely require efficient origination and debugging. To get to project completion in the shortest period of time, that corresponds to what you wish to accomplish, having clarity about syntactical operation that corresponds to the language in use ends of saving quite a bit of time. Normally, fluency in a specific language generally involves continued and active use within a programming environment. Otherwise, it is expected that language familiarity or proficiency becomes rusty.

The purpose of this posting is merely to introduce and review Python iterative functions. The IF statement, While, and For to include Arrays are common structural program elements involved in projects around SBC technologies, or in this case the NVIDIA Jetson Nano. In this case, a simple program is set up to indicate the syntax written in the Linux nano utility launched from an Ubuntu terminal window. First the code is written for each iterative program type and there after it is executed to demonstrate expected results.

If Statement with conditional operators based upon a user entered number.
Executed program instructions to operate the program and obtain results.
If Statement with conditional operators based upon a user entered number. A modified version of the basic IF Statement program to indicate Even or Odd condition of a computed result.
Executed program instructions to operate the program and obtain positive or negative results.
An auto increment method of sequential count between a range of numbers. Using the For Statement to hold condition true and display to screen with appropriate formatting until finished.
All three types of numerical and sequential computation using the For Statement to demonstrate the range, arrange, and linspace functions of Python.
The While Statement that makes use of a float data type input to obtain a maximum count number. Incremented count occurs within the While loop with the displayed number appropriately formatted until the final number is reached.
Demonstrated operation of program to indicate results of While Statement. Where operation counts by an increment of 1 and remains in a loop until completion and exit from that loop.
Using a For Statement to demonstrate the function and use of Arrays. Code defines the parameters of two arrays that includes one for grade entries and the other for displayed results.
The For loop statement to accept user inputs and thereafter display all results accordingly.

About

Servant of Christ Jesus. U.S. Military Veteran, Electrical Engineer, Pepperdine MBA, and M.A. Biblical and Theological Studies.

,

Comments are closed.