Getting started with Python | Python tutorial:
:- let's continue with this series of Python now we have talked about what is Python and we have talked about. how to install Python on your machine. it's time to start with the actual stuff.
:------watch the video tutorial - Python tutorial for beginners---------:
:------watch the video tutorial - Python tutorial for beginners---------:
Python tutorial for beginners | Python basics #4
in this Python Tutorial video, we will see:
- Why do we code
- Arithmetic operations
- Addition
- Subtraction
- Multiplication
- Division
- Integer division, Float division
- Arithmetic operation with brackets
- Power of / Exponentiation operation
- Modulo
- String operations
- Escape character
- Printing same string n number of times
- Printing raw string
>>what is Pycharm.
>> Python tutorial for the beginner's course introduction
why do we code?
Python is a high-level programming language, it allows you to focus on the core functionality of the software by taking care of common programming tasks.
Arithmetic operations:
Operators are special symbols in Python. that carry out arithmetic or logical computation.
Python operators are used to performing operations on variables and values.
Addiction | subtraction | multiplication, and division
I think everyone knows what is addiction, subtraction, multiplication, and division | watch the video and become a beginner to advance in Python. if you have any problem, please tell me your problem in the comment box.
Integer division, Float division:
the real floor division operator is "//". it returns floor value for both integer and floating point arguments. Python 3, "/" does a floating point division for int and float arguments.
Arithmetic operation with brackets:
Python follows the same precedence of its mathematical operators.
Power of / Exponentiation operation:
power. the** operator in Python is used to raise the number on the left to the Power exponent to the right.
Modulo:
basically, Python Modulo operator used to get the reminder of a division. the basic syntax of Python modulo is a % b. Here a is divided by b and the remainder of that division is returned.
String operations:
String operations:
strings are one of the most useful data types. strings are surrounded by either single quotation marks or double quotation marks. you can display a string literal with the Print() function.
Examples:--
1st.
name=" Jarvis"
print(name.upper())
result: JARVIS2nd.
x=" I am a hero "
print(x.lower())result: I AM A HERO
Escape character:
In Python strings, the backslash "\" is a special character, also called the "escape" character. It is used in representing certain whitespace characters: "\t" is a tab, "\n" is a newline, and "\r" is a carriage return. Conversely, prefixing a special character with "\" turns it into an ordinary character.
>list of Python escape sequence characters with examples:
Printing string n number of times:
in this function, we can print string or character "z" number of times [ multiple times ]
Example:--
* I want to print "z" character 3 times.
Print("z" * 3)
result: zzz
* I want to print "hello", 5 times.
print("hello" * 5 )
result: hello hello hello hello hello
Printing raw string:
To create a raw string in Python, you place an r before the beginning quotation mark of the string. A raw string completely ignores all escape characters. It prints the string exactly as entered. In the following code below, we show examples of raw strings in Python.
Example:--
1st.
Print( h"I am a hero")
result: I am a hero2nd.
Print( do not change" jarvis007")
result: jarvis007
Getting Started With Python >>>>> Download Now
ReplyDelete>>>>> Download Full
Getting Started With Python >>>>> Download LINK
>>>>> Download Now
Getting Started With Python >>>>> Download Full
>>>>> Download LINK U0