Reading view

There are new articles available, click to refresh the page.

String & Variables - Day 1

Python என்பது மக்கள் எளிதில் கற்றுக்கொள்ள கூடிய நிரலாக்க மொழி. இந்நிரலாக்க மொழியை பீலோ கீடோ (Guido van Rossum) என்பவர் 1980 ஆம் ஆண்டுகளில் வடிவமைக்கத் தொடங்கி 1991 ஆம் ஆண்டளவில் வெளியிட்டார். எளிமையான இந்நிரலாக்க மொழி விரைவாக மக்களிடையே பிரபல்யமடையத் துவங்கியது.

python பயன்படுத்தப்படும் துறைகள்

  • இயந்திரக் கற்றல் (Machine Learning)
  • தரவுப் பகுப்பாய்வு (Data Analysis)
  • வலை உருவாக்கம் (Web Development)
  • செயற்கை நுண்ணறிவு (Artificial Intelligence)
  • தகவல் பாதுகாப்பு (Cybersecurity)
  • விளையாட்டுகளை வடிவமைத்தல் (Games Development)
  • விஞ்ஞான காட்சிப்படுத்தல் (Scientific Visualization)
  • நிரலாக்கக் கல்வி (Programming Education)

Python மொழி linux OS இல் நிறுவப்பட்டு இருக்கும் windows OS இல் python வலைத்தளத்திற்கு சென்று நாம் நிறுவ வேண்டும்.

Python கற்கத் தொடங்குவோம்.

print() கட்டளை என்பது திரைக்கு அல்லது பிற காட்சிப்படுத்தும் சாதனத்திற்கு செய்தியை அனுப்புவதற்கான எளிய வழியாகும்.

print ("Hello World")

Hello World


என்று திரையில் காட்சிப்படுத்தப்படும்.

1. String & Variables

name = "hiba"
print(name)

hiba


இதில் name என்பது variable ஆகும்
variables ஐ தரவுகளை சேமிக்க பயன்படுத்துகிறோம்.
"hiba" என்பது string. இரட்டை அல்லது தனி மேற்கோள் குறிகளுக்குள் string எழுதப்படும்.
Variables ஐ அச்சிட print()ஐ பயன்படுத்தலாம்.

இந்த codeஐ பயன்படுத்தி, variables இல் சேமித்த தரவுகளை அச்சிடலாம்.

2. Printing Multiple items

Pythonல் பல தகவல்களை அச்சிடும் போது அவற்றை காற்புள்ளிகளால் (commas) பிரிக்கலாம். Python ஒவ்வொரு தகவல்களுக்கும் இடையில் ஒரு இடைவெளியை (space) சேர்க்கும்.

name = 'Hiba'
age = 2
country = "Srilanka"
print("Name : ", name , "Age :" , age , "Country :", country )

Name : Hiba Age : 2 Country : Srilanka


3. Formatted Strings with f-strings

f-string என்பது stringகளை format செய்யும் வழி. string-ஐ f என்ற எழுத்தால் prefix செய்து variable ஐ இரட்டை அடைப்பு குறிகளில் {} எழுத வேண்டும்.

name = "Hiba"
age = "2"
country = "Sri Lanka"
print(f"My name is {name}, I am {age} years old, My Country is {country}")

My name is Hiba, I am 2 years old, My Country is Sri Lanka


4. Concatenation of Strings

கூட்டல் குறியீட்டைப்(+) பயன்படுத்தி stringகளை இணைக்க முடியும்.

greeting = "Good Morning"
name = "Hiba"
print(greeting +" "+ name , end="!")

Good Morning Hiba!


இங்கு ,end=" " விளைவின் இறுதியில் நமக்கு தேவையான குறியீடுகளை அல்லது வேறு தகவல்களை சேர்க்க முடியும்.

அதுபோல் இரு stringஐ வேறாக்க sep="" (separator) ஐ பயன்படுத்தலாம்
எ+கா
greeting = "Good Morning"
name = "Hiba"
print(greeting, name, sep=" ", end="!")

Good Morning Hiba!


5. Using escape sequences

புதிய வரிகளில் ஆரம்பிக்க \n ஐ பயன்படுத்தலாம்
greeting = "Good Morning"
name = "Hiba"
print(greeting, name, sep="\n", end="!")

Good Morning
Hiba!


print("Hello\nWorld\nGood morning")

Hello
World
Good morning


அல்லது
print("""Hello
World
Good morning""")

Hello
World
Good morning


இவ்வாறும் பயன்படுத்தலாம்.

\b (Back space)

print("Hello\bWorld")

HelloWorld


\t (Tab)

a = "Hello\tWorld"
print(a)

Hello World


6. Printing Quotes Inside Strings

Stringகளுக்கு கட்டாயமாக இரட்டை or ஒற்றை மேற்கோள் குறிகள் இட வேண்டும். Stringகளுக்கு இடையில் இரட்டை மேற்கோள் குறிகள் தேவைப்படின்,

print("She Said 'Hello World' ")

She Said 'Hello World'


அல்லது

print('It\'s me Hiba')

It's me Hiba


7. Raw Strings to Ignore Escape Sequences

