8000 day7 · chandantech56/python-class@173430b · GitHub
[go: up one dir, main page]

Skip to content

Commit 173430b

Browse files
committed
day7
1 parent 68b2fab commit 173430b

File tree

3 files changed

+44
-5
lines changed

3 files changed

+44
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
@ What is Python?
1+
## What is Python?
22

33
Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.
44

5-
@ It is used for:
5+
## It is used for:
66

77
web development (server-side),
88
software development,
99
mathematics,
1010
system scripting.
1111

1212

13-
@ What can Python do?
13+
## What can Python do?
1414

1515

1616
Python can be used on a server to create web applications.
@@ -19,15 +19,17 @@ Python can connect to database systems. It can also read and modify files.
1919
Python can be used to handle big data and perform complex mathematics.
2020
Python can be used for rapid prototyping, or for production-ready software development.
2121

22-
@ Why Python?:-
22+
## Why Python?:-
2323

2424
Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
2525
Python has a simple syntax similar to the English language.
2626
Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
2727
Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
2828
Python can be treated in a procedural way, an object-oriented way or a functional way.
2929

30-
@ Good to know:-
30+
31+
## Good to know:-
32+
3133

3234
Python Syntax compared to other programming languages
3335
Python was designed for readability, and has some similarities to the English language with influence from mathematics.

python_class7/class7.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
list=[3,5,7,9,11,13,15]
2+
print(list)
3+
list.append(17)
4+
print(list)
5+
6+
print(list.index(7)) #show index number wise search and given output.
7+
8+
print(list.count(9)) #total count in given values in list.
9+
10+
a = [1,2,2]
11+
a.append(5)
12+
print(a)
13+
b = a.copy() # copy item in list
14+
print(b)
15+
16+
prime_number= [11,15,7,5,23,]
17+
prime_number.sort() #sort method asccending to descending(arrange items)
18+
print(prime_number)
19+
20+
# a = ['p', 'y', 't', 'h', 'o', 'n']
21+
# print(list(reversed(a)))# Reverses the list 'a' and prints it as a list
22+
23+
# b = "apple"
24+
# print(list(reversed(b))) # Reverses the string 'b' and prints it as a list of characters
25+
26+
27+
28+
for fruits in ["mango","banana","grapes"]:
29+
print("i like fruits:", fruits)
30+
31+
matrix =[]
32+
for i in range(2):
33+
matrix.append([])
34+
for j in range (2):
35+
matrix[i].append([j])
36+
print(matrix)
37+

python_class8/class8.py

Whitespace-only changes.

0 commit comments

Comments
 (0)
0