SP Seminar cancho
print reduce(operator.mul, [i for i in range(1, 10)])
…int result=1;for(int i=1;i<10;i++)
result *= i;System.out.println(result);
python
myFile = open(“test.txt”)
Import java.io.*;…BufferedReader myFile =
new BufferedReader(new FileReader(“test.txt”));
python
aList = []aList.append(5)aNumber = aList[0]
…public Vector<Integer> aList = new Vec-tor<Integer>();aList.addElement(5);public int aNumber = aList.getElement(0);
python
table = [['cancho', 100], ['pipoket', 0]]
print ''' <html> <head> <title>%s</title> </head> <body>''‘
for row in table: print '<tr>' for col in table[row]: print '<td>%s</td>' % col print '</tr>‘
print ''' </body> </html>''' % (title, body)
python
cancho 100
pipoket 0
print ''' <html> <head> <title>%s</title> </head> <body> Hello World! </body> </html>''' % title
python
Hello World!
cancho 100
pipoket 0