2023-11-09 17:45:00 -03:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from basic import basic
|
|
|
|
from common.common import clear, user_input, opcs_default
|
|
|
|
|
|
|
|
def toc():
|
|
|
|
content="""\tContenido\n
|
|
|
|
1) Basicos 001-059
|
|
|
|
2) Intermedio 060-123
|
|
|
|
3) Tkinter 124-138
|
|
|
|
4) SQLite 139-145
|
|
|
|
...
|
|
|
|
s) Salir
|
|
|
|
"""
|
|
|
|
print(content)
|
|
|
|
|
|
|
|
def basic_challenges():
|
|
|
|
content = """
|
2023-11-09 20:37:02 -03:00
|
|
|
1) Basicos 001-011
|
|
|
|
2) Basicos 012-019
|
|
|
|
3) Basicos 020-026
|
|
|
|
4) Basicos 027-034
|
|
|
|
5) Basicos 035-044
|
|
|
|
6) Basicos 045-051
|
|
|
|
7) Basicos 052-059
|
2023-11-09 17:45:00 -03:00
|
|
|
"""
|
|
|
|
select_ok = False
|
|
|
|
while not select_ok:
|
|
|
|
clear()
|
|
|
|
print(content)
|
|
|
|
opcs_default()
|
|
|
|
selection = user_input(5)
|
|
|
|
match selection:
|
|
|
|
case 1:
|
|
|
|
basic.challenges01()
|
|
|
|
case 2:
|
|
|
|
basic.challenges02()
|
|
|
|
case 3:
|
|
|
|
basic.challenges03()
|
|
|
|
case 4:
|
|
|
|
basic.challenges04()
|
|
|
|
case 5:
|
2023-11-09 20:37:02 -03:00
|
|
|
basic.challenges05()
|
2023-11-09 17:45:00 -03:00
|
|
|
case 6:
|
|
|
|
pass
|
|
|
|
case 7:
|
|
|
|
pass
|
|
|
|
case 'v':
|
|
|
|
return
|
|
|
|
case 's':
|
|
|
|
exit(0)
|
|
|
|
case _:
|
|
|
|
continue
|
|
|
|
|
|
|
|
def interm_challenges():
|
|
|
|
content = """
|
|
|
|
1) Interm 060-068
|
|
|
|
2) Interm 069-079
|
|
|
|
3) Interm 080-087
|
|
|
|
4) Interm 088-095
|
|
|
|
5) Interm 096-103
|
|
|
|
6) Interm 105-110
|
|
|
|
7) Interm 111-117
|
|
|
|
8) Interm 118-123
|
|
|
|
"""
|
|
|
|
print(content)
|
|
|
|
|
|
|
|
def tkinter_challenges():
|
|
|
|
content = """
|
|
|
|
1) Tkinter 124-132
|
|
|
|
2) Tkinter 133-138
|
|
|
|
"""
|
|
|
|
print(content)
|
|
|
|
|
|
|
|
def main():
|
|
|
|
clear()
|
|
|
|
header = """
|
|
|
|
=======================================
|
|
|
|
\"Learning to Program in 150 Challenges\"
|
|
|
|
Python by example, Nichola Lacey
|
|
|
|
=======================================
|
|
|
|
programmed by devfzn@gmail.com
|
|
|
|
---------------------------------------\n"""
|
|
|
|
select_ok = False
|
|
|
|
while not select_ok:
|
|
|
|
clear()
|
|
|
|
print(header)
|
|
|
|
toc()
|
2023-11-09 20:37:02 -03:00
|
|
|
selection = user_input(3)
|
2023-11-09 17:45:00 -03:00
|
|
|
match selection:
|
|
|
|
case 1:
|
|
|
|
basic_challenges()
|
|
|
|
case 2:
|
|
|
|
interm_challenges()
|
|
|
|
case 3:
|
|
|
|
tkinter_challenges()
|
|
|
|
case 4:
|
|
|
|
pass
|
|
|
|
case 5:
|
|
|
|
pass
|
|
|
|
case 6:
|
|
|
|
pass
|
|
|
|
case 7:
|
|
|
|
pass
|
|
|
|
case 8:
|
|
|
|
pass
|
|
|
|
case 9:
|
|
|
|
pass
|
|
|
|
case 10:
|
|
|
|
pass
|
|
|
|
case 's':
|
|
|
|
select_ok = True
|
|
|
|
exit(0)
|
|
|
|
case _:
|
|
|
|
select_ok = False
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|