Thursday, August 19, 2021

Basic programs in Python

 Basic programs in Python


1.Print a statement:

>>>print("Hello World!")

code prints:



Hello World!



2.Print a Variable:


>>>variable =  " Hello World !"
>>>print(variable)

code prints:

Hello World!


3.Another example:

>>>a = 5
>>>b = 6

>>>print(a)


code prints:
5

4.Another example:

>>>a = 5
>>>b = 6




>>>print(a,b)

code prints:
5 6




No comments:

Post a Comment

Python - Conditional statements ,if condition in python

 Python - if - Conditional statements What is the if condition in python? Decision-making is the anticipation of conditions occurring while ...