-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.py
More file actions
84 lines (69 loc) · 1.21 KB
/
variables.py
File metadata and controls
84 lines (69 loc) · 1.21 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
79
80
81
82
83
84
name = 'Venkat' #String
age = 20 #int
print(name)
print(age)
print(type(name))
print(type(age))
name = 100 #int
age = 'venkat' #string
print(name)
print(age)
print(type(name))
print(type(age))
x = 100 #int
y = str(x) # y is string
z = float(x) #z is float
y = int(y) # y is int
print(type(x))
print(type(y))
print(type(z))
name1 = 'Venkat'
name2 = "Venkat"
print(name1)
print(name2)
print(type(name1))
print(type(name2))
employeename = 'venkat'
employeeName = 'venkat2'
print(employeename)
print(employeeName)
#camel case
name = 'venkat'
employeeName = 'employee1'
employeeCurrentAddress = 'India'
#pascal case
Name = 'venkat'
EmployeeName = 'employee1'
EmployeeCurrentAddress = 'India'
#snake case
name = 'venkat'
employee_name = 'employee1'
employee_current_address = 'India'
#Assign multiple values
a = b = c = "python is awesome"
print(a)
print(b)
print(c)
a, b, c = "python ", "is ", "awesome"
print(a)
print(b)
print(c)
print(f'{a}{b}{c}')
cars = ['TATA ', 'Mahindra ', 'Maruthi']
a, b, c = cars
print(f'{a}{b}{c}')
print(a)
print(b)
print(c)
#output variables
a = 'python '
b = 'is '
c = 'awesome'
print(a, b, c)
print(a + b + c)
x = 100
y = 200
name = 'venkat'
print(x + y)
print(x, y)
#print(name + x) #invalid