-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathb2.py
More file actions
93 lines (63 loc) · 1.37 KB
/
b2.py
File metadata and controls
93 lines (63 loc) · 1.37 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
85
86
87
88
89
90
91
# # import sys
# # print(sys.version)
# # a = 12
# # print(a)
# import math
# print(math.e)
# n = int (input("n = "))
# if n < 10 :
# print("true")
# else :
# print("false")
# x = "John"
# y = 'John'
# if x == y :
# print("true")
# else :
# print("false")
# print(type(x))
# print('hello','world')
# a = 5
# b = 'world'
# print(a+b)
# x = "rahul"
# def fun():
# global x
# x = "rohit"
# fun()
# print("my name is"+x)
# data types
# variables are used to store different data types to perform different operations.abs
# print(type('rahul'))
# print(type(5))
# print(type(1.4))
# print(type(2j))
# print(type(["apple","banana"]))
# print(type(("rahul","yadav")))
# print(type(range(6)))
# print(type({"name":"rahul"}))
# print(type(True))
# print(type(None))
# print(type(b"rahul"))
#random number - python take a random number to show on display by the use of random module in th range
# import random
# print(random.randrange(0,10))
# a complex number can not be converted into int , float .
# for multi string we use triplle quotes """ """
# a = "hello"
# print(a[1])
# for x in "rahul":
# print(x)
# a = "rahul"
# print(len(a))
# gave bools datatype as answer
# b = "here is the string for test"
# print("is" in b)
# if "the" in b:
# print("rahul")
# print("for" not in b)
# def test(data):
# data["a"] = 1
# data = {"a":0}
# test(data)
# print(data)