Variable Declarations in Python.


# Variable Definition
num  = 150              # An integer assignment
mtrs = 15000.0          # A floating point
name = "Wilson Alfred"  # A string
print(num)
print(mtrs)
print(name)
print()
                        #Multiple Assignment
n, r, s = 10, 25.5, "Hello Python"
print(n)               # An integer number
print(r)               # A floating number
print(s)               # A String



Output
>>>
150
15000.0
Wilson Alfred

10
25.5
Hello Python

>>> 



1 comment:

  1. This blog post was very helpful and engaging to read. I liked how the topic was explained in a simple and practical way, making it easier for students to understand complex concepts. Programming assignments can often be challenging, especially when dealing with coding errors and tight deadlines, which is why many learners search for reliable services like help with python assignment to improve their coding skills and complete tasks efficiently. Your article provides valuable insights and useful guidance. Thank you for sharing such informative and well-written content.

    ReplyDelete

Post your comments

Powered by Blogger.