FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Task 2 :constants and variables
How-ToProgramming Languages

Task 2 :constants and variables

via Dev.to PythonJAYA SRI J3h ago

Hi all this is my second task constant and variables... 1.Create and Print a Variable Concept: A variable is used to store data that can be used later in a program. name = " Jaya Sri " print ( name ) Explanation: We create a variable called name and assign a string value to it. The print() function displays the stored value on the screen. 2.Reassign a Variable Concept: Variables in Python can be updated with new values. age = 18 print ( " Old age: " , age ) age = 19 print ( " New age: " , age ) Explanation: Initially, the variable age stores 18. Later, it is reassigned to 19, showing that variables are flexible and can change during execution. 3.Multiple Assignment in One Line Concept: Python allows assigning multiple variables in a single line. a , b , c = 5 , 10 , 15 print ( a , b , c ) Explanation: The values are assigned in order. This makes the code shorter and more readable. 4.Swap Two Variables Without Third Variable Concept: Python provides a simple way to swap values. x = 5 y

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
2 views

Related Articles

Task 3: Delivery Man Task
How-To

Task 3: Delivery Man Task

Dev.to • 3h ago

I Wasted Months Memorizing Design Patterns — This One Trick Changed Everything
How-To

I Wasted Months Memorizing Design Patterns — This One Trick Changed Everything

Medium Programming • 3h ago

Top 5 Games to Improve Your Coding Skills
How-To

Top 5 Games to Improve Your Coding Skills

Medium Programming • 4h ago

I Got a $40 Parking Fine, So I’m Building an App That Fixes It
How-To

I Got a $40 Parking Fine, So I’m Building an App That Fixes It

Medium Programming • 7h ago

Here Is What Programming Taught Me About Solving Real-World Problems
How-To

Here Is What Programming Taught Me About Solving Real-World Problems

Medium Programming • 8h ago

Discover More Articles