Posts

Showing posts from May, 2021

How to add two numbers in python?

  What is Python ? Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. web development (server-side), software development, mathematics, system scripting. Steps: Given two numbers num1 and num2 . The task is to write a Python program to find the addition of these two numbers. In the below program to add two numbers, the user is first asked to enter two numbers and the input is scanned using the input() function and stored in the variables number1 and number2. Then, the variables number1 and number2 are added using the arithmetic operator + and the result is stored in the variable sum. Below is the Python program to add two numbers: Example: # Python3 program to add two numbers num1 = 15 num2 = 12 # Adding two nos sum = num1 + num2 # printing values print("Sum of {0} and {1} is {2}" .format(num1, num2, sum)) Example 2: # Python3 program to add two numbers number1 = input("First number: ") number2 = input("\nSecon

What is the step by step working of a compiler?

  The  compiler  operates in various stages, and each stage converts the source program from one representation to another. There are  6 steps(phases)  in a compiler. Each step (phases) helps to convert high level to machine code. Lexical Analysis Syntax Analysis Semantic Analysis Intermediate Code Generator Code Optimizer Code generator If you want to learn all 6 phases of the compiler I gave you a link and check out this link - Phases of Compiler with Example What are the Phases of Compiler Design? Compiler operates in various phases each phase transforms the source program from one representation to another. Every phase takes inputs from its previous stage and feeds its output to the next phase of the compiler. There are 6 phases in a compiler. Each of this phase help in converting the high-level langue the machine code. The phases of a compiler are: Lexical analysis Syntax analysis Semantic analysis Intermediate code generator Code optimizer Code generator Phases of Compiler All th

How does assistance in the complete CDR report writing work?

  Your   CDR opens the door to a successful business in  Australia .  Ideally, you should not take any risks for this and endanger this wonderful opportunity in order to have a bright future in the new world. Therefore, it is very important that you should do your best to write the  CDR  yourself, but still, have a professional review it. Or, hire top experts to provide comprehensive assistance for  CDR writing. In the former, you will handle  all three parts  of the  CDR  yourself and submit them to the professional  CDR writers and engineers of   CDRReport for review . After their review, the team will share a detailed assessment with you, highlighting areas for improvement. In the latter, you share the CDR writing requirements with experts, and they will handle the entire report for you. In this case, the author will have a detailed discussion with you to understand the necessary documents and evidence to verify your claims about CPD and career. You can also discuss the subject of &

How can a person create a package in python IDLE?

What is  python : Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. What is a package in python : A package is basically a directory containing Python files and a file named __init__. py. This means that every directory in the Python path contains a file named __init__. py will be treated as a package by Python. To create packages in python we need to do follow 3 simple steps 1.  Firstly we create a directory file and gives its package name. 2.  Then we put the classes and required functions in it. 3.  Finally we create an __init__.py file inside the directory because python knows the directory is a package.