-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyIntro.py
More file actions
17 lines (16 loc) · 858 Bytes
/
pyIntro.py
File metadata and controls
17 lines (16 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This python script will show different ways to define variables, strings, calculations in python
print(5 // 2, " ", 10.5 // 3) # To calculate th quotient
print(50 % 4) # To calculate th remainder
print("Hello" * 3) # To multiple integer with string
print(len("Hello"), type(17.5), abs(-17.5), round(17.7)) # Built In Function
x, y = "awesome", 5j # Define multi variables in single line
print("Python is " + x) # Variable print with string
print(f'Python is {x}') # Variable print with string
print(y + y) # complex variables calculations
print(0b111) # Print boolean numbers
print("Python " + 'is ' + """Awesome""") # Print strings in multiple ways
answer = input() # Take values from prompt and print
print(answer)
print('''This is first line
This is second line''') # Print multiple lines
print('C:\\Documents\\Drive') # Escape Characters