Answer:
See Explaination
Explanation:
class MagicSquare():
def __init__(self,side):
self.side=side
self.two_dimension=[]
for row in range(1,side+1):
row_line=[]
for col in range(1,side+1):
row_line.append(0)
self.two_dimension.append(row_line)
def display(self):
row=0
col=int((self.side-1)/2)
for i in range(1,self.side**2+1):
self.two_dimension[row][col]=i
row-=1
col+=1
if row==-1:
row=self.side-1
if col==self.side:
col=0
if self.two_dimension[row][col]==0:
continue
else:
row+=1
if row==self.side:
row==0
for line in self.two_dimension:
for num in line:
print("{0:>3}".format(num),end=" ")
print()
def main():
for i in range(1,14,2):
square=MagicSquare(i)
square.display()
print("----------------------------------------------------")
if __name__ == '__main__':
main()
If user output is ''red purble yellow exit'': red purple yellow import java.util.Scanner; import java. io.PrintWriter; import java. io.StringWriter; public class StringStreamOutput { public static void main (String [] args) { Scanner snr = new Scanner(Scanner.in); Stringuseritem = ''''; StringWriter itemcharStream = new StringWriter(); PrinterWriter itemsOSS = new PrintWriter(itemcharStream); System.out.printIn(''Enter items (type Exit to open):''); useritem = scnr.next(); while (!userItems.Equals(''Exit'')) { /*Your solution goes here*/ UserItem = scnr.nxt(); } useritem = itemCharStream.toString() System.out.printin(useritem); return; } }
Answer:
Technological convergence is a term describes the layers of abstraction that enable different technologies t inter operate efficiently as a converged system. Convergent services such as VoIP, IPTV, Smart TV and others tend to replace the older technologies.
Explanation:
As a feature of society convergence can spur economic growth and change how people communicate on a global basis. A good way t evaluate the previous generations, items such as CD player, cassette deck, console TV or corded telephone each served only one function, whereas a single modern handheld computing device can meld several of those functions with hardly any user intervention required.
Answer: Set a scale, or method of determining distance, within your system. Identify an origin near an object—specifically something fixed.
Explanation: