What is Variable?
- Named memory location used for storing the value in the entered by the user.
- Stores only one value at a time
What is Datatype?
Datatype determines type of value to be stored.
Example: Python Variable Declaration
# Variable in python
print(“Employee No. : “, empno)
print(“Employee Name=”, empName)
Python supports Dynamic Typing means based on the value stored in the Variable datatype will be automatically assigned to the variable.
type() function is used to Find the variable’s datatype at Run time.
Example: print(“empno – datatype :”, type(empno))
Next Part : Python Calculation
Win Corporate Training
Python First Program
#First program – Comment
Comment – #
- Provides the Description about the program
- Code will not be executed
- Prints the output at the Console.
- printing statements can be given within the Single or Double Quote.
Steps to Create the Program:
- Open the Python IDLE [ Integrated Development Learning Environment]
- Type the program at the Command Prompt.
How to create a file File
- File -> New in Python IDLE
- Type the program in the file and Save the file with extnesion .py.
- Press F5 – Function key to run the program.
4. View output at the command prompt.
Next Part : Python Variable and Datatype
Win Corporate Training
Excel Datedif() Function is used to find the difference between the Two date values in terms of No. of Years, Months and Days.
Online Excel Course: https://www.apnacourse.com/course/advanced-excel-2013
Excel Worksheet contains lot of formulas and Functions. When ever your sending the file for review we need to hide the formulas from viewing. Follow the steps to hide formulas
- Select All the Cells in the entire worksheet [use Ctrl + A ].
- Home tab Format -> Format Cells -> Protection Tab and Uncheck the Locked and Hidden Check box.
- Select the Cells which contains Formulas and Functions.
- Home tab Format -> Format Cells -> Protection Tab and Check the Locked and Hidden Check boxes.
- Review Tab -> Protect Sheet Option
- Type Password to Protect the Sheet. [Note Only values are visible and Formula will be hidden]
Do you know Ctrl + Enter can be used to fill contents and formula in all the selected cells at one shot!!!!.
- To Fill the Cells with Common Contents
- Select All the cells where you need to fill the contents.
- Type the content in the first cell like “Win”.
- Press Ctrl+Enter to fill all the Cells with Win!!!!.
To Fill the Cells with Formulas
- Select All the cells where you need to fill the formulas
- Type the formula in the First Cell.
- Press Ctrl+Enter to fill all the Cells with Formula.
1. Select the Cells which contains the Percentage values Like
2. Change the Number format to General and data will appear like
3. Enter the Number 100 in any cell and Copy this Number.
4. Select the Cells with Decimal values.
5. Select Paste Special and Multiplication option in Paste Special Dialog box.
6. Decimal number will change to Whole Numbers like