-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice4.py
More file actions
40 lines (26 loc) · 907 Bytes
/
Copy pathpractice4.py
File metadata and controls
40 lines (26 loc) · 907 Bytes
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
# Write a program to store seven fruits in a list entered by the user
# f1 = input("Enter fruit number 1 ")
# f2 = input("Enter fruit number 2 ")
# f3 = input("Enter fruit number 3 ")
# f4 = input("Enter fruit number 4 ")
# f5 = input("Enter fruit number 5 ")
# marks = [f1,f2,f3,f4,f5]
# print(marks)
#write a program to accpet marks of 6 students and display them in a sorted mannar
# student =[]
# for i in range(0,6):
# marks = int(input())
# student.append(marks)
# print(student)
# student.sort()
# print(student)
#check that a tuple cannot be change in python
# a=(23,234,232,234)
# a[0] = 23;
#write a program to sum a list of 4 numbers
# a = [12,23,6,5]
# print(a[0]+a[1]+a[2]+a[3])
# print(sum(a))###This is a function of python
#write a program to count the number of zeros in the following tuple
a=(7,0,8,0,0,9)
print(a.count(0))