Python

Moderators: None (Apply to moderate this forum)
Number of threads: 474
Number of posts: 1166

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
System Developemtn Life Cycle Expert System Posted by jade_18 on 27 Jan 2007 at 8:48 AM
For my computing Project I did a System Developemtn Life Cycle Expert System which must contain the follwing elements:
. arrays and/or records
different data types
selection
iteration
procedures
functions
searching techniques(linear or binary search)
files
The first Expert system I did was too complicated and it should not ccontain any Gllobal variables, according to my teacher so he suggested that I do shorter vesrsion,which is this:


#reads information within the list
def read_info():
list=[]
data=open('pia','r')
length_of_file=data.readline()
length_of_file=int(length_of_file)
loc=0
while loc < length_of_file:
a=data.readline
a=int(a)
z=0
while z < int(a):
line=data.readline()
s=s+line[:-1]
z+=1
loc+=1
list.append(s)
data.close()
return list

# definition of sections of the System Development Life Cycle (SDLC)
def menu_two(name,num,num2,list):
while choice!="0":
print\
"""
"""+name+"""
0 - Exit
1 - Display Information
2 - Example
"""
choice=raw_input("Choice:")
if choice=="1":
print list_name[num]
elif choice=="2":
print list_name[num2]
elif choice!="0":
print " Please enter 0,1 or 2"
# define main menu and show complete list of phases in the SDLC
def main_menu():
list=read_info()
while choice!="0":
print\
"""
Welcome to the System Devlopment Life Cycle Computing Guide

0 - Exit
1 - PROBLEM DEFINITION
2 - SYSTEM ANALYSIS
3 - DESIGN
4 - DEVELOPMENT AND TESTING
5 - IMPLEMENTATION
"""
choice=raw_input("Choice:")
print
if choice=="0":
print"Goodbye"
elif choice=="1":
menu_two('PROBLEM DEFINITION',0,1,list)
elif choice=="2":
menu_two('SYSTEM ANALYSIS',2,3,list)
elif choice=='3':
menu_two('DESIGN',4,5,list)
elif choice=="4":
menu_two('DEVELOPMENT AND TESTING',6,7,list)
elif choice=="5":
menu_two('IMPLEMENTATION',6,7,list)

It's not totally working and I am finding dificulty in dterminig the probem,so just want your input to determine whether it contains all of these elements and whether it can be improved like data declarations havingexplanatory comments; identifiers having meaningful variable names; if the program, functions and procedures are clearly named, well separated and fully commented.

Thanks in advance





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.