Exercises

Contents

Graph

cluster_python Python Programming: From Absolute Beginner to Advanced Productivity cluster_python_exercises Exercises cluster_python_exercises_legacy Exercises (Legacy) cluster_python_exercises_userdb User Database (Exercise Series) cluster_python_exercises_herdt Exercises (External) cluster_python_exercises_sensors Sensors, And Data Acquisition (Exercise Series) cluster_python_exercises_csv CSV and Databases cluster_python_basics Python: The Language Fundamentals cluster_python_db Databases cluster_python_advanced Python: More Language Features cluster_python_advanced_oo Object Oriented Programming cluster_python_misc Python: Miscellaneous Topics python_exercises_legacy_join_function Exercise: Functions: join() python_exercises_legacy_uniq_function Exercise: Function: uniq() python_exercises_legacy_join_function->python_exercises_legacy_uniq_function python_basics_python_0150_datatypes_overview_compound Compound Datatypes python_exercises_legacy_join_function->python_basics_python_0150_datatypes_overview_compound python_basics_python_0270_functions Functions python_exercises_legacy_join_function->python_basics_python_0270_functions python_basics_python_0150_datatypes_overview Datatypes python_exercises_legacy_join_function->python_basics_python_0150_datatypes_overview python_exercises_legacy_wc Exercise: Counting Lines, Words, Characters python_exercises_legacy_python_0350_exercises Exercise: String (Right-Justify) python_exercises_legacy_wc->python_exercises_legacy_python_0350_exercises python_basics_python_0500_files File I/O python_exercises_legacy_wc->python_basics_python_0500_files python_basics_python_0139_commandline_argv Commandline Arguments (sys.argv) python_exercises_legacy_wc->python_basics_python_0139_commandline_argv python_exercises_legacy_while_primeness Exercise: Primeness (while) python_exercises_legacy_cmdline_digit Exercise: Digit to English Word python_exercises_legacy_while_primeness->python_exercises_legacy_cmdline_digit python_exercises_legacy_while_primeness->python_basics_python_0139_commandline_argv python_basics_python_0193_while while Loops python_exercises_legacy_while_primeness->python_basics_python_0193_while python_exercises_legacy_uniq_generator Exercise: Generator: uniq() python_exercises_legacy_uniq_generator->python_exercises_legacy_uniq_function python_exercises_legacy_passwd Exercise: Parsing /etc/passwd python_exercises_legacy_uniq_generator->python_exercises_legacy_passwd python_advanced_python_1010_generators_yield Iteration, Generators, And yield python_exercises_legacy_uniq_generator->python_advanced_python_1010_generators_yield python_exercises_legacy_max_numbers_function Exercise: Determine Maximum of Two Numbers (Function) python_exercises_legacy_max_numbers Exercise: Determine Maximum of Two Numbers python_exercises_legacy_max_numbers_function->python_exercises_legacy_max_numbers python_exercises_legacy_for_primeness Exercise: Primeness (for) python_exercises_legacy_max_numbers_function->python_exercises_legacy_for_primeness python_exercises_legacy_max_numbers_function->python_basics_python_0270_functions python_exercises_legacy_revert Exercise: Reverting Lines of a File python_exercises_legacy_revert->python_exercises_legacy_wc python_exercises_legacy_revert->python_basics_python_0500_files python_exercises_legacy_revert->python_basics_python_0139_commandline_argv python_exercises_legacy_mixed_list_executable Exercise: Mixed List (Executable Program) python_exercises_legacy_mixed_list_interactive Exercise: Mixed List (Interactive Interpreter) python_exercises_legacy_mixed_list_executable->python_exercises_legacy_mixed_list_interactive python_basics_python_0160_boolean Boolean python_exercises_legacy_mixed_list_executable->python_basics_python_0160_boolean python_basics_python_0120_helloworld Hello World python_exercises_legacy_mixed_list_executable->python_basics_python_0120_helloworld python_exercises_legacy_mixed_list_executable->python_basics_python_0150_datatypes_overview_compound python_exercises_legacy_mixed_list_executable->python_basics_python_0150_datatypes_overview python_basics_python_0140_variables Variables python_exercises_legacy_mixed_list_executable->python_basics_python_0140_variables python_exercises_legacy_python_0350_exercises->python_exercises_legacy_join_function python_basics_python_0300_strings More About Strings python_exercises_legacy_python_0350_exercises->python_basics_python_0300_strings python_basics_python_0310_strings_formatting String Formatting python_exercises_legacy_python_0350_exercises->python_basics_python_0310_strings_formatting python_basics_python_0320_strings_methods Miscellaneous String Methods python_exercises_legacy_python_0350_exercises->python_basics_python_0320_strings_methods python_exercises_legacy_cmdline_digit->python_basics_python_0120_helloworld python_exercises_legacy_cmdline_digit->python_basics_python_0139_commandline_argv python_exercises_legacy_cmdline_digit->python_basics_python_0150_datatypes_overview_compound python_exercises_legacy_cmdline_digit->python_basics_python_0150_datatypes_overview python_exercises_legacy_max_numbers->python_exercises_legacy_mixed_list_executable python_exercises_legacy_max_numbers->python_basics_python_0139_commandline_argv python_exercises_legacy_max_numbers->python_basics_python_0140_variables python_basics_python_0170_if The if Statement python_exercises_legacy_max_numbers->python_basics_python_0170_if python_exercises_legacy_for_primeness->python_exercises_legacy_while_primeness python_basics_python_0225_range The range Function python_exercises_legacy_for_primeness->python_basics_python_0225_range python_basics_python_0220_for for Loops python_exercises_legacy_for_primeness->python_basics_python_0220_for python_exercises_legacy_function_primeness Exercise: Primeness (Function) python_exercises_legacy_uniq_function->python_exercises_legacy_function_primeness python_exercises_legacy_uniq_function->python_basics_python_0150_datatypes_overview_compound python_exercises_legacy_uniq_function->python_basics_python_0270_functions python_exercises_legacy_distill Exercise: Eliminate Empty/Comment-Only Lines python_exercises_legacy_passwd->python_exercises_legacy_distill python_exercises_legacy_passwd->python_basics_python_0500_files python_basics_python_0450_dictionaries More About Dictionaries python_exercises_legacy_passwd->python_basics_python_0450_dictionaries python_exercises_legacy_passwd->python_basics_python_0139_commandline_argv python_basics_python_0210_indexing_slicing Indexing and Slicing python_exercises_legacy_passwd->python_basics_python_0210_indexing_slicing python_exercises_legacy_dict_keyerror Exercise: Dictionary: Errors? python_exercises_legacy_dict_keyerror->python_basics_python_0150_datatypes_overview_compound python_exercises_legacy_function_primeness->python_exercises_legacy_max_numbers_function python_exercises_legacy_function_primeness->python_basics_python_0139_commandline_argv python_exercises_legacy_function_primeness->python_basics_python_0270_functions python_exercises_legacy_distill->python_exercises_legacy_revert python_exercises_legacy_distill->python_basics_python_0500_files python_exercises_legacy_distill->python_basics_python_0139_commandline_argv python_exercises_legacy_python_1011_generators_yield Exercise: Generator: Fibonacci python_exercises_legacy_python_1011_generators_yield->python_exercises_legacy_uniq_generator python_exercises_legacy_python_1011_generators_yield->python_advanced_python_1010_generators_yield python_exercises_legacy_mixed_list_interactive->python_basics_python_0160_boolean python_exercises_legacy_mixed_list_interactive->python_basics_python_0150_datatypes_overview_compound python_exercises_legacy_mixed_list_interactive->python_basics_python_0150_datatypes_overview python_exercises_legacy_mixed_list_interactive->python_basics_python_0140_variables python_exercises_userdb_csvdictreader_function Exercise: Refactoring - Extract CSV Reading Into Function (csv.dictreader) python_exercises_userdb_csvdictreader Exercise: Read CSV File (csv.dictreader) python_exercises_userdb_csvdictreader_function->python_exercises_userdb_csvdictreader python_exercises_userdb_csvdictreader_function->python_basics_python_0270_functions python_exercises_userdb_user_json Exercise: Convert User Record To JSON And Back python_exercises_userdb_userdb_module Exercise: Refactoring - Extract Both CSV Formats Into Module python_exercises_userdb_user_json->python_exercises_userdb_userdb_module python_exercises_userdb_csvreader_function Exercise: Refactoring - Extract CSV Reading Into Function (csv.reader) python_exercises_userdb_csvreader Exercise: Read CSV File (csv.reader) python_exercises_userdb_csvreader_function->python_exercises_userdb_csvreader python_exercises_userdb_csvreader_function->python_basics_python_0270_functions python_exercises_userdb_mqtt_publish_csv Exercise: MQTT: Publish User Records python_exercises_userdb_mqtt_publish_csv->python_exercises_userdb_user_json python_exercises_userdb_csvdictreader->python_exercises_userdb_csvreader python_exercises_userdb_csvdictreader->python_basics_python_0139_commandline_argv python_misc_csv CSV Files python_exercises_userdb_csvdictreader->python_misc_csv python_exercises_userdb_csvreader->python_basics_python_0139_commandline_argv python_exercises_userdb_csvreader->python_misc_csv python_exercises_userdb_userdb_module->python_exercises_userdb_csvdictreader_function python_exercises_userdb_userdb_module->python_exercises_userdb_csvreader python_advanced_modules Modules and Packages python_exercises_userdb_userdb_module->python_advanced_modules python_exercises_userdb_user_class_person Exercise: Away From Raw Dictionaries python_exercises_userdb_user_class_person->python_exercises_userdb_user_json python_exercises_userdb_user_class_person->python_exercises_userdb_userdb_module python_advanced_oo_namedtuple collections.namedtuple python_exercises_userdb_user_class_person->python_advanced_oo_namedtuple python_exercises_herdt_boolean Exercise: Boolean Expressions python_exercises_herdt_boolean->python_basics_python_0160_boolean python_exercises_herdt_while_even_numbers Exercise: Even Numbers (while) python_exercises_herdt_username_password Exercise: Username/Password Check python_exercises_herdt_while_even_numbers->python_exercises_herdt_username_password python_exercises_herdt_while_even_numbers->python_basics_python_0139_commandline_argv python_exercises_herdt_while_even_numbers->python_basics_python_0193_while python_exercises_herdt_greeting Exercise: Greeting, Depending on Time of Day python_exercises_herdt_username_password->python_exercises_herdt_greeting python_exercises_herdt_username_password->python_basics_python_0170_if python_exercises_herdt_max_numbers Exercise: Determine Maximum of Two Numbers python_exercises_herdt_greeting->python_exercises_herdt_max_numbers python_exercises_herdt_greeting->python_basics_python_0170_if python_exercises_herdt_swap Exercise: Swap Two Variables python_exercises_herdt_max_numbers->python_exercises_herdt_swap python_exercises_herdt_max_numbers->python_basics_python_0139_commandline_argv python_exercises_herdt_max_numbers->python_basics_python_0140_variables python_exercises_herdt_max_numbers->python_basics_python_0170_if python_exercises_herdt_swap->python_exercises_herdt_boolean python_exercises_herdt_swap->python_basics_python_0120_helloworld python_exercises_herdt_swap->python_basics_python_0150_datatypes_overview python_exercises_herdt_swap->python_basics_python_0140_variables python_exercises_sensors_project_setup Project Setup python_exercises_sensors_sensor_const Exercise: Basic “Sensor” python_exercises_sensors_project_setup->python_exercises_sensors_sensor_const python_exercises_sensors_sensor_const->python_exercises_sensors_project_setup python_advanced_oo_methods Methods python_exercises_sensors_sensor_const->python_advanced_oo_methods python_exercises_csv_csv_db Exercise: Read CSV File, Write into Sqlite3 Database python_exercises_csv_csv_db->python_basics_python_0139_commandline_argv python_db_sqlite3 DBAPI 2: sqlite3 python_exercises_csv_csv_db->python_db_sqlite3 python_exercises_csv_csv_module Exercise: Read CSV File python_exercises_csv_csv_module->python_basics_python_0139_commandline_argv python_exercises_csv_csv_module->python_advanced_python_1010_generators_yield python_exercises_csv_csv_module->python_advanced_modules python_exercises_csv_csv_module->python_misc_csv python_basics_python_0160_boolean->python_basics_python_0150_datatypes_overview python_basics_python_0500_files->python_basics_python_0220_for python_misc_encoding Encoding python_basics_python_0500_files->python_misc_encoding python_basics_python_0110_blahblah Blahblah python_basics_python_0120_helloworld->python_basics_python_0110_blahblah python_basics_python_0200_sequential_types Sequential Datatypes python_basics_python_0300_strings->python_basics_python_0200_sequential_types python_basics_python_0300_strings->python_basics_python_0150_datatypes_overview python_basics_python_0250_refs_flat_deep_copy References, (Im)mutability python_basics_python_0300_strings->python_basics_python_0250_refs_flat_deep_copy python_basics_python_0130_syntax_etc Syntax etc. python_basics_python_0130_syntax_etc->python_basics_python_0120_helloworld python_basics_python_0310_strings_formatting->python_basics_python_0300_strings python_basics_python_0450_dictionaries->python_basics_python_0150_datatypes_overview_compound python_basics_python_0450_dictionaries->python_basics_python_0220_for python_basics_python_0139_commandline_argv->python_basics_python_0130_syntax_etc python_basics_python_0125_running Running Python Programs python_basics_python_0139_commandline_argv->python_basics_python_0125_running python_basics_python_0150_datatypes_overview_compound->python_basics_python_0150_datatypes_overview python_basics_python_0210_indexing_slicing->python_basics_python_0200_sequential_types python_basics_python_0193_while->python_basics_python_0160_boolean python_basics_python_0193_while->python_basics_python_0170_if python_basics_python_0200_sequential_types->python_basics_python_0150_datatypes_overview_compound python_basics_python_0270_functions->python_basics_python_0150_datatypes_overview python_basics_python_0270_functions->python_basics_python_0140_variables python_basics_python_0125_running->python_basics_python_0120_helloworld python_basics_python_0225_range->python_basics_python_0200_sequential_types python_basics_python_0225_range->python_basics_python_0220_for python_basics_python_0150_datatypes_overview->python_basics_python_0140_variables python_basics_python_0320_strings_methods->python_basics_python_0300_strings python_basics_python_0250_refs_flat_deep_copy->python_basics_python_0150_datatypes_overview_compound python_basics_python_0250_refs_flat_deep_copy->python_basics_python_0150_datatypes_overview python_basics_python_0250_refs_flat_deep_copy->python_basics_python_0140_variables python_basics_python_0140_variables->python_basics_python_0130_syntax_etc python_basics_python_0170_if->python_basics_python_0160_boolean python_basics_python_0220_for->python_basics_python_0193_while python_basics_python_0220_for->python_basics_python_0200_sequential_types python_db_dbapi2 DBAPI 2 python_db_sqlite3->python_db_dbapi2 python_db_dbapi2->python_basics_python_0220_for python_db_dbapi2->python_advanced_python_1010_generators_yield python_db_dbapi2->python_advanced_modules python_advanced_python_1010_generators_yield->python_basics_python_0200_sequential_types python_advanced_python_1010_generators_yield->python_basics_python_0270_functions python_advanced_python_1010_generators_yield->python_basics_python_0225_range python_advanced_python_1010_generators_yield->python_basics_python_0220_for python_advanced_oo_classes_and_dicts Classes And Dictionaries python_advanced_oo_classes_and_dicts->python_basics_python_0150_datatypes_overview_compound python_advanced_oo_methods->python_advanced_oo_classes_and_dicts python_advanced_oo_namedtuple->python_advanced_oo_classes_and_dicts python_misc_encoding->python_basics_python_0150_datatypes_overview python_misc_encoding->python_basics_python_0320_strings_methods python_misc_csv->python_basics_python_0500_files python_misc_csv->python_basics_python_0150_datatypes_overview_compound python_misc_csv->python_basics_python_0220_for