How to use python in Linux?
First open a terminal in your linux machine then type python3.
How to find a version of software?
Enter the software name space double hyphen version.
python --version
what is command prompt and why the name is defined?
we ask the question to someone or machine using to give prompt,after get the reply.
So,we give the prompt to the terminal its will definetly reply.
That's why its called as Command Prompt.
How to clear screen in terminal while using Python?
Every beginner's face this problem because i am also did this.
using clear command in terminal its show an error like
>>>name="guna"
>>> print(name)
guna
>>> clear
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'clear' is not defined
>>>
The problem is not that command becuase the command clear is not a python command it is terminal command ,so we must do enter exit() command to exit a python.Then we enter the command clear
its will be work.
>>> num=1
>>> print(num)
1
>>> exit()
clear
this is the correct format.
Program:
expected output is :welcome gunalan
>>> name="gunalan"
>>> print("welcome",name)
welcome gunalan
if we + instead of , the output is look like without space between string and value.
, separates values; + joins strings directly.
print("welcome"+name)
welcomegunalan
Function Overloading:
Same function name but different number of arguments is called as Function Overloading.
interview que for beginner's
What is print in python?
print is function in python its make a action.
what is reference variable or Identifier?
name="guna"
Identifier → the name used to identify something.
Reference → the name points/refers to an object or value.
Top comments (0)