-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1.py
More file actions
80 lines (60 loc) · 1.25 KB
/
Copy path1.py
File metadata and controls
80 lines (60 loc) · 1.25 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
print("Hello World")
a = 10
b = 200
print("\nAddition of a & b is:", a+b)
print("\nSubtraction of a & b is:", a-b)
print("\nMultiplication of a & b is:", a*b)
print("\nDivision of a & b is:", a/b)
print("\nFloor Division of a & b is:", a//b)
print("\nCircle")
a=int(input("Enter radius of circle:\n"))
area = 3.14*a*a
peri = 2*3.14*a
print("Area of circle is:", area)
print("Perimeter of circle is :", peri)
print("\n\nFull name")
fname = input("Enter first name:")
lname = input("Enter last name:")
print(lname + fname)
val = input("Enter number separing by comma:\n")
list = val.split(",")
tuple= tuple(list)
print("List is:", list)
print("tuple is:", tuple)
x=12
y=14
print(x<y)
print(x>y)
print(x<=y)
print(x>=y)
print(x>=y)
print(x<<y)
print(x>>y)
print(x^y)
print(x & y)
a = 1
b = "hello"
c = 34.4314
d = 2.678
print("value of a is",type(a))
print("value of b is",type(b))
print("value of c is",type(c))
print("value of d is",type(d))
a = 12
b = 78
print(a+b)
a="xyz"
b="pqr"
print(str(a+b))
str = "swapnali"
for character in str:
print (character)
print(str.upper())
print(str.lower())
print(str.split())
# print(str.translate())
print(str.capitalize())
tuple=("xyz", "pqr","mno","abc")
list = [1, 2,"xyz",23.50,1.5,"pqr"]
print(tuple)
print(list)