Today we're going to be talking about Tuples and Records!!
This post will be a bit shorter given that Tuples and Records are simpler Data Structures, in comparison to ones like Trees, Linked Lists, Graphs …
Theory:
A Tuple is an ordered set of values.
Uses () to show what's inside a Tuple.
Elements can be of any Data Type, e.g. ("King",0,"a") would be acceptable.
Like String's, Tuples are immutable.
Tuple's are also static.
A Record is a collection of fields and each field holds its own data.
Records usually reside within tables/databases so each field within a Record should be kept atomic.
Implementation:
I will implement the Tuple Data Structure, showing a few examples of what is allowed and what isn't:
I will leave the pseudocode for the Record Data Structure below:
studentType = record
integer ID
string firstName
string surname
date dateOfBirth
string class
end record
As a challenge for you guys, lets see if you can implement this in a programming language of your choice?!?!?!
Final Things:
As always, thank you for making it this far, please leave comments, they help me so much. Be sure to like and share also, lets try and get 100 views within a week, like we have done previously. Follow CompAndCode on all platforms! Thank You Nibble Byte!!!
Hashtags: #computerscience #coding #programming #technology #python #programmer #computer #tech #developer #coder #java #javascript #code #codinglife #webdeveloper #softwareengineer #engineering #machinelearning #softwaredeveloper #html #programmers #software #artificialintelligence #computerengineering #linux #datascience #cybersecurity #programmingmemes #hacking #bhfyp #informationtechnology #programminglife #hacker #css #pythonprogramming #php #webdesign #ai #science #programmerlife #codingmemes #deeplearning #developers #programmerhumor #coderlife #codingisfun #computers #kalilinux #developerlife #development #ethicalhacking #softwareengineering #computerprogramming #windows #coders #codingbootcamp #security #geek #daysofcode #programmingisfun #compandcode
computerscience
code
coder
coding
codinglife
compandcode
computer
developer
html
java
javascript
machinelearning
programmer
programming
python
softwaredeveloper
softwareengineer
tech
webdeveloper
technology
Nice recap on an important topic, thanks as ever!