Python:
Python is widely used high level language use to write program famous for simplicity and readability. It is language use in various fields like web development ,artificial intelligence and data analysis etc. Mostly this language use for a back end development program.
Syntax & input /output:
Syntax are the rules use to write program :
print(“hello techtoves”)
. python is case sensitive
. use iteration unless brackets for differ.
Input function use as input():
Uses to take values from the user.
name = input(“Enter your name: “)
print(name)
Output function use as print():
Uses to print statement or values on the screen
print(“techtoves here in program“)
Comments in python:
Comment are the lines that are not be executed my the competed and not do any effect on output of the program. Comments are use to explain or not for the programmer to understand code.
. Single line :
# here is a single line comment
. Multi line :
Multiple line use in comment as
‘’’ multi line use in program
Here is the multiple line ‘’’
Variable & data type:
Variable are the storage container use with in a computer memory.and data type are use to store different type of data in the computer program
- Integer (int): Stores whole numbers. Example: age=11
- Floating-point (float): Stores decimal numbers. Example: div=11.98
- String (str): Stores text. Example: name =”Hadi”
- Boolean (bool): Stores True or False. Example: marks= true
Here, each values stores in a variable as uses
Operations uses in python:
Operation are symbols that perform operations and operants on program
Arithmetic operators:
These operators use for calculation of addition, subtraction, multiplication, division in the program :
Program:
a = 10,b = 5
print(“Sum”,a + b)
print(“Sub”,a – b)
print(“Mul”,a * b)
print(“div”,a / b)
These use to print calculation of given variable values.
Assignment operator:
Assignment operator use to assign value and data to a variable in a program. Here in program “=” single equal to sign use to assign a data to variable
a=10
age=20
Logical operator :
Logical operator are the operation use for combining multiple and expression. Uses the type “and, or , not “ operator. These operator gives output boolean expression (true, false) based on expression.
Program: program prints the statement on the base of logic of relation or given value :
age = 20
print(age > 18 and age < 30)
print(age > 25 or age < 30)
print(not(age > 18))
Disclaimer
The content published on TechToves is provided for general informational and educational purposes only. Our articles, guides, reviews, and recommendations are intended to help readers better understand technology, products, and related topics.
While we make reasonable efforts to ensure that the information published on this website is accurate and up to date, TechToves makes no guarantee regarding the completeness, accuracy, reliability, or suitability of the information for any particular purpose. Product specifications, prices, availability, features, and other details may change without notice.
Readers are encouraged to independently verify important information with the relevant manufacturer, authorized seller, or qualified professional before making purchasing decisions or taking any action based on our content. Any decision made in reliance on the information provided is at the reader’s own discretion and risk.
To the fullest extent permitted by applicable law, TechToves and its team shall not be liable for any loss, damage, or inconvenience arising from the use of, or reliance on, information published on this website. This includes decisions made based on product reviews, comparisons, recommendations, technical guides, or other website content.
This content is not a substitute for professional advice where such advice is necessary. Any external websites or third-party resources linked in our articles are provided for convenience, and TechToves does not guarantee the accuracy or availability of their content.
Nothing in this disclaimer excludes or limits any liability or rights that cannot lawfully be excluded or limited.





There are no comments