Untitled
unknown
python
3 years ago
1.7 kB
7
Indexable
import os os.system('clear') def menu(): print(': THREE DAY PLANNER :') print('---------------------') print(' WORKOUT GOALS! ') print(' ONE DAY AT A TIME. ') print('---------------------') today = 'Run 5 km' tomorrow = 'Lift 10 kg' later = 'Cycle 30 km' def table(): print('TODAY: ', today) print('TOMORROW: ', tomorrow) print('LATER:', later) print('---------------------') def operations(): print('n | Next day') print('c | Change goal') print('e | Exit program') print('---------------------') def change(): print('0 | TODAY: ') print('1 | TOMORROW: ') print('2 | LATER:') print('---------------------') while True: menu() table() operations() operation = input('operation > ') if operation == 'n': today = tomorrow tomorrow = later later = '' os.system('clear') elif operation == 'c': os.system('clear') menu() change() change_goal = input('Change goal for day > ') if change_goal == '0': today_goal = input('Goal for today > ') today = today_goal os.system('clear') if change_goal == '1': tomorrow_goal = input('Goal for tomorrow > ') tomorrow = tomorrow_goal os.system('clear') if change_goal == '2': later_goal = input('Goal for later > ') later = later_goal os.system('clear') elif operation == 'e': exit() os.system('clear') else: print('ERROR: Unknown operation', '(' + operation + ')') input('Press enter to continue...') os.system('clear')
Editor is loading...