Monday, March 4, 2019

Maximum and Minimum Numbers Using Two Dimensional List in Python

A very simple program that I wrote using Python that will ask the user to give a series of number and then the program determine and check which of the series of number has the maximum and minimum value and display the result using the two-dimensional list in python.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting.

work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com



Sample Program Output


Program Listing

# max_min.py
# Jake R. Pomperada
# March 4, 2019   Monday
# Bacolod City, Negros Occidental
print();
print("\tMaximum and Minimum Numbers Using Two Dimensional List");
print();
num = int(input('\tHow many numbers: '))
print();
accept = []
for a in range(0,num):   #row
    accept.append([])
for b in range(0,num) : # row
    for c in range(0,1) : # column
        accept[b].append(c);
        accept[b][c]=0;

for b in range(0,num) : # row
    for c in range(0,1) : # column
         accept[b][c]=int(input("\tGive value in item no. {0} : ".format(b+1)));

print();
print("\tDisplay Result")
print();
print("\tThe maximum number is {0}. ".format(max(accept)));
print();
print("\tThe minimum number is {0}. ".format(min(accept)));
print();
print("\tEND OF PROGRAM")


No comments:

Post a Comment