0% found this document useful (0 votes)
14 views1 page

Dynamically Typed

The document discusses two types of programming languages: Static Typed and Dynamically Typed. Static Typed languages require mandatory variable declaration and do not allow changing data types, while Dynamically Typed languages automatically assign data types based on assigned values, providing more flexibility. Examples include Java and C for Static Typed, and Python and JavaScript for Dynamically Typed languages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Dynamically Typed

The document discusses two types of programming languages: Static Typed and Dynamically Typed. Static Typed languages require mandatory variable declaration and do not allow changing data types, while Dynamically Typed languages automatically assign data types based on assigned values, providing more flexibility. Examples include Java and C for Static Typed, and Python and JavaScript for Dynamically Typed languages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

==================================================

3. Dynamically Typed
==================================================
=>In IT, we have Two Types of Programming Languages. They are

1. Static Typed Programming Languages


2. Dynamically Typed Programming Languages
-----------------------------------------------------------------------------------
--------------------------------------------------------------------
1. Static Typed Programming Languages
-----------------------------------------------------------------------------------
--------------------------------------------------------------------
=>In Static Typed Programming Languages, It is Mandatory to Declare the Variables
for Storing the Data Otherwise we get Compile Time Error.
-------------------------
Program in Java
--------------------------
int a,b,c; // Variable Declaration--Mandatory
a=10;
b=20;
c=a+b
System.out.println(a+" "+b+" "+c)
-----------------------------------------------------
The Limitations of Static Typed Programming Languages are
1. The Programmer May not be knowing Extact Data type of the
Value.
2. It Never allows us to store other Types of Values once It is
Static typed.

Examples: C,C++, Java, C#.net


-----------------------------------------------------------------------------------
--------------------------------------------------------------------
2. Dynamically Typed Programming Languages
-----------------------------------------------------------------------------------
--------------------------------------------------------------------
=>In Dynamically Typed Programming Languages, There is no need to define Variable
Declaration.
=>In Otherwords, In Dynamically Typed Programming Languages, Python Programming
Lang Execution Environment
automatically OR Implicitly will assign the Data type depends on type of values
assigned to the Variable name.
=>The Advantages of Dynamically Typed Programming Languages are
1. The Programmer Need not Know the Data type of Value.
2. It allows us to assign any Type of value dynamically, and
automatically whose Type Changed
dynamically.
-------------------------
Examples: PYTHON, Java Script
---------------------
Code
---------------------
>>> x=10
>>> y=20
>>> z=x+y
>>> print(x,type(x))------------------10 <class 'int'>
>>> print(y,type(y))------------------20 <class 'int'>
>>> print(z,type(z))-----------------30 <class 'int'>
-----------------------------------------------------------------------------------
--------------------------------------------------------------------

You might also like