source: java2python/core/test/testcode/ForIfCase.py@ 502

Last change on this file since 502 was 498, checked in by wouter, 19 months ago

add random test to Math

File size: 637 bytes
Line 
1import sys
2from typing import List
3
4
5
6class ForIfCase:
7 @staticmethod
8 def main(args:List[str]) -> None:
9 res:str = ""
10 n:int = 1
11 while n < 10:
12 res=res + str(n)
13 for _ in [1]:
14 if n == 0:
15 res=res + " "
16 break
17 if n == 0 or n == 1:
18 res=res + "-"
19 if n == 0 or n == 1 or n == 2:
20 pass
21 if n == 0 or n == 1 or n == 2 or n == 3:
22 res=res + "%"
23 break
24 if n == 0 or n == 1 or n == 2 or n == 3:
25 pass
26 if n > 5:
27 res=res + "*"
28 n=n + 1
29 for x in ["a","b","c"] :
30 x:str = x
31 res=res + x
32 sys.stdout.write( (res)+'\n')
33
34if __name__ == "__main__":
35 ForIfCase.main(sys.argv[1:])
Note: See TracBrowser for help on using the repository browser.