-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2_using_variables.py
More file actions
50 lines (37 loc) · 900 Bytes
/
Copy path2_using_variables.py
File metadata and controls
50 lines (37 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
'''
name = input('Enter name: ')
location = input('Enter location: ')
gender = input('Enter gender: ')
print('----- PROFILE ------')
print('Name :', name)
print('Location :', location)
print('Gender :', gender)
print('Summary:', name, 'is a', gender, 'from', location)
'''
'''
fname = input('First Name: ')
lname = input('Last Name: ')
complete_name = fname + ' ' + lname
print(complete_name)
'''
a = 7
b = 5
# addition
print('addition', a + b)
# subtraction
print('subtraction', a - b)
# multiplication
print('multiplication', a * b)
# division
# floor-division
# remainder
if b == 0:
print("Division not possible")
print("Floor Division not possible")
print("Remainder not possible")
else:
print('division', a / b)
print('floor division', a // b)
print('remainder', a % b)
# power
print('to the power', a ** b)