-
Notifications
You must be signed in to change notification settings - Fork 0
/
shivang.py
75 lines (67 loc) · 1.46 KB
/
shivang.py
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
# print("madarchod china")
# print('shivang')
# name = 'john smith'
# age = 20
# is_new = True
# print("Name:", name)
# print("Age:", age)
# print("New Patient:", is_new)
# total = 0
# prices = [10, 20, 30]
#
# print(prices)
# for i in prices
# for item in prices:
# print(f'value of total before addition {total}')
# total += item
# print(f'value of total after addition {total}')
# print(f'The total value of your shopping is {total}')
# for x in range(4):
# for y in range(4):
# # for z in range(4):
# if (x % 3 == 0) and (y % 3 == 0):
# print(f'(this is X{x},this is Y{y})
# video done till 01:51:00
# numbers = [5, 2, 5, 2, 2]
# for number in numbers:
# print('X' * number)
# numbers = [7, 8, 5, 6, 7, 55, 47]
# # max = numbers[0]
# numbersnew = numbers.copy()
# numbersnew.sort()
# print(numbersnew)
# length = len(numbers)
# print(length)
# max = numbersnew[length - 1]
# print(max)
# for number in numbers:
# if number > max:
# max = number
# print(max)
#
# numbers = [5, 8, 9, 7, 7, 12,]
# numbers2 = numbers.copy()
# numbers.append(19)
# print(numbers2)
# year = int(input('enter a year'))
# print(year % 4)
# if year // 4 == 0:
# print('it is a leap year')
# else:
# print('it is not leap year')
# numbers = [
# [
# [1, 2],
# [3, 4]
# ],
# [
# [5, 6],
# [7, 8]
# ],
# [
# [9, 10],
# [11, 12]
# ]
# ]
# numbers[0][0][1] = 20
# print(numbers)