Skip to content

Commit d6d74ec

Browse files
authored
Add files via upload
1 parent 60017b0 commit d6d74ec

File tree

4 files changed

+75
-0
lines changed

4 files changed

+75
-0
lines changed

ascii.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
char=" "
2+
3+
print(ord(char))
4+
5+
ascii = 67
6+
print(chr(ascii))

data type in python.py

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
int 100 , 50
2+
float decimal no -- 2.02 , 5.1
3+
complex no -- real ans img 1+2j , 6i+7int
4+
5+
6+
text data type ---- string ("" '')
7+
"data" 'data'
8+
9+
boolean true / false
10+
11+
sequence data type ----
12+
13+
list ----sequance of some int
14+
[1,2,32,4]
15+
["kuch bhi ", "sbcks"]
16+
and tuple -collection of items (1,2,2,3,5)
17+
18+
19+
20+
set data type
21+
22+
23+
unorderd collection of dataclasses
24+
sets
25+
= {"akbs", "kabckA", "KAJCBSKASFB" }
26+
27+
Nothing = null
28+
29+
Ascii --- Amercian Standard code for information interchange (it help tp represent char and numaric code)
30+
A-Z 65-90
31+
A-65
32+
B-66
33+
Z-90
34+
35+
a-z 97-122
36+
37+
0-9 48-57
38+
space_____ 32
39+
40+
and unicode values ---
41+
42+
43+
44+
ord() function

input.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name=input("enter your name : ")
2+
print(name)
3+
4+
#always capture as string
5+
6+
7+
#type casting -- converting one data type to another
8+
9+
'''ex --'''
10+
11+
age = int( input("enter your age : "))
12+
print(type(age))
13+
14+
no1=input("enter first no : ")
15+
print(no1)

sum of two no.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
noone=input("enter first no :")
2+
print(noone)
3+
motwo=input("enter second no :")
4+
print(motwo)
5+
6+
sum(motwo+noone)
7+
print(sum)
8+
9+
number1=int(input("enter no 1 :"))
10+
number2+

0 commit comments

Comments
 (0)