SIZ Approved Course || COMPUTER PROGRAMMING -DATA TYPES || Lecture 4 || 20% pay out to @siz-official
Assalam-o-Alaikum!
I hope that you all are fine and enjoying a great and blessed life with blessing of GOD. Every one has great talent and done his great on this plat form and in this community according to his or her talent
Well today I am going to share my LECTURE 4 that is all about:
COMPUTER PROGRAMMING : DATA TYPES
Let's talk about a simple but very important concept that is available in almost all programming languages called data type. As its name suggests but a kind of data type that you can process through your computer. It can be a numeric alphanumeric, decimal etc.
- Let's put computer programming aside for a moment and take a simple example of adding two numbers 10 and 20 which can be taken in the following way
- Let’s take another example where we want to add other decimal numbers. Which we can written as:
- There are also two examples. They give another example where we want to record the students' Record. Here we want to record some information
Lets give one student record according to the requirements:
The first example deals with whole numbers. The second example deals with two decimal numbers, while the third example deals with a mixture of different figures.
• The student's name is a sequence of characters, also called a string
• Student class IX is represented by a whole number and two form strings and is called alphanumeric
• Student's section is represented by one word which is A
• The student gender is represented by one character, which is a F
• The age of the student is represented by the number which is 13
That's how we feel about how we deal with different types of data in our daily lives.
So when we look at computer programs to process different types of data, we need to be clear about the type. Otherwise the computer does not understand how different operations can be performed on the data it has received. Different programming languages try different keywords to describe different data types
For Example:
C and JAVA use int for integer, char for charcterer. Check out the data types available and the keywords we'll use to describe the data types
C and JAVA Data types:
C and Java supports almost the same set of data types. Although JAVA additional data types are supported. For now, we're taking a look at some of the types that work with both programming languages
DATA Type | Keyword | Value range |
---|---|---|
Character | char | -128 to 127 or 0 to 255 |
Number | int | -32768 to 32767 or -2,147,483,648 to 2,147,483,647 |
Small Number | short | -32768 to 32767 |
Long Number | long | -2,147,483,648 to 2,147,483,647 |
Decimal Number | float | 1.2E -38 to 3.4E+38 till 6 decimal places |
And these are called primitive data types. You can use these data types to make a more complex.
For example, a string of letters would be arranged
PYTHON DATA TYPES:
Python has five main data types but this program language does not use a single word to describe a specific data type
- Number
- String
- List
- Tuple
- Dictionary
Now its end of my lecture 4 . And I hope that you will understand it clearly. And give me feedback also
Lecture 1 Link
Lecture 2 Link
Lecture 3 Link
20% pay out to siz-official
Special Thanks to:
@cryptokraze
@siz-official
@vvarishayy
@suboohi
@qasimwaqar
Good one Post dear friend you make a very good post thanks for sharing a good information with us my best wishes for you.
Regards, Faran Nabeel
Thanks a lot for appreciation
#club5050 😀
😊thanks
Very informative post. Thanks for sharing this valuable knowledge 😊
You are doing great job in SIZ community. Keep growing with steem.