Dictionary in Python PYTHON by Ravinder Nath Rajotiya - March 28, 2022March 29, 20220 DICTIONRY IN PYTHON Dictionary is a composite data type. It is used to represent records. The items in dictionary are represented by the key: value pairs. Declaration : A dictionary is declared by enclosing a comma-separated list of key-value pairs in curly braces. The value of an item is always accessed by using its key, therefore the key must be a unique name. Example dict={<key1> : <value>, <key2> : <value>, <key3> : <value>.......<keyn> : <value>} Th following define a dictionay that maps the capital to its country. capital_country = {‘Delhi’ : ‘India’, ‘Karachi’, ‘Pakistan’, ‘Kathmandu’ : ‘Nepal’ } Dictionary in python is similar to List in python. Let us see the similarty and differences between list and dictionary LIST DICTIONARY Is mutable Is mutable Can grow and shrink Can grow and
Tuple in Python PYTHON by Ravinder Nath Rajotiya - March 12, 2022March 20, 20220 Tuples Tuples in Python are similar to lists. A tuple is a sequence of comma separated numbers. A tuple can be decared as a sequence by enclosing or without enclosing them inside the () bracket and all elements are separated with commas. Elements in a tuple can be accessed via unpacking or indexing. Following are the two ways to declare the tuple in Python. a). Declaring and accessing tuple using indexing: >>>tup=(3,4,5,6,7) Or >>> tup=3,4,5,6,7 >>>tup1 (3,4,5,6,7) >>>tup[2] 5 >>>tup(3) 6 Since the tuple is immutable, A tuple does not have the append () or insert () method, nor can it be assigned to another element. >>>tup1=(3,4,5,6,7) >>>tup1[0]= 2 will give an error. TypeError: 'tuple' object does not support item assignment Because a tuple is unchangeable, the code is more secure. Therefore,
Introduction to Python PYTHON by Ravinder Nath Rajotiya - February 23, 2022March 13, 20220 Introduction to Python Python is one of the mostly used programming language in the world. Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. Guido van Rossum created this during 1985- 1990. Python is an open source programming language and its source code is available under the GNU General Public License (GPL). Some key features of python – Python is Interpreted: Python is processed at runtime by the interpreter. You do not need to compile your program before executing it. This is similar to PERL and PHP. Python is Interactive: You can sit at a Python prompt and interact with the interpreter directly to write your programs. Python is Object-Oriented: Python supports Object-Oriented style or technique of programming
De-Multiplexing the Address and Data bus 8085 8085 Microprocessor by Ravinder Nath Rajotiya - February 22, 2022February 23, 20220 Introduction 8085 is an 8-bit microprocessor an address a maximum of 216 = 65536 memory location. It has a total of 16-pin on the package which will be used to carry both the address as well as the data. The low order address lines are multiplexed with 8-data lines and hence the pin 11 to 19 on the 8085 microprocessor IC are numbered as AD7 - AD0 (pin 12-19), whereas the high order bus is marked as A15 - A8 (pin 21-28) as shown in following cut-section diagram. For accessing the memory full 16-bit address value must appear at once on pins A15 – A0 but the lower byte is not exclusively available to carry the address, it also carries the data. It
8086 Microprocessor Lab Environments 8086 Programming by Ravinder Nath Rajotiya - February 21, 2022February 21, 20220 Different ways to write 8086 Assembly Program Introduction The MPI Lab experiments can be performed using the microprocessor trainer kit or it can be performed using a PC installed with one of the different assembler available like MASM611, NASM, TASM and so on. It all depends on the instructor/faculty which one they prefer. The advantage with the trainer kit is that you can view the different ICs and other components on the kit, you can manually set certain settings using different jumpers/links on the motherboard and feel the concept of low level programming. You are required to first write the program on a coding sheet or notebook, then manually assemble it referring the mnemonic/hex code table and substituting the address all manually with