Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
suyashi29
GitHub Repository: suyashi29/python-su
Path: blob/master/Python Basics/Day-1.ipynb
3074 views
Kernel: Python 3
# Data Containers string1 ="Python" string1.index("y") string1[-2:] len(string1) string1.upper() string1.lower() strin1[0]=9
'python'
#string1[0]=9 s="123ab" s.isdigit() s.isupper() s.islower() s.isspace() #help()
#Enter Emp Name and Age def entry (Name = "", Age = 0): print("%s is %d years old" %(Name,Age)) entry("Ash",29) entry("Ram",13)
Ash is 29 years old Ram is 13 years old
a,b,c = 1,"ashi",4.3 print(a,b,c)
1 ashi 4.3
a,b = b,a
print(a,b)
ashi 1
float(9)
9.0
a="123" int(a)
123
str(2)
'2'
type(89888888)
int
3/2
1.5
3//2
1
3**2
9
3%2
1
3.2/4
0.8
"abc"+"de"
'abcde'
"abc" * 2
'abcabc'