-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path#4-varriable.py
More file actions
34 lines (27 loc) · 810 Bytes
/
#4-varriable.py
File metadata and controls
34 lines (27 loc) · 810 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
#Varriable Declaration
#define String
char_name = 'Souvik'
#define Integer
char_age = 17
#define float / decimal
char_gpa= 7.1
#define Boolean
isMale = True
# Concatation of strings and number
# String Concatention
name = "Souvik ."
goodName =" Souvik Mandal"
total = name + goodName # + will work here as a concatation
print("My name is "+ total + " is my good name")
#Number Concatention
a = 25
b = 25
c = a+b # + will work here as a mathematical operation
print(c)
x = "awesome" #this is global varriable (accesbiole to everyone)
def myFunction():
global x #this Global keyword makes it accesiable to everyone
x = "fantasic" # this is a local varriable (only accesbiole to this function)
print("python is " + x)
myFunction()
print("python is " +x)