கணனியில் fileகளின் இடங்களை குறிக்க r ஐ prefix செய்து பயன்படுத்தலாம். இது escape sequence இல் இடம் பெறாது.

print(r"C:\Users\Hiba\Documents\file.txt")

C:\Users\Hiba\Documents\file.txt


Understanding Proprietary and Open Source Software

Introduction:

Software plays a crucial role in our daily lives, but not all software is the same. There are two main types: proprietary software and open source software. Each has its own characteristics, benefits, and limitations. This blog will explain what these types of software are, their differences, and why they matter.

Image description

Proprietary Software:
Proprietary software is software that is only available to selected users. Users get this software in a ready-to-use format called binary form. They do not have access to the source code, which is the code written by programmers that makes the software work. Only the owner, or proprietor, of the software can fix issues, provide updates, and offer support.

Image description

There are many limitations for users of proprietary software:

Users cannot share the software with others.
Users cannot modify or change the software to suit their needs.
Examples of proprietary software include Microsoft Windows and Adobe Photoshop. These programs often come with good support and regular updates, but users have less freedom to customize or share them.

Open Source Software
Open source software is different because it is available for free and users have access to the source code. This means anyone can see how the software works, make changes to it, and share it with others. Open source software is not just for use; it encourages users to study, modify, and improve it.
Image description
Benefits of opensource software include:

*Fewer errors because many people can find and fix bugs.
*Diverse ideas and contributions from a wide community.
*Faster development and more stable products.
*Openness to new changes and improvements from the community.
*The General Public License (GPL) provides four key freedoms to users:

Use the software for any purpose.
*Study and modify the software.
*Distribute the original software.
*Distribute modified versions of the software.

Open source software emphasizes software freedom. It believes that software, which is a mix of knowledge and science, should be open and accessible to all humans, not owned by one person or organization.

Opportunities for Monetization
While open source software is free, there are still ways to make money from it:

*Providing services for the software, such as installation or customization.
*Offering online or offline support and charging for it.
*Charging for customizations made to the open source software.

History of GNU/Linux

The history of open source software is rich and interesting. Richard M. Stallman (RMS) started the movement for software freedom in the 1980s while working at the MIT AI Lab. He created the GNU Project, which stands for "GNU's Not Unix," to ensure the four software freedoms.
The GNU Project began with tools like compilers, editors, languages, network tools, servers, databases, and more. Andrew S. Tanenbaum wrote a book on operating systems design that inspired Linus Torvalds to create the Linux kernel, combining it with GNU tools to form what we now call GNU/Linux.

Conclusion
Understanding the differences between proprietary and open source software helps us appreciate the choices we have. Proprietary software offers controlled, supported environments, while open source software offers freedom, collaboration, and continuous improvement. Both have their place in the world of technology, and knowing their strengths and weaknesses allows us to make better decisions for our software needs.

Call to Action
Feel free to share your thoughts on proprietary vs. open source software in the comments below. If you found this blog helpful, share it with others to spread the knowledge!

Author Bio
Jayaram is a materials researcher with a passion for exploring different types of software. Jayaram is especially interested in how open source software can be used for materials discovery and materials-based data science, pushing the boundaries of innovation and collaboration in these fields.

Reference:

Image description

Open Source Software - an Introduction

Properatiory Software - Def

Properatiory Software is nothing but software is available for selected users in binary form only

  • no access to the source code any support is given by only the Properatior
    • there are so many limitatation to end users
    • you cannot share the software
    • you cannot change the software

Open Source Software - Def

Open Source Software is nothing but software is available free to use but not only limited to use.

  • you have access to the source code
  • you can you can change customize the source code according to your needs
  • distribute binaries source code

Benefits of Open Source Software

  • low errors
  • able to get different thought process and implement
  • faster development
  • stable products
  • open to get new changes from community

Open Source Software giving rights to the consumers aka End Users
(GPL License giving 4 Rights)

  1. Where ever we can use
  2. Whatever you can change
  3. Sell or Giveaway
  4. Can Share the source code

Open Source Software - Emphasiszes Software freedom

Software is mixture of knownledge and science it should be open and owned by all of the human being ownership is not limited to a person / organization

Open Source Software - Oppurtunities of monitization

  1. you can give service for the software
  2. you can get money from installation service
  3. you can give online/offline support and can be charge for it
  4. you can charge for the customization you provide from open source software

History of GNU/Linux

Unix Family Tree

Rise of GNU

Richard M Stallman (RMS) MIT AI Lab (1980s)

  • Started from the Printer problem unable to manage queue
  • RMS started to fight for software freedom

GNU = GNU Not Linux
Ensures 4 freedoms

  • ** Use ** for any purpose
  • ** Study ** and adapt(modify)
  • ** Distribute ** free
  • Distribute ** the modifed source**

GNU Project Starts With

  • Compilers
  • Editors
  • Languages
  • Network Tools
  • Servers
  • Databases
  • Device Drivers
  • Desktop Utilities
  • Multimedia Apps
  • Games
  • Office Applications and more

Andruw S Thanebaum writes a book for minix book operating systems design and implementation which becomes inspration for Linus Torwards to create the Kernal named Linux

Image description

References

❌