FunctionButton <> + <> command : Command Command : Command :void + Click () + <
Posted: Thu Jun 02, 2022 8:22 am
DON'T COPY PASTE THE FOLLOWING CODE
THE FOLLOWING CODE IS TOTALLY WRONG.. NOTHING
RELTED
def fillList(fileName):
list_ = []
with open(fileName,"r") as file:
for line in file:
list_.append(float(line))
file.close()
return list_
def printList(message,theList):
print(message)
for i in theList:
print(i, end = "\t")
print()
def updateList(theList,change):
for i in range(len(theList)):
theList += change
def mergeLists(theList1,theList2):
new_list = []
for i in theList1:
new_list.append(i)
for j in theList2:
new_list.append(j)
return new_list
def adjustList(theList):
for i in range(len(theList)):
if theList < 0:
theList = 0
elif theList > 100:
theList = 100
def inAscendingOrder(theList):
for i in range(1,len(theList)):
if theList[i-1] > theList:
return False
return True
def inDescendingOrder(theList):
for i in range(1,len(theList)):
if theList[i-1] < theList:
return False
return True
def matchingValues(theList,lowLimit,highLimit):
new_result = []
for i in theList:
if i >= lowLimit and i <= highLimit:
new_result.append(i)
return new_result
def main():
theList1 = fillList("temp.txt")
printList("The List1: ",theList1)
updateList(theList1,10)
printList("The List1: ",theList1)
adjustList(theList1)
printList("The List1: ",theList1)
print(inAscendingOrder(theList1))
print()
print(inDescendingOrder(theList1))
print()
theList2 = matchingValues(theList1,30,90)
printList("The List2: ",theList2)
main()
FunctionButton <<PropertyImplementation>> + <<Property>> command : Command Command : Command :void + Click () + <<Setter>> set_Command (Command value) : void + <<Getter>> get_Command () SystemExitClass + Exit(): void : Command Command + Execute(): void Exit Command -seObj: SystemExitClass + Execute(): void seObj.Exit(); HelpCommand hcObj: DisplayHelpClass + Execute() : void hcObj.Display(); DisplayHelpClass + Display (): void
GENUINELY IF YOU CAN HELP ME, ITS VERY IMPORTANT, PLS
Posted: Thu Jun 02, 2022 8:22 am
DON'T COPY PASTE THE FOLLOWING CODE
THE FOLLOWING CODE IS TOTALLY WRONG.. NOTHING
RELTED
def fillList(fileName):
list_ = []
with open(fileName,"r") as file:
for line in file:
list_.append(float(line))
file.close()
return list_
def printList(message,theList):
print(message)
for i in theList:
print(i, end = "\t")
print()
def updateList(theList,change):
for i in range(len(theList)):
theList += change
def mergeLists(theList1,theList2):
new_list = []
for i in theList1:
new_list.append(i)
for j in theList2:
new_list.append(j)
return new_list
def adjustList(theList):
for i in range(len(theList)):
if theList < 0:
theList = 0
elif theList > 100:
theList = 100
def inAscendingOrder(theList):
for i in range(1,len(theList)):
if theList[i-1] > theList:
return False
return True
def inDescendingOrder(theList):
for i in range(1,len(theList)):
if theList[i-1] < theList:
return False
return True
def matchingValues(theList,lowLimit,highLimit):
new_result = []
for i in theList:
if i >= lowLimit and i <= highLimit:
new_result.append(i)
return new_result
def main():
theList1 = fillList("temp.txt")
printList("The List1: ",theList1)
updateList(theList1,10)
printList("The List1: ",theList1)
adjustList(theList1)
printList("The List1: ",theList1)
print(inAscendingOrder(theList1))
print()
print(inDescendingOrder(theList1))
print()
theList2 = matchingValues(theList1,30,90)
printList("The List2: ",theList2)
main()
FunctionButton <<PropertyImplementation>> + <<Property>> command : Command Command : Command :void + Click () + <<Setter>> set_Command (Command value) : void + <<Getter>> get_Command () SystemExitClass + Exit(): void : Command Command + Execute(): void Exit Command -seObj: SystemExitClass + Execute(): void seObj.Exit(); HelpCommand hcObj: DisplayHelpClass + Execute() : void hcObj.Display(); DisplayHelpClass + Display (): void