-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay14_practice.py
More file actions
87 lines (56 loc) · 1.83 KB
/
Day14_practice.py
File metadata and controls
87 lines (56 loc) · 1.83 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
'''Write a Python code to display numbers from a list divisible by 5 using Function'''
# full_list =[]
#
# def num_list(num):
# # num = int(input("Enter The number of Numbers You want too add in list:\n"))
# for i in range(num):
# list_input = int(input("Enter The number you Want To Put in list:\n"))
# full_list.append(list_input)
# print(full_list)
# print("Divisible by 5 numbers are:")
# for full in full_list:
# if full % 5 == 0:
#
# print(full)
#
# num_list(5)
'''Exercise 7: Find the number of occurrences of a substring in a string
Write a Python code to find how often the substring “Emma” appears in the given string.'''
# srtng = "Chandan is a Software developer, Chandan Loves to build New Things, Chandan Always Try to solve Problems :"
#
# print(srtng.count("Chandan"))
'''Print the following pattern
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
'''
# for i in range(1,10):
# print(str(i)*i)
'''Write a Python code to check if the given number is palindrome.
A palindrome number is a number that is the same after reverse. For example, 545 is the palindrome number.'''
# number=[]
# def palindrome(num):
# number.append(num)
# if number.reverse == num: NOT WORKING
# print("Its palindrome")
# else:
# print("Its Not a Palindrome")
#
# palindrome(858)
# def palindrome(num):
# number = ""
# str(num)
# print(f"Original Number is: {num}")
# for i in num:
# number += i
# if num == number:
# print("Its palindrome")
# else:
# print("Its Not a Palindrome")
#
# palindrome(858)
# date 15/10/24 no practice. Due to FA exam
# date 16/10/24 no practice. Due to FA exam
# 17/7 no practice FA exam