From c03005434c2560a988585fca6688340b5e74d8c3 Mon Sep 17 00:00:00 2001 From: jsl1114 Date: Tue, 4 Nov 2025 19:16:59 -0500 Subject: [PATCH 01/28] init: boilerplate code --- Pipfile | 17 +++++++++++++++++ README.md | 19 +++++++++++++++++-- examples/demo.py | 0 src/emojiguessr/__init__.py | 0 src/emojiguessr/__main__.py | 0 src/emojiguessr/data.py | 0 src/emojiguessr/quiz.py | 0 src/emojiguessr/score.py | 0 tests/__init__.py | 0 9 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 Pipfile create mode 100644 examples/demo.py create mode 100644 src/emojiguessr/__init__.py create mode 100644 src/emojiguessr/__main__.py create mode 100644 src/emojiguessr/data.py create mode 100644 src/emojiguessr/quiz.py create mode 100644 src/emojiguessr/score.py create mode 100644 tests/__init__.py diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..8c15529 --- /dev/null +++ b/Pipfile @@ -0,0 +1,17 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +emojiguessr = {file: ".", editable: true} +build = "*" +pytest = "*" +coverage = "*" +pytest-cov = "*" +twine = "*" + +[dev-packages] + +[requires] +python_version = "3.13" \ No newline at end of file diff --git a/README.md b/README.md index 6022e0e..2db7080 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,18 @@ -# Python Package Exercise +# ๐Ÿ˜† EmojiGuessr [CI status link goes here]() -An exercise to create a Python package, build it, test it, distribute it, and use it. See [instructions](./instructions.md) for details. +EmojiGuessr is a Python package that turns emoji strings into quick guessing games. Pick a theme (food, animals, movies, even dev jokes), get an emoji clue and guess the name! + +Link to PyPI: []() + +## Team Members +[Jason Liu](https://github.com/jsl1114) +member2 +member3 +member4 +member5 + +## Installation + +## Usage (with code examples) + +## Contributions diff --git a/examples/demo.py b/examples/demo.py new file mode 100644 index 0000000..e69de29 diff --git a/src/emojiguessr/__init__.py b/src/emojiguessr/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/emojiguessr/__main__.py b/src/emojiguessr/__main__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/emojiguessr/data.py b/src/emojiguessr/data.py new file mode 100644 index 0000000..e69de29 diff --git a/src/emojiguessr/quiz.py b/src/emojiguessr/quiz.py new file mode 100644 index 0000000..e69de29 diff --git a/src/emojiguessr/score.py b/src/emojiguessr/score.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 From e4f701eeed63d07ef1cb79e6b77910bdaf5418d6 Mon Sep 17 00:00:00 2001 From: jsl1114 Date: Tue, 4 Nov 2025 19:20:14 -0500 Subject: [PATCH 02/28] version req change --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 8c15529..d160e85 100644 --- a/Pipfile +++ b/Pipfile @@ -14,4 +14,4 @@ twine = "*" [dev-packages] [requires] -python_version = "3.13" \ No newline at end of file +python_version = "3" \ No newline at end of file From a5dc0e99cce1203afbe9de643fac041ca1647808 Mon Sep 17 00:00:00 2001 From: jsl1114 Date: Tue, 4 Nov 2025 19:38:47 -0500 Subject: [PATCH 03/28] feat: emojibank and random emoji generator --- src/emojiguessr/data.py | 94 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/src/emojiguessr/data.py b/src/emojiguessr/data.py index e69de29..a7f1f21 100644 --- a/src/emojiguessr/data.py +++ b/src/emojiguessr/data.py @@ -0,0 +1,94 @@ +import random + +_EMOJI_BANK = { + "food": [ + ("๐Ÿ•", "pizza"), + ("๐Ÿฃ", "sushi"), + ("๐Ÿ”", "burger"), + ("๐ŸŸ", "fries"), + ("๐ŸŒฎ", "taco"), + ("๐Ÿœ", "ramen"), + ("๐Ÿฅ", "croissant"), + ("๐Ÿฉ", "donut"), + ("๐ŸŽ", "apple"), + ("๐Ÿฐ", "cake"), + ], + "animals": [ + ("๐Ÿถ", "dog"), + ("๐Ÿฑ", "cat"), + ("๐Ÿผ", "panda"), + ("๐Ÿฆ", "lion"), + ("๐Ÿธ", "frog"), + ("๐Ÿง", "penguin"), + ("๐ŸฆŠ", "fox"), + ("๐Ÿ˜", "elephant"), + ("๐Ÿข", "turtle"), + ("๐Ÿฆ„", "unicorn"), + ], + "movies": [ + ("๐Ÿง™โ€โ™‚๏ธ๐Ÿ’", "lord of the rings"), + ("๐Ÿšข๐ŸงŠ", "titanic"), + ("๐Ÿฆ–๐Ÿž๏ธ", "jurassic park"), + ("๐Ÿ‘ธ๐Ÿผโ„๏ธ", "frozen"), + ("๐Ÿง”โšก", "harry potter"), + ("๐Ÿ‘จโ€๐Ÿš€๐ŸŒ•", "space movie"), + ("๐Ÿฆธโ€โ™‚๏ธ", "superman"), + ("๐Ÿš—๐Ÿ’จ", "fast and furious"), + ], + "games": [ + ("๐ŸŽฎ", "video game"), + ("โ™Ÿ๏ธ", "chess"), + ("๐Ÿƒ", "card game"), + ("๐ŸŽฏ", "darts"), + ("๐Ÿ•น๏ธ", "arcade"), + ("๐ŸŽฒ", "board game"), + ], + "cities": [ + ("๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ—ฝ", "new york"), + ("๐Ÿ‡ซ๐Ÿ‡ท๐Ÿ—ผ", "paris"), + ("๐Ÿ‡ฌ๐Ÿ‡ง๐ŸŽก", "london"), + ("โ›ฉ๏ธ๐ŸŒธ", "kyoto"), + ("๐Ÿ‡ฏ๐Ÿ‡ต๐Ÿ—ผ", "tokyo"), + ("๐Ÿ‡ฆ๐Ÿ‡บ๐ŸŒ‰", "sydney"), + ("๐Ÿ‡ฎ๐Ÿ‡น๐Ÿ›๏ธ", "rome"), + ("๐Ÿ‡ช๐Ÿ‡ฌ๐Ÿ•Œ", "cairo"), + ("๐Ÿ‡ง๐Ÿ‡ท๐ŸŽญ", "rio de janeiro"), + ("๐Ÿ‡จ๐Ÿ‡ณ๐Ÿผ", "chengdu"), + ], + "feelings": [ + ("๐Ÿ˜€", "happy"), + ("๐Ÿ˜ข", "sad"), + ("๐Ÿ˜ก", "angry"), + ("๐Ÿค”", "thinking"), + ("๐Ÿฅฑ", "tired"), + ("๐Ÿค’", "sick"), + ("๐Ÿ˜Ž", "cool"), + ("๐Ÿฅณ", "celebrating"), + ], + "dev": [ + ("๐Ÿ’ปโ˜•", "coding"), + ("๐Ÿ๐Ÿ“ฆ", "python package"), + ("๐Ÿ›๐Ÿ”", "debugging"), + ("๐Ÿ“ฆโฌ†๏ธ", "deploy"), + ("๐Ÿงชโœ…", "tests passing"), + ("โš ๏ธ๐Ÿ›", "bug"), + ], +} + + +def random_emojis(count=3, theme="food"): + items = _EMOJI_BANK.get(theme) + if not items: + all_emoji = [e for v in _EMOJI_BANK.values() for (e, _) in v] + random.shuffle(all_emoji) + return all_emoji[: min(count, len(all_emoji))] + emojis = [e for (e, _) in items] + random.shuffle(emojis) + return emojis[:count] + + +def get_theme_item(theme="food"): + items = _EMOJI_BANK.get(theme) + if not items: + items = _EMOJI_BANK["food"] + return random.choice(items) From ec6a03341a9eabc7066dc1ab82f0623bca119dfd Mon Sep 17 00:00:00 2001 From: jsl1114 Date: Tue, 4 Nov 2025 20:01:55 -0500 Subject: [PATCH 04/28] feat: add scoring algorithm --- src/emojiguessr/score.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emojiguessr/score.py b/src/emojiguessr/score.py index e69de29..979bd25 100644 --- a/src/emojiguessr/score.py +++ b/src/emojiguessr/score.py @@ -0,0 +1,4 @@ +def score(current_score, correct=True, points=1): + if correct: + return current_score + points + return current_score From dbaf03d6a6cf39dcf02f2e16406f85b767dd44c0 Mon Sep 17 00:00:00 2001 From: jsl1114 Date: Tue, 4 Nov 2025 20:03:03 -0500 Subject: [PATCH 05/28] feat: quiz helper functions --- src/emojiguessr/quiz.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/emojiguessr/quiz.py b/src/emojiguessr/quiz.py index e69de29..76fa056 100644 --- a/src/emojiguessr/quiz.py +++ b/src/emojiguessr/quiz.py @@ -0,0 +1,24 @@ +from .data import get_theme_item + + +def make_quiz_item(theme="food"): + emoji, answer = get_theme_item(theme) + return {"clue": emoji, "answer": answer, "theme": theme} + + +def _normalize(text): + return text.strip().lower() + + +def check_answer(correct, guess, case_sensitive=False, allow_partial=True): + if case_sensitive: + if allow_partial: + return correct.startswith(guess) + return correct == guess + + correct_n = _normalize(correct) + guess_n = _normalize(guess) + + if allow_partial: + return correct_n.startswith(guess_n) + return correct_n == guess_n From 872a3b4fe358283da43962d9f79b38d6b08f0cb1 Mon Sep 17 00:00:00 2001 From: jsl1114 Date: Tue, 4 Nov 2025 20:28:56 -0500 Subject: [PATCH 06/28] feat: cli and emoji quiz flow --- src/emojiguessr/__init__.py | 10 +++ src/emojiguessr/__main__.py | 130 ++++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) diff --git a/src/emojiguessr/__init__.py b/src/emojiguessr/__init__.py index e69de29..cb4cfa2 100644 --- a/src/emojiguessr/__init__.py +++ b/src/emojiguessr/__init__.py @@ -0,0 +1,10 @@ +from .data import random_emojis +from .quiz import make_quiz_item, check_answer +from .score import score + +__all__ = [ + "random_emojis", + "make_quiz_item", + "check_answer", + "score", +] diff --git a/src/emojiguessr/__main__.py b/src/emojiguessr/__main__.py index e69de29..7058863 100644 --- a/src/emojiguessr/__main__.py +++ b/src/emojiguessr/__main__.py @@ -0,0 +1,130 @@ +import argparse +from emojiguessr import make_quiz_item, check_answer, score +from emojiguessr.data import _EMOJI_BANK + + +def run_quiz(num_questions, theme, case_sensitive, allow_partial, max_attempts): + s = 0 + for i in range(1, num_questions + 1): + item = make_quiz_item(theme=theme) + clue = item["clue"] + answer = item["answer"] + + print(f"\nQuestion {i}/{num_questions}") + print(f"Theme: {item['theme']}") + print(f"Emoji: {clue}") + + attempts_left = max_attempts + while attempts_left > 0: + guess = input("Your guess: ") + + is_right = check_answer( + correct=answer, + guess=guess, + case_sensitive=case_sensitive, + allow_partial=allow_partial, + ) + + s = score(s, correct=is_right) + + if is_right: + print("โœ… Correct!") + break + else: + attempts_left -= 1 + if attempts_left > 0: + print(f"โŒ Wrong! {attempts_left} attempts left.") + else: + print(f"โŒ Nope โ€” it was: {answer}") + + print(f"\nFinal score: {s}/{num_questions}") + + +def list_themes(): + print("Available themes:") + for theme in sorted(_EMOJI_BANK.keys()): + print(f" - {theme}") + + +def list_commands(): + print("Available commands:") + print(" --num-questions, -n : Number of questions to ask (default: 3)") + print(" --theme, -t : Emoji theme to use (default: food)") + print(" --case-sensitive : Make answers case-sensitive (default: off)") + print(" --no-partial : Disable partial matches") + print( + " --max-attempts, -a : Maximum number of attempts per question (default: 1)" + ) + print(" --list-themes, -lt : List available themes and exit") + print(" --list-commands, -lc : List available commands and exit") + + +def main(): + parser = argparse.ArgumentParser( + prog="emojiguessr", + description="Play a quick emoji guessing game in your terminal.", + ) + parser.add_argument( + "--num-questions", + "-n", + type=int, + default=3, + help="Number of questions to ask (default: 3)", + ) + parser.add_argument( + "--theme", + "-t", + default="food", + help="Emoji theme to use (default: food). Use --list-themes to see options.", + ) + parser.add_argument( + "--case-sensitive", + action="store_true", + help="Make answers case-sensitive (default: off)", + ) + parser.add_argument( + "--no-partial", + action="store_true", + help="Disable partial matches (so 'jurassic' won't match 'jurassic park')", + ) + parser.add_argument( + "--max-attempts", + "-a", + type=int, + default=1, + help="Maximum number of attempts per question (default: 1)", + ) + parser.add_argument( + "--list-themes", + "-lt", + action="store_true", + help="List available themes and exit.", + ) + parser.add_argument( + "--list-commands", + "-lc", + action="store_true", + help="List available commands and exit.", + ) + + args = parser.parse_args() + + if args.list_themes: + list_themes() + return + + if args.list_commands: + list_commands() + return + + run_quiz( + num_questions=args.num_questions, + theme=args.theme, + case_sensitive=args.case_sensitive, + allow_partial=not args.no_partial, + max_attempts=args.max_attempts, + ) + + +if __name__ == "__main__": + main() From f6c4610da19bbfe4d3fb068f7e6fdb48d678034f Mon Sep 17 00:00:00 2001 From: jsl1114 Date: Tue, 4 Nov 2025 20:31:46 -0500 Subject: [PATCH 07/28] feat: pipfile and build req setup --- Pipfile | 11 +- Pipfile.lock | 478 +++++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 25 +++ 3 files changed, 508 insertions(+), 6 deletions(-) create mode 100644 Pipfile.lock create mode 100644 pyproject.toml diff --git a/Pipfile b/Pipfile index d160e85..e37cf8b 100644 --- a/Pipfile +++ b/Pipfile @@ -1,17 +1,16 @@ [[source]] +name = "pypi" url = "https://pypi.org/simple" verify_ssl = true -name = "pypi" [packages] -emojiguessr = {file: ".", editable: true} -build = "*" -pytest = "*" coverage = "*" -pytest-cov = "*" twine = "*" +build = "*" +pytest = "*" +emojiguessr = {file = ".", editable = true} [dev-packages] [requires] -python_version = "3" \ No newline at end of file +python_version = "3" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..f544a26 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,478 @@ +{ + "_meta": { + "hash": { + "sha256": "0bb31abc3f9385f65dcb125d368c70ec58c2755c72e4fa58d1492ecdb2544384" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "build": { + "hashes": [ + "sha256:698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397", + "sha256:7145f0b5061ba90a1500d60bd1b13ca0a8a4cebdd0cc16ed8adf1c0e739f43b4" + ], + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==1.3.0" + }, + "certifi": { + "hashes": [ + "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de", + "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43" + ], + "markers": "python_version >= '3.7'", + "version": "==2025.10.5" + }, + "charset-normalizer": { + "hashes": [ + "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad", + "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93", + "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394", + "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89", + "sha256:0f04b14ffe5fdc8c4933862d8306109a2c51e0704acfa35d51598eb45a1e89fc", + "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86", + "sha256:194f08cbb32dc406d6e1aea671a68be0823673db2832b38405deba2fb0d88f63", + "sha256:1bee1e43c28aa63cb16e5c14e582580546b08e535299b8b6158a7c9c768a1f3d", + "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f", + "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8", + "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0", + "sha256:2677acec1a2f8ef614c6888b5b4ae4060cc184174a938ed4e8ef690e15d3e505", + "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161", + "sha256:2aaba3b0819274cc41757a1da876f810a3e4d7b6eb25699253a4effef9e8e4af", + "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", + "sha256:2c9d3c380143a1fedbff95a312aa798578371eb29da42106a29019368a475318", + "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", + "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4", + "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", + "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3", + "sha256:44c2a8734b333e0578090c4cd6b16f275e07aa6614ca8715e6c038e865e70576", + "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", + "sha256:4902828217069c3c5c71094537a8e623f5d097858ac6ca8252f7b4d10b7560f1", + "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8", + "sha256:4fe7859a4e3e8457458e2ff592f15ccb02f3da787fcd31e0183879c3ad4692a1", + "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", + "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", + "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26", + "sha256:5947809c8a2417be3267efc979c47d76a079758166f7d43ef5ae8e9f92751f88", + "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016", + "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", + "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf", + "sha256:5cb4d72eea50c8868f5288b7f7f33ed276118325c1dfd3957089f6b519e1382a", + "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc", + "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0", + "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84", + "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db", + "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1", + "sha256:6aee717dcfead04c6eb1ce3bd29ac1e22663cdea57f943c87d1eab9a025438d7", + "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", + "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8", + "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", + "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", + "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef", + "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", + "sha256:778d2e08eda00f4256d7f672ca9fef386071c9202f5e4607920b86d7803387f2", + "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0", + "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d", + "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", + "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", + "sha256:7c308f7e26e4363d79df40ca5b2be1c6ba9f02bdbccfed5abddb7859a6ce72cf", + "sha256:7fa17817dc5625de8a027cb8b26d9fefa3ea28c8253929b8d6649e705d2835b6", + "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", + "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", + "sha256:837c2ce8c5a65a2035be9b3569c684358dfbf109fd3b6969630a87535495ceaa", + "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381", + "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", + "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", + "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc", + "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", + "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", + "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", + "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", + "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e", + "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313", + "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569", + "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3", + "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d", + "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525", + "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", + "sha256:a8bf8d0f749c5757af2142fe7903a9df1d2e8aa3841559b2bad34b08d0e2bcf3", + "sha256:a9768c477b9d7bd54bc0c86dbaebdec6f03306675526c9927c0e8a04e8f94af9", + "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a", + "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9", + "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", + "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25", + "sha256:b5d84d37db046c5ca74ee7bb47dd6cbc13f80665fdde3e8040bdd3fb015ecb50", + "sha256:b7cf1017d601aa35e6bb650b6ad28652c9cd78ee6caff19f3c28d03e1c80acbf", + "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", + "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", + "sha256:c4ef880e27901b6cc782f1b95f82da9313c0eb95c3af699103088fa0ac3ce9ac", + "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", + "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815", + "sha256:cb01158d8b88ee68f15949894ccc6712278243d95f344770fa7593fa2d94410c", + "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", + "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6", + "sha256:cd09d08005f958f370f539f186d10aec3377d55b9eeb0d796025d4886119d76e", + "sha256:cd4b7ca9984e5e7985c12bc60a6f173f3c958eae74f3ef6624bb6b26e2abbae4", + "sha256:ce8a0633f41a967713a59c4139d29110c07e826d131a316b50ce11b1d79b4f84", + "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69", + "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15", + "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", + "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0", + "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897", + "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", + "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", + "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", + "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d", + "sha256:e912091979546adf63357d7e2ccff9b44f026c075aeaf25a52d0e95ad2281074", + "sha256:eaabd426fe94daf8fd157c32e571c85cb12e66692f15516a83a03264b08d06c3", + "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224", + "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", + "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a", + "sha256:f155a433c2ec037d4e8df17d18922c3a0d9b3232a396690f17175d2946f0218d", + "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d", + "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f", + "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8", + "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", + "sha256:f8e160feb2aed042cd657a72acc0b481212ed28b1b9a95c0cee1621b524e1966", + "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", + "sha256:fa09f53c465e532f4d3db095e0c55b615f010ad81803d383195b6b5ca6cbf5f3", + "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e", + "sha256:fd44c878ea55ba351104cb93cc85e74916eb8fa440ca7903e57575e97394f608" + ], + "markers": "python_version >= '3.7'", + "version": "==3.4.4" + }, + "coverage": { + "hashes": [ + "sha256:037b2d064c2f8cc8716fe4d39cb705779af3fbf1ba318dc96a1af858888c7bb5", + "sha256:05791e528a18f7072bf5998ba772fe29db4da1234c45c2087866b5ba4dea710e", + "sha256:0d7f0616c557cbc3d1c2090334eddcbb70e1ae3a40b07222d62b3aa47f608fab", + "sha256:0efa742f431529699712b92ecdf22de8ff198df41e43aeaaadf69973eb93f17a", + "sha256:10ad04ac3a122048688387828b4537bc9cf60c0bf4869c1e9989c46e45690b82", + "sha256:167bd504ac1ca2af7ff3b81d245dfea0292c5032ebef9d66cc08a7d28c1b8050", + "sha256:16ce17ceb5d211f320b62df002fa7016b7442ea0fd260c11cec8ce7730954893", + "sha256:214b622259dd0cf435f10241f1333d32caa64dbc27f8790ab693428a141723de", + "sha256:24d6f3128f1b2d20d84b24f4074475457faedc3d4613a7e66b5e769939c7d969", + "sha256:258d9967520cca899695d4eb7ea38be03f06951d6ca2f21fb48b1235f791e601", + "sha256:269bfe913b7d5be12ab13a95f3a76da23cf147be7fa043933320ba5625f0a8de", + "sha256:2727d47fce3ee2bac648528e41455d1b0c46395a087a229deac75e9f88ba5a05", + "sha256:314c24e700d7027ae3ab0d95fbf8d53544fca1f20345fd30cd219b737c6e58d3", + "sha256:3d4ba9a449e9364a936a27322b20d32d8b166553bfe63059bd21527e681e2fad", + "sha256:3d4ed4de17e692ba6415b0587bc7f12bc80915031fc9db46a23ce70fc88c9841", + "sha256:3d58ecaa865c5b9fa56e35efc51d1014d4c0d22838815b9fce57a27dd9576847", + "sha256:4036cc9c7983a2b1f2556d574d2eb2154ac6ed55114761685657e38782b23f52", + "sha256:424538266794db2861db4922b05d729ade0940ee69dcf0591ce8f69784db0e11", + "sha256:4b7589765348d78fb4e5fb6ea35d07564e387da2fc5efff62e0222971f155f68", + "sha256:4c1eeb3fb8eb9e0190bebafd0462936f75717687117339f708f395fe455acc73", + "sha256:4d3ffa07a08657306cd2215b0da53761c4d73cb54d9143b9303a6481ec0cd415", + "sha256:5693e57a065760dcbeb292d60cc4d0231a6d4b6b6f6a3191561e1d5e8820b745", + "sha256:587c38849b853b157706407e9ebdca8fd12f45869edb56defbef2daa5fb0812b", + "sha256:596763d2f9a0ee7eec6e643e29660def2eef297e1de0d334c78c08706f1cb785", + "sha256:59a6e5a265f7cfc05f76e3bb53eca2e0dfe90f05e07e849930fecd6abb8f40b4", + "sha256:5a03eaf7ec24078ad64a07f02e30060aaf22b91dedf31a6b24d0d98d2bba7f48", + "sha256:5ef83b107f50db3f9ae40f69e34b3bd9337456c5a7fe3461c7abf8b75dd666a2", + "sha256:630d0bd7a293ad2fc8b4b94e5758c8b2536fdf36c05f1681270203e463cbfa9b", + "sha256:695340f698a5f56f795b2836abe6fb576e7c53d48cd155ad2f80fd24bc63a040", + "sha256:6fbcee1a8f056af07ecd344482f711f563a9eb1c2cad192e87df00338ec3cdb0", + "sha256:7161edd3426c8d19bdccde7d49e6f27f748f3c31cc350c5de7c633fea445d866", + "sha256:73feb83bb41c32811973b8565f3705caf01d928d972b72042b44e97c71fd70d1", + "sha256:765c0bc8fe46f48e341ef737c91c715bd2a53a12792592296a095f0c237e09cf", + "sha256:7ab934dd13b1c5e94b692b1e01bd87e4488cb746e3a50f798cb9464fd128374b", + "sha256:7db53b5cdd2917b6eaadd0b1251cf4e7d96f4a8d24e174bdbdf2f65b5ea7994d", + "sha256:80027673e9d0bd6aef86134b0771845e2da85755cf686e7c7c59566cf5a89115", + "sha256:81b335f03ba67309a95210caf3eb43bd6fe75a4e22ba653ef97b4696c56c7ec2", + "sha256:865965bf955d92790f1facd64fe7ff73551bd2c1e7e6b26443934e9701ba30b9", + "sha256:8badf70446042553a773547a61fecaa734b55dc738cacf20c56ab04b77425e43", + "sha256:8c934bd088eed6174210942761e38ee81d28c46de0132ebb1801dbe36a390dcc", + "sha256:9516add7256b6713ec08359b7b05aeff8850c98d357784c7205b2e60aa2513fa", + "sha256:9c49e77811cf9d024b95faf86c3f059b11c0c9be0b0d61bc598f453703bd6fd1", + "sha256:9cbabd8f4d0d3dc571d77ae5bdbfa6afe5061e679a9d74b6797c48d143307088", + "sha256:9ed43fa22c6436f7957df036331f8fe4efa7af132054e1844918866cd228af6c", + "sha256:a09c1211959903a479e389685b7feb8a17f59ec5a4ef9afde7650bd5eabc2777", + "sha256:a1839d08406e4cba2953dcc0ffb312252f14d7c4c96919f70167611f4dee2623", + "sha256:a386c1061bf98e7ea4758e4313c0ab5ecf57af341ef0f43a0bf26c2477b5c268", + "sha256:a3b6a5f8b2524fd6c1066bc85bfd97e78709bb5e37b5b94911a6506b65f47186", + "sha256:a3d0e2087dba64c86a6b254f43e12d264b636a39e88c5cc0a01a7c71bcfdab7e", + "sha256:a61e37a403a778e2cda2a6a39abcc895f1d984071942a41074b5c7ee31642007", + "sha256:aef1747ede4bd8ca9cfc04cc3011516500c6891f1b33a94add3253f6f876b7b7", + "sha256:b56efee146c98dbf2cf5cffc61b9829d1e94442df4d7398b26892a53992d3547", + "sha256:b5c2705afa83f49bd91962a4094b6b082f94aef7626365ab3f8f4bd159c5acf3", + "sha256:b679e171f1c104a5668550ada700e3c4937110dbdd153b7ef9055c4f1a1ee3cc", + "sha256:b971bdefdd75096163dd4261c74be813c4508477e39ff7b92191dea19f24cd37", + "sha256:bab7ec4bb501743edc63609320aaec8cd9188b396354f482f4de4d40a9d10721", + "sha256:bc1fbea96343b53f65d5351d8fd3b34fd415a2670d7c300b06d3e14a5af4f552", + "sha256:c6f31f281012235ad08f9a560976cc2fc9c95c17604ff3ab20120fe480169bca", + "sha256:c770885b28fb399aaf2a65bbd1c12bf6f307ffd112d6a76c5231a94276f0c497", + "sha256:c79cae102bb3b1801e2ef1511fb50e91ec83a1ce466b2c7c25010d884336de46", + "sha256:c9f08ea03114a637dab06cedb2e914da9dc67fa52c6015c018ff43fdde25b9c2", + "sha256:ca61691ba8c5b6797deb221a0d09d7470364733ea9c69425a640f1f01b7c5bf0", + "sha256:cacb29f420cfeb9283b803263c3b9a068924474ff19ca126ba9103e1278dfa44", + "sha256:cc3f49e65ea6e0d5d9bd60368684fe52a704d46f9e7fc413918f18d046ec40e1", + "sha256:cdbcd376716d6b7fbfeedd687a6c4be019c5a5671b35f804ba76a4c0a778cba4", + "sha256:ce37f215223af94ef0f75ac68ea096f9f8e8c8ec7d6e8c346ee45c0d363f0479", + "sha256:ce9f3bde4e9b031eaf1eb61df95c1401427029ea1bfddb8621c1161dcb0fa02e", + "sha256:cee6291bb4fed184f1c2b663606a115c743df98a537c969c3c64b49989da96c2", + "sha256:cf9e6ff4ca908ca15c157c409d608da77a56a09877b97c889b98fb2c32b6465e", + "sha256:d06f4fc7acf3cabd6d74941d53329e06bab00a8fe10e4df2714f0b134bfc64ef", + "sha256:d66c0104aec3b75e5fd897e7940188ea1892ca1d0235316bf89286d6a22568c0", + "sha256:d91ebeac603812a09cf6a886ba6e464f3bbb367411904ae3790dfe28311b15ad", + "sha256:d9a03ec6cb9f40a5c360f138b88266fd8f58408d71e89f536b4f91d85721d075", + "sha256:dadbcce51a10c07b7c72b0ce4a25e4b6dcb0c0372846afb8e5b6307a121eb99f", + "sha256:dba82204769d78c3fd31b35c3d5f46e06511936c5019c39f98320e05b08f794d", + "sha256:dbbf012be5f32533a490709ad597ad8a8ff80c582a95adc8d62af664e532f9ca", + "sha256:df01d6c4c81e15a7c88337b795bb7595a8596e92310266b5072c7e301168efbd", + "sha256:e0eb0a2dcc62478eb5b4cbb80b97bdee852d7e280b90e81f11b407d0b81c4287", + "sha256:e24045453384e0ae2a587d562df2a04d852672eb63051d16096d3f08aa4c7c2f", + "sha256:e44a86a47bbdf83b0a3ea4d7df5410d6b1a0de984fbd805fa5101f3624b9abe0", + "sha256:e4dc07e95495923d6fd4d6c27bf70769425b71c89053083843fd78f378558996", + "sha256:e89641f5175d65e2dbb44db15fe4ea48fade5d5bbb9868fdc2b4fce22f4a469d", + "sha256:e9570ad567f880ef675673992222746a124b9595506826b210fbe0ce3f0499cd", + "sha256:eb53f1e8adeeb2e78962bade0c08bfdc461853c7969706ed901821e009b35e31", + "sha256:eb92e47c92fcbcdc692f428da67db33337fa213756f7adb6a011f7b5a7a20740", + "sha256:ef55537ff511b5e0a43edb4c50a7bf7ba1c3eea20b4f49b1490f1e8e0e42c591", + "sha256:f39ae2f63f37472c17b4990f794035c9890418b1b8cca75c01193f3c8d3e01be", + "sha256:f413ce6e07e0d0dc9c433228727b619871532674b45165abafe201f200cc215f", + "sha256:f91f927a3215b8907e214af77200250bb6aae36eca3f760f89780d13e495388d", + "sha256:f9ea02ef40bb83823b2b04964459d281688fe173e20643870bb5d2edf68bc836", + "sha256:fcc0a4aa589de34bc56e1a80a740ee0f8c47611bdfb28cd1849de60660f3799d", + "sha256:fcc15fc462707b0680cff6242c48625da7f9a16a28a41bb8fd7a4280920e676c" + ], + "index": "pypi", + "markers": "python_version >= '3.10'", + "version": "==7.11.0" + }, + "docutils": { + "hashes": [ + "sha256:9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d", + "sha256:b0e98d679283fc3bb0ead8a5da7f501baa632654e7056e9c5846842213d674d8" + ], + "markers": "python_version >= '3.9'", + "version": "==0.22.2" + }, + "emojiguessr": { + "editable": true, + "file": "." + }, + "id": { + "hashes": [ + "sha256:292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d", + "sha256:f1434e1cef91f2cbb8a4ec64663d5a23b9ed43ef44c4c957d02583d61714c658" + ], + "markers": "python_version >= '3.8'", + "version": "==1.5.0" + }, + "idna": { + "hashes": [ + "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", + "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + ], + "markers": "python_version >= '3.8'", + "version": "==3.11" + }, + "iniconfig": { + "hashes": [ + "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", + "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12" + ], + "markers": "python_version >= '3.10'", + "version": "==2.3.0" + }, + "jaraco.classes": { + "hashes": [ + "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd", + "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790" + ], + "markers": "python_version >= '3.8'", + "version": "==3.4.0" + }, + "jaraco.context": { + "hashes": [ + "sha256:9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3", + "sha256:f797fc481b490edb305122c9181830a3a5b76d84ef6d1aef2fb9b47ab956f9e4" + ], + "markers": "python_version >= '3.8'", + "version": "==6.0.1" + }, + "jaraco.functools": { + "hashes": [ + "sha256:227ff8ed6f7b8f62c56deff101545fa7543cf2c8e7b82a7c2116e672f29c26e8", + "sha256:cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294" + ], + "markers": "python_version >= '3.9'", + "version": "==4.3.0" + }, + "keyring": { + "hashes": [ + "sha256:0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66", + "sha256:552a3f7af126ece7ed5c89753650eec89c7eaae8617d0aa4d9ad2b75111266bd" + ], + "markers": "python_version >= '3.9'", + "version": "==25.6.0" + }, + "markdown-it-py": { + "hashes": [ + "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", + "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + ], + "markers": "python_version >= '3.10'", + "version": "==4.0.0" + }, + "mdurl": { + "hashes": [ + "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", + "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" + ], + "markers": "python_version >= '3.7'", + "version": "==0.1.2" + }, + "more-itertools": { + "hashes": [ + "sha256:52d4362373dcf7c52546bc4af9a86ee7c4579df9a8dc268be0a2f949d376cc9b", + "sha256:f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd" + ], + "markers": "python_version >= '3.9'", + "version": "==10.8.0" + }, + "nh3": { + "hashes": [ + "sha256:019ecbd007536b67fdf76fab411b648fb64e2257ca3262ec80c3425c24028c80", + "sha256:03d617e5c8aa7331bd2659c654e021caf9bba704b109e7b2b28b039a00949fe5", + "sha256:0dca4365db62b2d71ff1620ee4f800c4729849906c5dd504ee1a7b2389558e31", + "sha256:0fe7ee035dd7b2290715baf29cb27167dddd2ff70ea7d052c958dbd80d323c99", + "sha256:13398e676a14d6233f372c75f52d5ae74f98210172991f7a3142a736bd92b131", + "sha256:169db03df90da63286e0560ea0efa9b6f3b59844a9735514a1d47e6bb2c8c61b", + "sha256:1710f3901cd6440ca92494ba2eb6dc260f829fa8d9196b659fa10de825610ce0", + "sha256:1f9ba555a797dbdcd844b89523f29cdc90973d8bd2e836ea6b962cf567cadd93", + "sha256:2ab70e8c6c7d2ce953d2a58102eefa90c2d0a5ed7aa40c7e29a487bc5e613131", + "sha256:2c9850041b77a9147d6bbd6dbbf13eeec7009eb60b44e83f07fcb2910075bf9b", + "sha256:403c11563e50b915d0efdb622866d1d9e4506bce590ef7da57789bf71dd148b5", + "sha256:45c953e57028c31d473d6b648552d9cab1efe20a42ad139d78e11d8f42a36130", + "sha256:562da3dca7a17f9077593214a9781a94b8d76de4f158f8c895e62f09573945fe", + "sha256:6d66f41672eb4060cf87c037f760bdbc6847852ca9ef8e9c5a5da18f090abf87", + "sha256:7064ccf5ace75825bd7bf57859daaaf16ed28660c1c6b306b649a9eda4b54b1e", + "sha256:72d67c25a84579f4a432c065e8b4274e53b7cf1df8f792cf846abfe2c3090866", + "sha256:7bb18403f02b655a1bbe4e3a4696c2ae1d6ae8f5991f7cacb684b1ae27e6c9f7", + "sha256:91e9b001101fb4500a2aafe3e7c92928d85242d38bf5ac0aba0b7480da0a4cd6", + "sha256:a40202fd58e49129764f025bbaae77028e420f1d5b3c8e6f6fd3a6490d513868", + "sha256:c8745454cdd28bbbc90861b80a0111a195b0e3961b9fa2e672be89eb199fa5d8", + "sha256:cf5964d54edd405e68583114a7cba929468bcd7db5e676ae38ee954de1cfc104", + "sha256:d18957a90806d943d141cc5e4a0fefa1d77cf0d7a156878bf9a66eed52c9cc7d", + "sha256:dce4248edc427c9b79261f3e6e2b3ecbdd9b88c267012168b4a7b3fc6fd41d13", + "sha256:f2f55c4d2d5a207e74eefe4d828067bbb01300e06e2a7436142f915c5928de07", + "sha256:f394759a06df8b685a4ebfb1874fb67a9cbfd58c64fc5ed587a663c0e63ec376", + "sha256:f97f8b25cb2681d25e2338148159447e4d689aafdccfcf19e61ff7db3905768a" + ], + "markers": "python_version >= '3.8'", + "version": "==0.3.2" + }, + "packaging": { + "hashes": [ + "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", + "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + ], + "markers": "python_version >= '3.8'", + "version": "==25.0" + }, + "pluggy": { + "hashes": [ + "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", + "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746" + ], + "markers": "python_version >= '3.9'", + "version": "==1.6.0" + }, + "pygments": { + "hashes": [ + "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", + "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b" + ], + "markers": "python_version >= '3.8'", + "version": "==2.19.2" + }, + "pyproject-hooks": { + "hashes": [ + "sha256:1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8", + "sha256:9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913" + ], + "markers": "python_version >= '3.7'", + "version": "==1.2.0" + }, + "pytest": { + "hashes": [ + "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", + "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79" + ], + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==8.4.2" + }, + "readme-renderer": { + "hashes": [ + "sha256:2fbca89b81a08526aadf1357a8c2ae889ec05fb03f5da67f9769c9a592166151", + "sha256:8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1" + ], + "markers": "python_version >= '3.9'", + "version": "==44.0" + }, + "requests": { + "hashes": [ + "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", + "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf" + ], + "markers": "python_version >= '3.9'", + "version": "==2.32.5" + }, + "requests-toolbelt": { + "hashes": [ + "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6", + "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.0.0" + }, + "rfc3986": { + "hashes": [ + "sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd", + "sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" + ], + "markers": "python_version >= '3.7'", + "version": "==2.0.0" + }, + "rich": { + "hashes": [ + "sha256:73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4", + "sha256:76bc51fe2e57d2b1be1f96c524b890b816e334ab4c1e45888799bfaab0021edd" + ], + "markers": "python_full_version >= '3.8.0'", + "version": "==14.2.0" + }, + "twine": { + "hashes": [ + "sha256:418ebf08ccda9a8caaebe414433b0ba5e25eb5e4a927667122fbe8f829f985d8", + "sha256:e5ed0d2fd70c9959770dce51c8f39c8945c574e18173a7b81802dab51b4b75cf" + ], + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==6.2.0" + }, + "urllib3": { + "hashes": [ + "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760", + "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc" + ], + "markers": "python_version >= '3.9'", + "version": "==2.5.0" + } + }, + "develop": {} +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..603a60b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,25 @@ +[build-system] +requires = ["setuptools>=68", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "emojiguessr" +version = "0.0.1" +description = "A tiny emoji guessing game" +readme = "README.md" +requires-python = ">=3.9" +authors = [ + { name = "Team Saffron"} +] +license = { text = "MIT" } +dependencies = [] + +[project.urls] +Homepage = "https://github.com/swe-students-fall2025/3-python-package-team_saffron" +Issues = "https://github.com/swe-students-fall2025/3-python-package-team_saffron/issues" + +[project.scripts] +emojiguessr = "emojiguessr.__main__:main" + +[tool.setuptools.packages.find] +where = ["src"] From f798685f33a8a01f2dfdacb3b51a50b52de6617b Mon Sep 17 00:00:00 2001 From: jsl1114 Date: Tue, 4 Nov 2025 20:44:23 -0500 Subject: [PATCH 08/28] Init and add local build run instruction --- README.md | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2db7080..3efe719 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,32 @@ -# ๐Ÿ˜† EmojiGuessr [CI status link goes here]() +# EmojiGuessr -EmojiGuessr is a Python package that turns emoji strings into quick guessing games. Pick a theme (food, animals, movies, even dev jokes), get an emoji clue and guess the name! + +[![](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/event-logger.yml/badge.svg)](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/event-logger.yml) Link to PyPI: []() +EmojiGuessr is a Python package that turns emoji strings into quick guessing games. Pick a theme, get an emoji clue and guess the name! + ## Team Members -[Jason Liu](https://github.com/jsl1114) -member2 -member3 -member4 -member5 +[Jason Liu](https://github.com/jsl1114) + +member2 + +member3 + +member4 + +member5 ## Installation -## Usage (with code examples) +## Usage (code examples) + +## Develop and Contribute -## Contributions +### Local build & run (using `pipenv`) +1. Get [`pipenv`](https://pipenv.pypa.io/en/latest/installation.html) installed +2. `cd` into the project directory +3. `pipenv install` +4. install the package in editable mode using `pipenv install -e .` +5. run the command line interface by using `pipenv run emojiguessr` followed by flags and configurations \ No newline at end of file From f02fea5ec5fa2b7569f210cb8dcebc00117426fa Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 20:58:51 -0500 Subject: [PATCH 09/28] Update team member information in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3efe719..65a66ad 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ EmojiGuessr is a Python package that turns emoji strings into quick guessing gam ## Team Members [Jason Liu](https://github.com/jsl1114) -member2 +[David Shen](https://github.com/snazzybeatle115) member3 @@ -29,4 +29,4 @@ member5 2. `cd` into the project directory 3. `pipenv install` 4. install the package in editable mode using `pipenv install -e .` -5. run the command line interface by using `pipenv run emojiguessr` followed by flags and configurations \ No newline at end of file +5. run the command line interface by using `pipenv run emojiguessr` followed by flags and configurations From 8fafd239448c53bc31f9b45038cec4df4153b62e Mon Sep 17 00:00:00 2001 From: myapyke123 Date: Tue, 4 Nov 2025 20:47:46 -0500 Subject: [PATCH 10/28] chore(data): add CSVs and wire up loaders --- quizproject/data/easy.csv | 501 ++++++++++++++++++++++++++++++++ quizproject/data/flashcards.csv | 501 ++++++++++++++++++++++++++++++++ quizproject/data/hard.csv | 501 ++++++++++++++++++++++++++++++++ quizproject/data/medium.csv | 501 ++++++++++++++++++++++++++++++++ 4 files changed, 2004 insertions(+) create mode 100644 quizproject/data/easy.csv create mode 100644 quizproject/data/flashcards.csv create mode 100644 quizproject/data/hard.csv create mode 100644 quizproject/data/medium.csv diff --git a/quizproject/data/easy.csv b/quizproject/data/easy.csv new file mode 100644 index 0000000..ae48080 --- /dev/null +++ b/quizproject/data/easy.csv @@ -0,0 +1,501 @@ +Question ID,Question,Answer +1,The expression `-37 + -39 == 1443` evaluates to True,FALSE +2,The expression `'python'[::-1] == 'nohtyp'` evaluates to True,TRUE +3,The expression `-2 + -15 == 30` evaluates to True,FALSE +4,The standard library module statistics exists,TRUE +5,The expression `[x*x for x in range(4)][-1] == 9` evaluates to True,TRUE +6,The expression `-21 + 48 == -1008` evaluates to True,FALSE +7,The expression `[x*x for x in range(26)][-1] == 625` evaluates to True,TRUE +8,staticmethod receives no implicit first argument,TRUE +9,filter returns a list in Python 3,FALSE +10,The expression `19 + -39 == -741` evaluates to True,FALSE +11,Exceptions in Python must inherit from BaseException,TRUE +12,The expression `-45 * 43 == -1935` evaluates to True,TRUE +13,The expression `-10 + 1 == -10` evaluates to True,FALSE +14,hash of a tuple of only hashable items works,TRUE +15,The expression `-23 * 22 == -506` evaluates to True,TRUE +16,"isinstance(True, int) is True",TRUE +17,"The expression `min([3,1,2]) == 1` evaluates to True",TRUE +18,"The expression `{1,2,3} - {2} == {1,3}` evaluates to True",TRUE +19,asyncio.run creates and runs an event loop,TRUE +20,"The expression {'a':1}.get('b', 99) returns 99",TRUE +21,The expression `-21 * -38 == 798` evaluates to True,TRUE +22,The expression `sum(x for x in range(8)) == 64` evaluates to True,FALSE +23,NaN is not equal to itself by definition,TRUE +24,os.environ is a mapping of environment variables,TRUE +25,match case is a structural pattern matching syntax introduced in Python 3.10,TRUE +26,map returns an iterator in Python 3,TRUE +27,Accessing a missing key with dict indexing raises KeyError,TRUE +28,"The expression any(x%3==0 for x in [1,2,3,4]) is True",TRUE +29,"List comprehension [x for x in range(3)] creates a list [0,1,2]",TRUE +30,The expression `-3 * -5 == 15` evaluates to True,TRUE +31,Pathlib Path objects support division operator for joining paths,TRUE +32,The expression len(range(5)) equals 5,TRUE +33,format specifiers like f'{3.14159:.2f}' are valid,TRUE +34,The expression `-2 + -38 == 76` evaluates to True,FALSE +35,The expression `sum(x for x in range(26)) == 676` evaluates to True,FALSE +36,time.sleep blocks the current thread,TRUE +37,The slice 'pythonista'[0:3] equals 'pyt',TRUE +38,The key parameter for sorted accepts a function,TRUE +39,The expression `[x*x for x in range(12)][-1] == 121` evaluates to True,TRUE +40,set is unordered so its iteration order is not guaranteed,TRUE +41,A generator expression uses parentheses like (x*x for x in range(3)),TRUE +42,"The expression any([False, False, True]) is True",TRUE +43,The expression `18 + 43 == 774` evaluates to True,FALSE +44,The expression `sum(range(20)) == 190` evaluates to True,TRUE +45,The expression `sum(range(35)) == 595` evaluates to True,TRUE +46,The expression `sum(x for x in range(9)) == 81` evaluates to True,FALSE +47,The expression `sum(x for x in range(28)) == 784` evaluates to True,FALSE +48,"The expression `dict(a=1,b=2)['a'] == (1999)` evaluates to True",FALSE +49,The expression `[x*x for x in range(23)][-1] == 484` evaluates to True,TRUE +50,The expression `sum(range(10)) == 45` evaluates to True,TRUE +51,The expression `[x*x for x in range(29)][-1] == 784` evaluates to True,TRUE +52,csv module can both read and write CSV files,TRUE +53,A class __init__ method may return a non None value,FALSE +54,dataclasses can generate __init__ and __repr__ automatically,TRUE +55,The expression `[x*x for x in range(5)][-1] == 16` evaluates to True,TRUE +56,GIL means Global Interpreter Lock,TRUE +57,Ellipsis ... is a valid singleton object in Python,TRUE +58,The expression `-15 + -50 == 750` evaluates to True,FALSE +59,The expression `-13 * -40 == 520` evaluates to True,TRUE +60,The expression 'PY' in 'python' is True,FALSE +61,argparse helps parse command line arguments,TRUE +62,The expression `38 + 21 == 798` evaluates to True,FALSE +63,The operator is checks identity not equality,TRUE +64,The expression `41 + 33 == 1353` evaluates to True,FALSE +65,"The expression `sorted({'b':2,'a':1}) == ['a','b']` evaluates to True",TRUE +66,The expression '10' < '2' is True for string comparison,TRUE +67,PEP stands for Python Enhancement Proposal,TRUE +68,The expression `-2 * -38 == 76` evaluates to True,TRUE +69,classmethod receives the class as its first argument,TRUE +70,The expression `8 + 31 == 248` evaluates to True,FALSE +71,The expression `(i for i in range(3)).__iter__() is not None` evaluates to True,TRUE +72,The expression -3 % 2 equals 1,TRUE +73,The expression `-19 + -30 == 570` evaluates to True,FALSE +74,The module typing provides Protocol and TypedDict,TRUE +75,The expression `sum(x for x in range(20)) == 400` evaluates to True,FALSE +76,The expression `sum(x for x in range(12)) == 144` evaluates to True,FALSE +77,The expression `[x*x for x in range(16)][-1] == 225` evaluates to True,TRUE +78,"The expression `{1: 'a', 2: 'b'}.get(3) is None` evaluates to True",TRUE +79,The expression `sum(range(40)) == 780` evaluates to True,TRUE +80,The expression 'รค'.encode('ascii') succeeds,FALSE +81,The slice object can be used to slice sequences programmatically,TRUE +82,Python uses indentation to define blocks,TRUE +83,The expression `[x*x for x in range(31)][-1] == 900` evaluates to True,TRUE +84,The expression `8 * 31 == 248` evaluates to True,TRUE +85,__str__ is intended for a user friendly representation,TRUE +86,The expression `sum(x for x in range(25)) == 625` evaluates to True,FALSE +87,The expression `44 * -37 == -1628` evaluates to True,TRUE +88,The expression `-21 + -38 == 798` evaluates to True,FALSE +89,"The expression [1,2] * 2 equals [1,2,1,2]",TRUE +90,str.encode converts str to bytes,TRUE +91,The expression `[x*x for x in range(9)][-1] == 64` evaluates to True,TRUE +92,The expression `-22 * 37 == -814` evaluates to True,TRUE +93,functools.partial can freeze some function arguments,TRUE +94,The expression `9 * -2 == -18` evaluates to True,TRUE +95,The expression sys.getrecursionlimit returns the current recursion depth limit,TRUE +96,The expression {'a':1} | {'b':2} merges dictionaries in Python 3.9 plus,TRUE +97,The expression 0.1 + 0.2 == 0.3 evaluates to True,FALSE +98,The module functools provides lru_cache,TRUE +99,dict.get returns None by default when a key is missing,TRUE +100,range produces values lazily rather than storing all values,TRUE +101,deque supports fast appends and pops from both ends,TRUE +102,The expression -3 // 2 equals -2,TRUE +103,The expression 'python'.title() equals 'Python',TRUE +104,The expression `27 + -17 == -459` evaluates to True,FALSE +105,The walrus operator can be used inside list comprehensions,TRUE +106,"The expression max([], default=0) returns 0",TRUE +107,The operator in on a string checks for substring presence,TRUE +108,The expression `-41 * 27 == -1107` evaluates to True,TRUE +109,The expression `37 + 32 == 1184` evaluates to True,FALSE +110,"The expression `tuple(x for x in range(3)) == ((0,1,2)999)` evaluates to True",FALSE +111,datetime.datetime is timezone naive by default,TRUE +112,open supports text and binary modes via 't' and 'b' flags,TRUE +113,The expression None == 0 is True,FALSE +114,async def defines a coroutine function,TRUE +115,"The expression `not ({1: 'a', 2: 'b'}.get(3) is None)` evaluates to True",FALSE +116,The expression 'abc'.index('d') returns -1,FALSE +117,The expression `[x*x for x in range(7)][-1] == 36` evaluates to True,TRUE +118,The expression `[x*x for x in range(15)][-1] == 196` evaluates to True,TRUE +119,The expression `-46 * -47 == 2162` evaluates to True,TRUE +120,The expression `7 + 25 == 175` evaluates to True,FALSE +121,Python supports underscores in numeric literals like 1_000_000,TRUE +122,The expression `[x*x for x in range(28)][-1] == 729` evaluates to True,TRUE +123,"The expression `len(list(zip_longest := __import__('itertools').zip_longest([],[]))) == (0999)` evaluates to True",FALSE +124,The slice 'data science'[-3:] equals 'nce',TRUE +125,The expression `-22 + 37 == -814` evaluates to True,FALSE +126,pip is the default Python package installer,TRUE +127,Accessing a list at an out of range index raises IndexError,TRUE +128,The expression `-40 * 20 == -800` evaluates to True,TRUE +129,The keyword nonlocal affects names in the nearest enclosing function scope,TRUE +130,The expression `[x*x for x in range(14)][-1] == 169` evaluates to True,TRUE +131,The expression `21 * -25 == -525` evaluates to True,TRUE +132,fractions.Fraction can represent rational numbers exactly,TRUE +133,The expression `-24 * 35 == -840` evaluates to True,TRUE +134,random.seed makes random results reproducible,TRUE +135,The expression `-22 + -33 == 726` evaluates to True,FALSE +136,The built in function chr returns a character from a code point,TRUE +137,The expression `-21 + -46 == 966` evaluates to True,FALSE +138,The expression `sum(x for x in range(22)) == 484` evaluates to True,FALSE +139,setdefault on dict inserts a default if the key is missing,TRUE +140,The expression `18 * 43 == 774` evaluates to True,TRUE +141,The expression bool([]) is True,FALSE +142,The expression 'A' < 'a' is True in ASCII,TRUE +143,The expression [][0:5] returns [],TRUE +144,The expression `[x*x for x in range(13)][-1] == 144` evaluates to True,TRUE +145,Set comprehension uses curly braces like {x for x in range(3)},TRUE +146,math.inf is a float representing infinity,TRUE +147,The expression list({1: 'a'}) equals [1],TRUE +148,The expression `'abc'.upper() == 'ABC'` evaluates to True,TRUE +149,bool of an empty dict is False,TRUE +150,The slice 'pythonista'[-3:] equals 'sta',TRUE +151,"The expression tuple([1,2]) equals (1,2)",TRUE +152,The slice 'abcdef'[-3:] equals 'def',TRUE +153,The expression `-16 + 31 == -496` evaluates to True,FALSE +154,The expression `-16 * 39 == -624` evaluates to True,TRUE +155,super works only with single inheritance,FALSE +156,The expression `31 * -29 == -899` evaluates to True,TRUE +157,The expression `39 + 4 == 156` evaluates to True,FALSE +158,The expression `-7 + -15 == 105` evaluates to True,FALSE +159,copy.deepcopy performs a deep copy,TRUE +160,The expression 'Hello'.lower() == 'hello',TRUE +161,The slice 'data science'[0:3] equals 'dat',TRUE +162,Tabs and spaces can be mixed safely in Python 3,FALSE +163,The expression `-21 * -46 == 966` evaluates to True,TRUE +164,The expression `-4 + -30 == 120` evaluates to True,FALSE +165,"The expression `sorted({3,1,2}) == [1,2,3]` evaluates to True",TRUE +166,__repr__ is intended to be an unambiguous representation of an object,TRUE +167,"The expression len({'a':1, 'b':2}) equals 2",TRUE +168,The walrus operator is written as :=,TRUE +169,The expression `-19 * -30 == 570` evaluates to True,TRUE +170,pickle loads untrusted data safely,FALSE +171,The expression `25 + 4 == 100` evaluates to True,FALSE +172,The expression `sum(range(55)) == 1485` evaluates to True,TRUE +173,pathlib.Path objects represent filesystem paths,TRUE +174,"The expression `not (all(x<5 for x in [0,1,2,3,4]))` evaluates to True",FALSE +175,super can call methods from a base class,TRUE +176,You can use expression inside f strings like f'{2+3}',TRUE +177,"The expression `any(x%2==0 for x in [1,3,5,6])` evaluates to True",TRUE +178,The expression `[x*x for x in range(21)][-1] == 400` evaluates to True,TRUE +179,The expression `-24 + 35 == -840` evaluates to True,FALSE +180,The expression '5' + 5 produces 10,FALSE +181,The expression `sum(x for x in range(17)) == 289` evaluates to True,FALSE +182,The expression `sum(x for x in range(23)) == 529` evaluates to True,FALSE +183,Multiple inheritance is supported in Python,TRUE +184,The in operator on a dictionary tests keys by default,TRUE +185,The expression 'abc' * 3 equals 'abcabcabc',TRUE +186,The expression `40 * -42 == -1680` evaluates to True,TRUE +187,bytes are sequences of integers 0 to 255,TRUE +188,threading.Thread targets run in the same process,TRUE +189,hash randomization can make dict order vary between processes when not insertion ordered,FALSE +190,f strings are prefixed with f,TRUE +191,bisect can locate insertion points in sorted lists,TRUE +192,The expression `'python'[1:4] == ('yth'999)` evaluates to True,FALSE +193,hash of a list works,FALSE +194,The expression `sum(x for x in range(16)) == 256` evaluates to True,FALSE +195,"The expression any([False, False]) equals False",TRUE +196,threading.Lock can be used as a context manager,TRUE +197,The expression `'mississippi'.count('ss') == 2` evaluates to True,TRUE +198,The with statement ensures proper resource cleanup for context managers,TRUE +199,"The expression ''.join(['a','b']) equals 'ab'",TRUE +200,The expression `sum(x for x in range(19)) == 361` evaluates to True,FALSE +201,Method resolution order is determined by C3 linearization,TRUE +202,The expression `-47 * 44 == -2068` evaluates to True,TRUE +203,"The expression `list(map(lambda x: x+1, [1,2])) == ([2,3]999)` evaluates to True",FALSE +204,"The expression `{1,2,3}.issuperset({1,2})` evaluates to True",TRUE +205,The expression `-9 * 48 == -432` evaluates to True,TRUE +206,"The expression [1,2,3] == [3,2,1] is True",FALSE +207,The expression `sum(x for x in range(3)) == 9` evaluates to True,FALSE +208,The expression `40 + -42 == -1680` evaluates to True,FALSE +209,json.dumps converts Python objects to JSON strings,TRUE +210,tempfile.TemporaryDirectory cleans up on exit from its context,TRUE +211,"The expression `max([3,1,2]) == 3` evaluates to True",TRUE +212,The expression `sum(range(50)) == 1225` evaluates to True,TRUE +213,A dataclass with frozen True is immutable,TRUE +214,"The expression `{1,2,3} - {2} == ({1,3}999)` evaluates to True",FALSE +215,The GIL allows only one thread to execute Python bytecode at a time,TRUE +216,"The expression [1,2,3].append(4) modifies the list in place",TRUE +217,You can annotate variables with types without enforcing them at runtime,TRUE +218,subprocess.run can execute external programs,TRUE +219,int supports arbitrary precision without overflow in normal use,TRUE +220,The expression `-15 * -50 == 750` evaluates to True,TRUE +221,The expression `-16 + 39 == -624` evaluates to True,FALSE +222,ZeroDivisionError is raised for division by zero,TRUE +223,The expression int(True) equals 1,TRUE +224,The expression {x for x in 'aaab'} has length 2,TRUE +225,A list can be used as a dictionary key,FALSE +226,The expression `sum(i*i for i in range(4)) == 14` evaluates to True,TRUE +227,bool of an empty set is False,TRUE +228,"The expression `len(list(zip_longest := __import__('itertools').zip_longest([],[]))) == 0` evaluates to True",TRUE +229,The expression `47 + -30 == -1410` evaluates to True,FALSE +230,A lambda can contain statements,FALSE +231,The expression `9 + -2 == -18` evaluates to True,FALSE +232,if __name__ == '__main__' guards top level script execution,TRUE +233,"The expression `list(filter(None, [0,1,2])) == [1,2]` evaluates to True",TRUE +234,"The expression `max([3,1,2]) == (3999)` evaluates to True",FALSE +235,Virtual environments help isolate dependencies,TRUE +236,The expression `27 * -17 == -459` evaluates to True,TRUE +237,The expression `29 + -4 == -116` evaluates to True,FALSE +238,A Python set cannot contain duplicate elements,TRUE +239,A tuple can be used as a dictionary key if it contains only hashable items,TRUE +240,The expression `-47 + 44 == -2068` evaluates to True,FALSE +241,typing.List is mainly for type hints not for runtime subclass checks,TRUE +242,"The expression `list(map(lambda x: x+1, [1,2])) == [2,3]` evaluates to True",TRUE +243,The expression `'abc'.capitalize() == ('Abc'999)` evaluates to True,FALSE +244,The expression `39 + 19 == 741` evaluates to True,FALSE +245,"The expression [1,2,3].append(4) returns [1,2,3,4]",FALSE +246,The expression `-3 + -5 == 15` evaluates to True,FALSE +247,The expression `'mississippi'.count('ss') == (2999)` evaluates to True,FALSE +248,The expression 2**3 equals 8,TRUE +249,The expression `31 + -29 == -899` evaluates to True,FALSE +250,The expression `-46 + -47 == 2162` evaluates to True,FALSE +251,"The expression `{1,2}.issuperset({1,2,3})` evaluates to True",FALSE +252,The expression `-23 + 22 == -506` evaluates to True,FALSE +253,match case can destructure sequences and mappings,TRUE +254,open with mode 'xb' creates a file and fails if it exists,TRUE +255,The expression sum([]) equals 0,TRUE +256,zip stops at the shortest input,TRUE +257,The expression `[x*x for x in range(30)][-1] == 841` evaluates to True,TRUE +258,bytes.decode converts bytes to str,TRUE +259,"The expression `sorted({'b':2,'a':1}) == (['a','b']999)` evaluates to True",FALSE +260,"The expression len(set([1,1,2])) equals 2",TRUE +261,The expression `-31 + -23 == 713` evaluates to True,FALSE +262,The expression `sum(x for x in range(30)) == 900` evaluates to True,FALSE +263,format can specify alignment and width,TRUE +264,The expression 'Python'.swapcase() equals 'pYTHON',TRUE +265,The expression `39 * 19 == 741` evaluates to True,TRUE +266,The expression `-45 + 34 == -1530` evaluates to True,FALSE +267,The expression float('nan') == float('nan') is True,FALSE +268,The expression 'abc'.find('d') returns -1,TRUE +269,The expression `[x*x for x in range(17)][-1] == 256` evaluates to True,TRUE +270,multiprocessing.Process targets run in a separate process,TRUE +271,The expression `49 + -43 == -2107` evaluates to True,FALSE +272,The expression `sum(i*i for i in range(4)) == (14999)` evaluates to True,FALSE +273,"The expression `''.join(sorted(set('aba'))) in ('ab','ba')` evaluates to True",TRUE +274,Using dict.get on a missing key raises KeyError by default,FALSE +275,"The expression `sum(1 for _ in zip([1,2,3],[4,5])) == (2999)` evaluates to True",FALSE +276,asyncio.gather can run coroutines concurrently,TRUE +277,The expression `3 + -22 == -66` evaluates to True,FALSE +278,The expression `not ((i for i in range(3)).__iter__() is not None)` evaluates to True,FALSE +279,The expression `-2 * -15 == 30` evaluates to True,TRUE +280,defaultdict can supply default values for missing keys,TRUE +281,raise can be used without specifying an exception inside an except block to re raise,TRUE +282,"with open('x.txt','w') as f ensures f is closed on exit",TRUE +283,The method extend adds elements from an iterable to a list,TRUE +284,"The expression `sorted({3,1,2}) == ([1,2,3]999)` evaluates to True",FALSE +285,The expression `sum(range(30)) == 435` evaluates to True,TRUE +286,await can be used at top level in a normal module without an event loop,FALSE +287,pip installs go into the standard library,FALSE +288,The expression `49 * -43 == -2107` evaluates to True,TRUE +289,The expression `-13 * 30 == -390` evaluates to True,TRUE +290,decimal.Decimal can represent decimal fractions exactly,TRUE +291,The expression `-9 + 48 == -432` evaluates to True,FALSE +292,finally blocks run even if a return executes in try or except,TRUE +293,The expression `[x*x for x in range(27)][-1] == 676` evaluates to True,TRUE +294,The expression `-45 + 43 == -1935` evaluates to True,FALSE +295,help shows documentation in an interactive pager,TRUE +296,The expression `-21 + 14 == -294` evaluates to True,FALSE +297,"The expression `sum(1 for _ in zip([1,2,3],[4,5])) == 2` evaluates to True",TRUE +298,The expression `8 * 18 == 144` evaluates to True,TRUE +299,The expression `36 + 44 == 1584` evaluates to True,FALSE +300,The expression min([]) raises ValueError,TRUE +301,The expression `27 + -47 == -1269` evaluates to True,FALSE +302,Two identical small integers may be identical objects due to interning,TRUE +303,The expression bool([0]) is True,TRUE +304,The expression `-39 * -23 == 897` evaluates to True,TRUE +305,"The expression {1,2,3} == {3,2,1} is True",TRUE +306,The expression `31 + -36 == -1116` evaluates to True,FALSE +307,The expression `29 * -4 == -116` evaluates to True,TRUE +308,"The expression `all(x<5 for x in [0,1,2,3,4])` evaluates to True",TRUE +309,Strings in Python are immutable,TRUE +310,Reading a closed file succeeds,FALSE +311,"The expression `tuple(x for x in range(3)) == (0,1,2)` evaluates to True",TRUE +312,The expression `27 * -47 == -1269` evaluates to True,TRUE +313,In Python bool is a subclass of int,TRUE +314,The expression `-16 * -42 == 672` evaluates to True,TRUE +315,The expression `sum(x for x in range(24)) == 576` evaluates to True,FALSE +316,"The expression `{1,2}.issubset({1,2,3})` evaluates to True",TRUE +317,The expression `[x*x for x in range(3)][-1] == 4` evaluates to True,TRUE +318,The expression `36 * 44 == 1584` evaluates to True,TRUE +319,math.isclose compares floats within a tolerance,TRUE +320,A function without a return statement returns None,TRUE +321,The default argument values are evaluated at function definition time,TRUE +322,The expression `-7 * -15 == 105` evaluates to True,TRUE +323,The expression print returns None,TRUE +324,The expression 5/2 returns an int,FALSE +325,The keyword global allows assignment to a module level name inside a function,TRUE +326,Chained comparisons like 1 < 2 < 3 are valid syntax,TRUE +327,The expression `[x*x for x in range(8)][-1] == 49` evaluates to True,TRUE +328,contextlib.contextmanager can turn a generator into a context manager,TRUE +329,The expression `sum(x for x in range(21)) == 441` evaluates to True,FALSE +330,typing.Final indicates a name should not be reassigned,TRUE +331,"The expression `'abc'.replace('b','x') == 'axc'` evaluates to True",TRUE +332,The built in function id returns the memory identity of an object,TRUE +333,PEP 8 is the official Python style guide,TRUE +334,"round(2.675, 2) equals 2.67 in binary floating point",TRUE +335,itertools.product produces cartesian products,TRUE +336,The expression `[x*x for x in range(6)][-1] == 25` evaluates to True,TRUE +337,lstrip removes from the left only,TRUE +338,"The expression `round(2.5) in (2,3)` evaluates to True",TRUE +339,The membership test 'z' in 'pythonista' is True,FALSE +340,The membership test 'z' in 'abcdef' is True,FALSE +341,The built in function ord returns the code point of a character,TRUE +342,The expression `8 + 18 == 144` evaluates to True,FALSE +343,copy.copy performs a shallow copy,TRUE +344,The expression `-21 * 48 == -1008` evaluates to True,TRUE +345,The expression `-39 + -23 == 897` evaluates to True,FALSE +346,json.loads converts JSON strings to Python objects,TRUE +347,The expression ''.strip() on an empty string returns '',TRUE +348,"The expression `{1,2} | {2,3} == ({1,2,3}999)` evaluates to True",FALSE +349,The expression `7 * 25 == 175` evaluates to True,TRUE +350,shutil.rmtree can remove a directory tree,TRUE +351,Negative slicing like 'abcd'[::-1] reverses the string,TRUE +352,Exponent operator in Python is ^,FALSE +353,The expression `47 * -30 == -1410` evaluates to True,TRUE +354,Integer division in Python uses // not /,TRUE +355,The expression `31 * -36 == -1116` evaluates to True,TRUE +356,Left shift operator is <<,TRUE +357,Dictionaries preserve insertion order in Python 3.7 and later,TRUE +358,The expression `[x*x for x in range(18)][-1] == 289` evaluates to True,TRUE +359,The expression `39 * 4 == 156` evaluates to True,TRUE +360,The expression 'py' in 'python' is True,TRUE +361,The expression `sum(x for x in range(6)) == 36` evaluates to True,FALSE +362,"The expression all(x<10 for x in [1,9,10]) is True",FALSE +363,In Python everything is an object including functions,TRUE +364,The operator module exposes function versions of operators like add,TRUE +365,The expression `[x*x for x in range(10)][-1] == 81` evaluates to True,TRUE +366,The expression datetime.date.today() returns a date,TRUE +367,The expression `[x*x for x in range(24)][-1] == 529` evaluates to True,TRUE +368,Dict comprehension can map keys to values like {x: x*x for x in range(3)},TRUE +369,"The expression `{1,2} | {2,3} == {1,2,3}` evaluates to True",TRUE +370,"The expression `{1,2} & {2,3} == ({2}999)` evaluates to True",FALSE +371,"The expression `list(range(0,6,2)) == [0,2,4]` evaluates to True",TRUE +372,The expression `-41 + 27 == -1107` evaluates to True,FALSE +373,The expression `44 + -37 == -1628` evaluates to True,FALSE +374,The expression `-21 * 14 == -294` evaluates to True,TRUE +375,The expression `[x*x for x in range(19)][-1] == 324` evaluates to True,TRUE +376,await works only inside async functions,TRUE +377,The expression `-31 * -23 == 713` evaluates to True,TRUE +378,The module collections provides namedtuple and Counter,TRUE +379,The expression `3 * -22 == -66` evaluates to True,TRUE +380,The expression `-5 * -6 == 30` evaluates to True,TRUE +381,The expression `37 * 32 == 1184` evaluates to True,TRUE +382,The expression `sum(x for x in range(29)) == 841` evaluates to True,FALSE +383,The expression `[x*x for x in range(20)][-1] == 361` evaluates to True,TRUE +384,@property can make a method accessible like an attribute,TRUE +385,The expression `sum(x for x in range(27)) == 729` evaluates to True,FALSE +386,The expression `[x*x for x in range(25)][-1] == 576` evaluates to True,TRUE +387,The reverse parameter for sorted reverses the sort order,TRUE +388,The expression `sum(range(15)) == 105` evaluates to True,TRUE +389,"The expression `sorted(['b','a','C'], key=str.lower) == ['a','b','C']` evaluates to True",TRUE +390,The expression `25 * 4 == 100` evaluates to True,TRUE +391,"The expression bytes('abc', 'utf8') equals b'abc'",TRUE +392,"The expression list((1,2)) equals [1,2]",TRUE +393,"The expression `min([3,1,2]) == (1999)` evaluates to True",FALSE +394,The expression `23 * -26 == -598` evaluates to True,TRUE +395,Bitwise XOR operator is ^,TRUE +396,"The expression `len({1,1,2}) == (2999)` evaluates to True",FALSE +397,The expression `-5 + -6 == 30` evaluates to True,FALSE +398,Slicing beyond bounds does not raise an IndexError,TRUE +399,"The expression 'a,b'.split(',') equals ['a','b']",TRUE +400,The slice 'abcdef'[0:3] equals 'abc',TRUE +401,rstrip removes from the right only,TRUE +402,The expression (x := 3) assigns 3 to x and returns 3,TRUE +403,strip without args removes whitespace from both ends,TRUE +404,multiprocessing can use multiple CPU cores,TRUE +405,The expression `sum(x for x in range(18)) == 324` evaluates to True,FALSE +406,The expression `-10 * 1 == -10` evaluates to True,TRUE +407,The expression None is None is True,TRUE +408,The expression `'abc'.upper() == ('ABC'999)` evaluates to True,FALSE +409,Namedtuple instances are immutable,TRUE +410,Adding an existing element to a set changes its length,FALSE +411,Tuples in Python are immutable,TRUE +412,"The expression `sum([1,2,3]) == (6999)` evaluates to True",FALSE +413,The expression `-13 + -40 == 520` evaluates to True,FALSE +414,"The expression `''.join(sorted(set('aba'))) in ('zz',)` evaluates to True",FALSE +415,list.sort sorts the list in place and returns None,TRUE +416,The expression `38 * 21 == 798` evaluates to True,TRUE +417,"issubclass(List[int], list) is True at runtime",FALSE +418,The expression `sum(x for x in range(13)) == 169` evaluates to True,FALSE +419,The module itertools provides combinations and permutations,TRUE +420,Methods defined in a class are descriptors,TRUE +421,The expression `-16 * 31 == -496` evaluates to True,TRUE +422,The expression `-15 * -19 == 285` evaluates to True,TRUE +423,assert statements can be disabled with optimization flags,TRUE +424,f'{10:04d}' equals '0010',TRUE +425,The expression all([]) equals True,TRUE +426,"The expression `not (any(x%2==0 for x in [1,3,5,6]))` evaluates to True",FALSE +427,type(3) is int,TRUE +428,The expression `23 + -26 == -598` evaluates to True,FALSE +429,"The expression `list(range(0,6,2)) == ([0,2,4]999)` evaluates to True",FALSE +430,The expression `[x*x for x in range(22)][-1] == 441` evaluates to True,TRUE +431,The expression `47 + -7 == -329` evaluates to True,FALSE +432,The expression `sum(x for x in range(4)) == 16` evaluates to True,FALSE +433,Lists in Python are immutable,FALSE +434,"The expression `{1,2} & {2,3} == {2}` evaluates to True",TRUE +435,sorted returns a new list and does not modify the original,TRUE +436,The expression `'python'[1:4] == 'yth'` evaluates to True,TRUE +437,try except finally always runs finally,TRUE +438,Generators are created by functions that contain yield,TRUE +439,heapq implements a min heap,TRUE +440,The expression `-15 + -19 == 285` evaluates to True,FALSE +441,The expression `-45 * 34 == -1530` evaluates to True,TRUE +442,importing a module runs its top level code,TRUE +443,The expression `-40 + 20 == -800` evaluates to True,FALSE +444,"The expression `not (round(2.5) in (2,3))` evaluates to True",FALSE +445,The expression `41 * 33 == 1353` evaluates to True,TRUE +446,A generator computes and stores all values at once,FALSE +447,The expression `-37 * -39 == 1443` evaluates to True,TRUE +448,The expression `sum(x for x in range(11)) == 121` evaluates to True,FALSE +449,The keyword pass does nothing and is used as a placeholder,TRUE +450,The expression `sum(x for x in range(14)) == 196` evaluates to True,FALSE +451,The expression `sum(range(25)) == 300` evaluates to True,TRUE +452,You can assign a function to a variable and call it via the new name,TRUE +453,"The expression `list(filter(None, [0,1,2])) == ([1,2]999)` evaluates to True",FALSE +454,"The expression `sum([1,2,3]) == 6` evaluates to True",TRUE +455,The expression `sum(x for x in range(10)) == 100` evaluates to True,FALSE +456,The with statement can handle exceptions in the context manager,TRUE +457,frozenset is an immutable set,TRUE +458,The expression 5//2 returns 2,TRUE +459,Two sets with the same elements are equal regardless of order,TRUE +460,"The expression `len({1,1,2}) == 2` evaluates to True",TRUE +461,The expression `21 + -25 == -525` evaluates to True,FALSE +462,The expression `-4 * -30 == 120` evaluates to True,TRUE +463,list.sort returns the sorted list,FALSE +464,'{:.1f}'.format(3.14) equals '3.1',TRUE +465,"The expression [1,2,3] + [4] equals [1,2,3,4]",TRUE +466,Using a mutable default like [] can lead to shared state across calls,TRUE +467,The expression `-16 + -42 == 672` evaluates to True,FALSE +468,"The expression {'a':1} == {'a':1, 'b':2} is True",FALSE +469,The expression `-13 + 30 == -390` evaluates to True,FALSE +470,The expression [] is [] is True,FALSE +471,"The expression `'abc'.replace('b','x') == ('axc'999)` evaluates to True",FALSE +472,"The expression `{1,2,3}.issubset({1,2})` evaluates to True",FALSE +473,Opening a file without closing it may leak resources,TRUE +474,Counter can count hashable items from an iterable,TRUE +475,A context manager must define __enter__ and __exit__,TRUE +476,dir shows attributes of an object,TRUE +477,The membership test 'z' in 'data science' is True,FALSE +478,The expression `[x*x for x in range(11)][-1] == 100` evaluates to True,TRUE +479,The expression `'abc'.capitalize() == 'Abc'` evaluates to True,TRUE +480,"The expression all([True, True, False]) is True",FALSE +481,The expression `-35 + -2 == 70` evaluates to True,FALSE +482,enumerate yields index and value pairs,TRUE +483,"The expression `sorted(['b','a','C'], key=str.lower) == (['a','b','C']999)` evaluates to True",FALSE +484,The expression `sum(range(45)) == 990` evaluates to True,TRUE +485,The expression `-35 * -2 == 70` evaluates to True,TRUE +486,bytearray is mutable while bytes is immutable,TRUE +487,Reading a non existent file without handling exceptions raises FileNotFoundError,TRUE +488,re module provides regular expressions,TRUE +489,KeyError is raised when accessing a missing dict key with indexing,TRUE +490,"The expression `dict(a=1,b=2)['a'] == 1` evaluates to True",TRUE +491,The expression `-22 * -33 == 726` evaluates to True,TRUE +492,The expression `sum(x for x in range(15)) == 225` evaluates to True,FALSE +493,The expression `sum(x for x in range(7)) == 49` evaluates to True,FALSE +494,secrets module is preferred for cryptographic randomness,TRUE +495,The expression `'python'[::-1] == ('nohtyp'999)` evaluates to True,FALSE +496,The expression `19 * -39 == -741` evaluates to True,TRUE +497,The expression [ [0]*2 ]*2 creates two independent lists,FALSE +498,An async function can be called directly without awaiting and it runs to completion immediately,FALSE +499,The expression `47 * -7 == -329` evaluates to True,TRUE +500,The expression `sum(x for x in range(5)) == 25` evaluates to True,FALSE diff --git a/quizproject/data/flashcards.csv b/quizproject/data/flashcards.csv new file mode 100644 index 0000000..51461fc --- /dev/null +++ b/quizproject/data/flashcards.csv @@ -0,0 +1,501 @@ +Card ID,Flashcard +1,"In Python, everything is an object - even numbers and functions!" +2,"Indentation defines structure in Python - forget braces, spacing matters." +3,Variables don't need types declared - Python figures them out automatically. +4,Strings can use single or double quotes - consistency matters more than choice. +5,Use '#' to add a comment - it's ignored by Python but loved by humans. +6,"Python reads top to bottom, so order your logic carefully." +7,Use print() to display results - your first debugging tool. +8,Triple quotes let you write multi-line strings easily. +9,input() always gives you a string - even if you type a number. +10,Use type() to check what kind of object you're working with. +11,Lists are ordered and mutable - you can edit them anytime. +12,"Tuples are like lists, but locked - once made, they can't change." +13,Sets automatically remove duplicates - great for unique collections. +14,Dictionaries store data in key-value pairs - like labeled boxes. +15,len() tells you how many items are inside a container. +16,Lists can hold anything - even other lists or functions! +17,Negative indexes count from the end - -1 is the last item. +18,Slicing lets you grab parts of sequences - [start:end:step] is the syntax. +19,"Strings are immutable - you can replace them, not modify them." +20,Use sorted() to get a new sorted list - or sort() to change it in place. +21,Functions are created with def - short for define. +22,A function that doesn't return anything actually returns None. +23,Default arguments are evaluated once - not every call. +24,Use keyword arguments for clarity when calling functions. +25,Lambda functions are tiny throwaway functions - perfect for one-liners. +26,Functions are objects too - you can pass them around like data. +27,Use *args for variable arguments and **kwargs for named arguments. +28,Docstrings describe what your function does - use triple quotes right under def. +29,"Recursion is a function calling itself - cool, but watch your base case!" +30,return ends a function immediately and gives back a value. +31,for loops can go through any iterable - from lists to strings. +32,while loops run until their condition becomes False. +33,"break stops a loop cold, while continue skips to the next round." +34,Use pass as a placeholder - it literally does nothing but keeps your code valid. +35,"if, elif, else decide what runs based on truthiness." +36,Booleans in Python are capitalized - True and False. +37,"None is falsy - just like 0, '', and empty collections." +38,"Use 'in' to check membership - it works for lists, strings, and sets." +39,Chained comparisons like 1 < x < 10 make your code clean and readable. +40,Use ternary expressions like 'a if cond else b' to make compact decisions. +41,Classes group data and behavior - they're blueprints for objects. +42,__init__ sets up new objects - it's the constructor method. +43,self refers to the instance - it's how methods access data. +44,"Class variables belong to the class, not each instance." +45,Inheritance lets a class reuse code from another class. +46,super() calls methods from the parent class - super useful! +47,Private attributes are just a naming convention - nothing truly private here. +48,Polymorphism means different objects can share method names and still work. +49,Magic methods like __str__ and __add__ let you customize built-in behavior. +50,Everything in Python OOP is built on top of object - the ultimate base class. +51,List comprehensions are compact loops that build lists on the fly. +52,Dict comprehensions let you create mappings in one neat line. +53,Generators use yield to return items lazily - one by one. +54,Iterators remember where they left off - that's why you can only loop once. +55,Decorators wrap functions to extend behavior - like adding extra powers. +56,Closures remember variables even after their function has finished. +57,with automatically cleans up resources - think of it as polite programming. +58,try and except help your code recover from errors instead of crashing. +59,finally always runs - no matter what happens in try/except. +60,Modules are Python files you can reuse - import keeps code DRY. +61,Everything is passed by object reference - Python doesn't copy by default. +62,The GIL allows only one thread to run Python code at a time. +63,Multiprocessing lets you sidestep the GIL using multiple processes. +64,Asyncio helps run many tasks concurrently using async and await. +65,Await can only be used inside async functions - never in normal ones. +66,Descriptors control attribute access at a deep level - used in properties. +67,Type hints improve readability and help static checkers - Python won't enforce them. +68,"Metaclasses are classes of classes - yes, Python can go that deep." +69,F-strings are the modern way to format text - clean and efficient. +70,contextlib helps you build your own context managers with yield. +71,Lists are ordered and mutable - you can edit them anytime. +72,The GIL allows only one thread to run Python code at a time. +73,Default arguments are evaluated once - not every call. +74,"Metaclasses are classes of classes - yes, Python can go that deep." +75,"In Python, everything is an object - even numbers and functions!" +76,Polymorphism means different objects can share method names and still work. +77,Magic methods like __str__ and __add__ let you customize built-in behavior. +78,Default arguments are evaluated once - not every call. +79,return ends a function immediately and gives back a value. +80,input() always gives you a string - even if you type a number. +81,Magic methods like __str__ and __add__ let you customize built-in behavior. +82,Dict comprehensions let you create mappings in one neat line. +83,Sets automatically remove duplicates - great for unique collections. +84,"Python reads top to bottom, so order your logic carefully." +85,Lists can hold anything - even other lists or functions! +86,Docstrings describe what your function does - use triple quotes right under def. +87,Magic methods like __str__ and __add__ let you customize built-in behavior. +88,Sets automatically remove duplicates - great for unique collections. +89,Generators use yield to return items lazily - one by one. +90,Use print() to display results - your first debugging tool. +91,return ends a function immediately and gives back a value. +92,Strings can use single or double quotes - consistency matters more than choice. +93,Lists are ordered and mutable - you can edit them anytime. +94,Descriptors control attribute access at a deep level - used in properties. +95,input() always gives you a string - even if you type a number. +96,Lambda functions are tiny throwaway functions - perfect for one-liners. +97,Lambda functions are tiny throwaway functions - perfect for one-liners. +98,Strings can use single or double quotes - consistency matters more than choice. +99,return ends a function immediately and gives back a value. +100,return ends a function immediately and gives back a value. +101,Dict comprehensions let you create mappings in one neat line. +102,List comprehensions are compact loops that build lists on the fly. +103,finally always runs - no matter what happens in try/except. +104,super() calls methods from the parent class - super useful! +105,Type hints improve readability and help static checkers - Python won't enforce them. +106,Strings can use single or double quotes - consistency matters more than choice. +107,Magic methods like __str__ and __add__ let you customize built-in behavior. +108,len() tells you how many items are inside a container. +109,contextlib helps you build your own context managers with yield. +110,Functions are objects too - you can pass them around like data. +111,Use *args for variable arguments and **kwargs for named arguments. +112,Lists can hold anything - even other lists or functions! +113,while loops run until their condition becomes False. +114,Default arguments are evaluated once - not every call. +115,Use '#' to add a comment - it's ignored by Python but loved by humans. +116,len() tells you how many items are inside a container. +117,Dict comprehensions let you create mappings in one neat line. +118,Slicing lets you grab parts of sequences - [start:end:step] is the syntax. +119,Lists are ordered and mutable - you can edit them anytime. +120,Polymorphism means different objects can share method names and still work. +121,"Tuples are like lists, but locked - once made, they can't change." +122,Polymorphism means different objects can share method names and still work. +123,finally always runs - no matter what happens in try/except. +124,Strings can use single or double quotes - consistency matters more than choice. +125,Booleans in Python are capitalized - True and False. +126,with automatically cleans up resources - think of it as polite programming. +127,Type hints improve readability and help static checkers - Python won't enforce them. +128,"Tuples are like lists, but locked - once made, they can't change." +129,super() calls methods from the parent class - super useful! +130,Sets automatically remove duplicates - great for unique collections. +131,Use '#' to add a comment - it's ignored by Python but loved by humans. +132,Dict comprehensions let you create mappings in one neat line. +133,finally always runs - no matter what happens in try/except. +134,"Strings are immutable - you can replace them, not modify them." +135,Use *args for variable arguments and **kwargs for named arguments. +136,Triple quotes let you write multi-line strings easily. +137,Lists can hold anything - even other lists or functions! +138,Multiprocessing lets you sidestep the GIL using multiple processes. +139,Generators use yield to return items lazily - one by one. +140,finally always runs - no matter what happens in try/except. +141,finally always runs - no matter what happens in try/except. +142,Triple quotes let you write multi-line strings easily. +143,input() always gives you a string - even if you type a number. +144,__init__ sets up new objects - it's the constructor method. +145,The GIL allows only one thread to run Python code at a time. +146,Lists can hold anything - even other lists or functions! +147,Polymorphism means different objects can share method names and still work. +148,Lists are ordered and mutable - you can edit them anytime. +149,Use sorted() to get a new sorted list - or sort() to change it in place. +150,input() always gives you a string - even if you type a number. +151,"Use 'in' to check membership - it works for lists, strings, and sets." +152,Lists are ordered and mutable - you can edit them anytime. +153,finally always runs - no matter what happens in try/except. +154,Lists are ordered and mutable - you can edit them anytime. +155,The GIL allows only one thread to run Python code at a time. +156,"Use 'in' to check membership - it works for lists, strings, and sets." +157,"In Python, everything is an object - even numbers and functions!" +158,Use print() to display results - your first debugging tool. +159,finally always runs - no matter what happens in try/except. +160,"Use 'in' to check membership - it works for lists, strings, and sets." +161,Generators use yield to return items lazily - one by one. +162,Triple quotes let you write multi-line strings easily. +163,Polymorphism means different objects can share method names and still work. +164,Use ternary expressions like 'a if cond else b' to make compact decisions. +165,super() calls methods from the parent class - super useful! +166,return ends a function immediately and gives back a value. +167,Sets automatically remove duplicates - great for unique collections. +168,Dict comprehensions let you create mappings in one neat line. +169,Asyncio helps run many tasks concurrently using async and await. +170,return ends a function immediately and gives back a value. +171,"Use 'in' to check membership - it works for lists, strings, and sets." +172,Use print() to display results - your first debugging tool. +173,Sets automatically remove duplicates - great for unique collections. +174,Polymorphism means different objects can share method names and still work. +175,Type hints improve readability and help static checkers - Python won't enforce them. +176,input() always gives you a string - even if you type a number. +177,Generators use yield to return items lazily - one by one. +178,Generators use yield to return items lazily - one by one. +179,Generators use yield to return items lazily - one by one. +180,Decorators wrap functions to extend behavior - like adding extra powers. +181,"None is falsy - just like 0, '', and empty collections." +182,Triple quotes let you write multi-line strings easily. +183,Default arguments are evaluated once - not every call. +184,Polymorphism means different objects can share method names and still work. +185,Chained comparisons like 1 < x < 10 make your code clean and readable. +186,Type hints improve readability and help static checkers - Python won't enforce them. +187,Use '#' to add a comment - it's ignored by Python but loved by humans. +188,Variables don't need types declared - Python figures them out automatically. +189,Lambda functions are tiny throwaway functions - perfect for one-liners. +190,input() always gives you a string - even if you type a number. +191,Lists can hold anything - even other lists or functions! +192,List comprehensions are compact loops that build lists on the fly. +193,"None is falsy - just like 0, '', and empty collections." +194,Inheritance lets a class reuse code from another class. +195,Type hints improve readability and help static checkers - Python won't enforce them. +196,The GIL allows only one thread to run Python code at a time. +197,Variables don't need types declared - Python figures them out automatically. +198,Magic methods like __str__ and __add__ let you customize built-in behavior. +199,Type hints improve readability and help static checkers - Python won't enforce them. +200,Type hints improve readability and help static checkers - Python won't enforce them. +201,"if, elif, else decide what runs based on truthiness." +202,Use '#' to add a comment - it's ignored by Python but loved by humans. +203,Generators use yield to return items lazily - one by one. +204,Dict comprehensions let you create mappings in one neat line. +205,input() always gives you a string - even if you type a number. +206,Descriptors control attribute access at a deep level - used in properties. +207,Chained comparisons like 1 < x < 10 make your code clean and readable. +208,List comprehensions are compact loops that build lists on the fly. +209,finally always runs - no matter what happens in try/except. +210,The GIL allows only one thread to run Python code at a time. +211,"None is falsy - just like 0, '', and empty collections." +212,len() tells you how many items are inside a container. +213,Generators use yield to return items lazily - one by one. +214,Polymorphism means different objects can share method names and still work. +215,Use sorted() to get a new sorted list - or sort() to change it in place. +216,Use '#' to add a comment - it's ignored by Python but loved by humans. +217,Use ternary expressions like 'a if cond else b' to make compact decisions. +218,The GIL allows only one thread to run Python code at a time. +219,Use print() to display results - your first debugging tool. +220,len() tells you how many items are inside a container. +221,Magic methods like __str__ and __add__ let you customize built-in behavior. +222,input() always gives you a string - even if you type a number. +223,"None is falsy - just like 0, '', and empty collections." +224,Descriptors control attribute access at a deep level - used in properties. +225,Descriptors control attribute access at a deep level - used in properties. +226,Sets automatically remove duplicates - great for unique collections. +227,Dict comprehensions let you create mappings in one neat line. +228,"Use 'in' to check membership - it works for lists, strings, and sets." +229,input() always gives you a string - even if you type a number. +230,finally always runs - no matter what happens in try/except. +231,Variables don't need types declared - Python figures them out automatically. +232,Dict comprehensions let you create mappings in one neat line. +233,Inheritance lets a class reuse code from another class. +234,return ends a function immediately and gives back a value. +235,Type hints improve readability and help static checkers - Python won't enforce them. +236,Default arguments are evaluated once - not every call. +237,Dict comprehensions let you create mappings in one neat line. +238,finally always runs - no matter what happens in try/except. +239,Strings can use single or double quotes - consistency matters more than choice. +240,input() always gives you a string - even if you type a number. +241,finally always runs - no matter what happens in try/except. +242,Polymorphism means different objects can share method names and still work. +243,"Python reads top to bottom, so order your logic carefully." +244,Type hints improve readability and help static checkers - Python won't enforce them. +245,Slicing lets you grab parts of sequences - [start:end:step] is the syntax. +246,Strings can use single or double quotes - consistency matters more than choice. +247,Chained comparisons like 1 < x < 10 make your code clean and readable. +248,return ends a function immediately and gives back a value. +249,Variables don't need types declared - Python figures them out automatically. +250,Sets automatically remove duplicates - great for unique collections. +251,Dict comprehensions let you create mappings in one neat line. +252,Use print() to display results - your first debugging tool. +253,Functions are objects too - you can pass them around like data. +254,finally always runs - no matter what happens in try/except. +255,finally always runs - no matter what happens in try/except. +256,Magic methods like __str__ and __add__ let you customize built-in behavior. +257,return ends a function immediately and gives back a value. +258,return ends a function immediately and gives back a value. +259,Everything is passed by object reference - Python doesn't copy by default. +260,"Tuples are like lists, but locked - once made, they can't change." +261,input() always gives you a string - even if you type a number. +262,Dict comprehensions let you create mappings in one neat line. +263,finally always runs - no matter what happens in try/except. +264,Use print() to display results - your first debugging tool. +265,Lists are ordered and mutable - you can edit them anytime. +266,Polymorphism means different objects can share method names and still work. +267,finally always runs - no matter what happens in try/except. +268,Descriptors control attribute access at a deep level - used in properties. +269,Use print() to display results - your first debugging tool. +270,"Use 'in' to check membership - it works for lists, strings, and sets." +271,Generators use yield to return items lazily - one by one. +272,Descriptors control attribute access at a deep level - used in properties. +273,Use *args for variable arguments and **kwargs for named arguments. +274,Decorators wrap functions to extend behavior - like adding extra powers. +275,for loops can go through any iterable - from lists to strings. +276,Strings can use single or double quotes - consistency matters more than choice. +277,Multiprocessing lets you sidestep the GIL using multiple processes. +278,Sets automatically remove duplicates - great for unique collections. +279,finally always runs - no matter what happens in try/except. +280,len() tells you how many items are inside a container. +281,Use *args for variable arguments and **kwargs for named arguments. +282,Multiprocessing lets you sidestep the GIL using multiple processes. +283,return ends a function immediately and gives back a value. +284,Docstrings describe what your function does - use triple quotes right under def. +285,input() always gives you a string - even if you type a number. +286,input() always gives you a string - even if you type a number. +287,Lists can hold anything - even other lists or functions! +288,Lists can hold anything - even other lists or functions! +289,Polymorphism means different objects can share method names and still work. +290,List comprehensions are compact loops that build lists on the fly. +291,Triple quotes let you write multi-line strings easily. +292,Type hints improve readability and help static checkers - Python won't enforce them. +293,Docstrings describe what your function does - use triple quotes right under def. +294,Polymorphism means different objects can share method names and still work. +295,"Tuples are like lists, but locked - once made, they can't change." +296,Use *args for variable arguments and **kwargs for named arguments. +297,Strings can use single or double quotes - consistency matters more than choice. +298,Docstrings describe what your function does - use triple quotes right under def. +299,Magic methods like __str__ and __add__ let you customize built-in behavior. +300,List comprehensions are compact loops that build lists on the fly. +301,"if, elif, else decide what runs based on truthiness." +302,input() always gives you a string - even if you type a number. +303,Decorators wrap functions to extend behavior - like adding extra powers. +304,Polymorphism means different objects can share method names and still work. +305,Functions are objects too - you can pass them around like data. +306,super() calls methods from the parent class - super useful! +307,Lists are ordered and mutable - you can edit them anytime. +308,super() calls methods from the parent class - super useful! +309,Dict comprehensions let you create mappings in one neat line. +310,Use print() to display results - your first debugging tool. +311,Use print() to display results - your first debugging tool. +312,Use print() to display results - your first debugging tool. +313,finally always runs - no matter what happens in try/except. +314,input() always gives you a string - even if you type a number. +315,Private attributes are just a naming convention - nothing truly private here. +316,Sets automatically remove duplicates - great for unique collections. +317,finally always runs - no matter what happens in try/except. +318,Sets automatically remove duplicates - great for unique collections. +319,Variables don't need types declared - Python figures them out automatically. +320,Polymorphism means different objects can share method names and still work. +321,len() tells you how many items are inside a container. +322,Type hints improve readability and help static checkers - Python won't enforce them. +323,finally always runs - no matter what happens in try/except. +324,Default arguments are evaluated once - not every call. +325,Use print() to display results - your first debugging tool. +326,try and except help your code recover from errors instead of crashing. +327,Generators use yield to return items lazily - one by one. +328,Dict comprehensions let you create mappings in one neat line. +329,finally always runs - no matter what happens in try/except. +330,Asyncio helps run many tasks concurrently using async and await. +331,Dict comprehensions let you create mappings in one neat line. +332,"In Python, everything is an object - even numbers and functions!" +333,Polymorphism means different objects can share method names and still work. +334,Polymorphism means different objects can share method names and still work. +335,finally always runs - no matter what happens in try/except. +336,Polymorphism means different objects can share method names and still work. +337,Use '#' to add a comment - it's ignored by Python but loved by humans. +338,Use keyword arguments for clarity when calling functions. +339,"Python reads top to bottom, so order your logic carefully." +340,Strings can use single or double quotes - consistency matters more than choice. +341,"Use 'in' to check membership - it works for lists, strings, and sets." +342,"Use 'in' to check membership - it works for lists, strings, and sets." +343,Use '#' to add a comment - it's ignored by Python but loved by humans. +344,"None is falsy - just like 0, '', and empty collections." +345,Use sorted() to get a new sorted list - or sort() to change it in place. +346,Sets automatically remove duplicates - great for unique collections. +347,Lists can hold anything - even other lists or functions! +348,len() tells you how many items are inside a container. +349,return ends a function immediately and gives back a value. +350,super() calls methods from the parent class - super useful! +351,Triple quotes let you write multi-line strings easily. +352,"In Python, everything is an object - even numbers and functions!" +353,F-strings are the modern way to format text - clean and efficient. +354,contextlib helps you build your own context managers with yield. +355,return ends a function immediately and gives back a value. +356,input() always gives you a string - even if you type a number. +357,"Tuples are like lists, but locked - once made, they can't change." +358,Triple quotes let you write multi-line strings easily. +359,len() tells you how many items are inside a container. +360,Use keyword arguments for clarity when calling functions. +361,Magic methods like __str__ and __add__ let you customize built-in behavior. +362,Type hints improve readability and help static checkers - Python won't enforce them. +363,finally always runs - no matter what happens in try/except. +364,input() always gives you a string - even if you type a number. +365,super() calls methods from the parent class - super useful! +366,Polymorphism means different objects can share method names and still work. +367,input() always gives you a string - even if you type a number. +368,Closures remember variables even after their function has finished. +369,Generators use yield to return items lazily - one by one. +370,__init__ sets up new objects - it's the constructor method. +371,Polymorphism means different objects can share method names and still work. +372,Everything is passed by object reference - Python doesn't copy by default. +373,Triple quotes let you write multi-line strings easily. +374,input() always gives you a string - even if you type a number. +375,Generators use yield to return items lazily - one by one. +376,finally always runs - no matter what happens in try/except. +377,return ends a function immediately and gives back a value. +378,Use sorted() to get a new sorted list - or sort() to change it in place. +379,Descriptors control attribute access at a deep level - used in properties. +380,Docstrings describe what your function does - use triple quotes right under def. +381,F-strings are the modern way to format text - clean and efficient. +382,"None is falsy - just like 0, '', and empty collections." +383,Polymorphism means different objects can share method names and still work. +384,Type hints improve readability and help static checkers - Python won't enforce them. +385,Magic methods like __str__ and __add__ let you customize built-in behavior. +386,Lists can hold anything - even other lists or functions! +387,Magic methods like __str__ and __add__ let you customize built-in behavior. +388,Use keyword arguments for clarity when calling functions. +389,Use print() to display results - your first debugging tool. +390,Multiprocessing lets you sidestep the GIL using multiple processes. +391,super() calls methods from the parent class - super useful! +392,Dict comprehensions let you create mappings in one neat line. +393,input() always gives you a string - even if you type a number. +394,"if, elif, else decide what runs based on truthiness." +395,Strings can use single or double quotes - consistency matters more than choice. +396,Use *args for variable arguments and **kwargs for named arguments. +397,Lists are ordered and mutable - you can edit them anytime. +398,contextlib helps you build your own context managers with yield. +399,"Tuples are like lists, but locked - once made, they can't change." +400,Type hints improve readability and help static checkers - Python won't enforce them. +401,"None is falsy - just like 0, '', and empty collections." +402,Polymorphism means different objects can share method names and still work. +403,Multiprocessing lets you sidestep the GIL using multiple processes. +404,Lists are ordered and mutable - you can edit them anytime. +405,Default arguments are evaluated once - not every call. +406,Triple quotes let you write multi-line strings easily. +407,Await can only be used inside async functions - never in normal ones. +408,"Use 'in' to check membership - it works for lists, strings, and sets." +409,The GIL allows only one thread to run Python code at a time. +410,contextlib helps you build your own context managers with yield. +411,Use '#' to add a comment - it's ignored by Python but loved by humans. +412,The GIL allows only one thread to run Python code at a time. +413,Functions are objects too - you can pass them around like data. +414,return ends a function immediately and gives back a value. +415,Variables don't need types declared - Python figures them out automatically. +416,Multiprocessing lets you sidestep the GIL using multiple processes. +417,finally always runs - no matter what happens in try/except. +418,List comprehensions are compact loops that build lists on the fly. +419,Magic methods like __str__ and __add__ let you customize built-in behavior. +420,Everything in Python OOP is built on top of object - the ultimate base class. +421,Use *args for variable arguments and **kwargs for named arguments. +422,Use *args for variable arguments and **kwargs for named arguments. +423,Type hints improve readability and help static checkers - Python won't enforce them. +424,Lists can hold anything - even other lists or functions! +425,Use keyword arguments for clarity when calling functions. +426,input() always gives you a string - even if you type a number. +427,return ends a function immediately and gives back a value. +428,Use sorted() to get a new sorted list - or sort() to change it in place. +429,try and except help your code recover from errors instead of crashing. +430,"break stops a loop cold, while continue skips to the next round." +431,contextlib helps you build your own context managers with yield. +432,super() calls methods from the parent class - super useful! +433,Type hints improve readability and help static checkers - Python won't enforce them. +434,try and except help your code recover from errors instead of crashing. +435,Variables don't need types declared - Python figures them out automatically. +436,Await can only be used inside async functions - never in normal ones. +437,Generators use yield to return items lazily - one by one. +438,Use *args for variable arguments and **kwargs for named arguments. +439,Closures remember variables even after their function has finished. +440,Generators use yield to return items lazily - one by one. +441,finally always runs - no matter what happens in try/except. +442,Type hints improve readability and help static checkers - Python won't enforce them. +443,Docstrings describe what your function does - use triple quotes right under def. +444,Dict comprehensions let you create mappings in one neat line. +445,input() always gives you a string - even if you type a number. +446,return ends a function immediately and gives back a value. +447,finally always runs - no matter what happens in try/except. +448,while loops run until their condition becomes False. +449,"Use 'in' to check membership - it works for lists, strings, and sets." +450,Strings can use single or double quotes - consistency matters more than choice. +451,Use *args for variable arguments and **kwargs for named arguments. +452,"In Python, everything is an object - even numbers and functions!" +453,Generators use yield to return items lazily - one by one. +454,Multiprocessing lets you sidestep the GIL using multiple processes. +455,Dict comprehensions let you create mappings in one neat line. +456,Magic methods like __str__ and __add__ let you customize built-in behavior. +457,Triple quotes let you write multi-line strings easily. +458,input() always gives you a string - even if you type a number. +459,Lambda functions are tiny throwaway functions - perfect for one-liners. +460,"None is falsy - just like 0, '', and empty collections." +461,Slicing lets you grab parts of sequences - [start:end:step] is the syntax. +462,Use print() to display results - your first debugging tool. +463,return ends a function immediately and gives back a value. +464,"Use 'in' to check membership - it works for lists, strings, and sets." +465,F-strings are the modern way to format text - clean and efficient. +466,Everything is passed by object reference - Python doesn't copy by default. +467,try and except help your code recover from errors instead of crashing. +468,return ends a function immediately and gives back a value. +469,Magic methods like __str__ and __add__ let you customize built-in behavior. +470,Lambda functions are tiny throwaway functions - perfect for one-liners. +471,Use *args for variable arguments and **kwargs for named arguments. +472,Sets automatically remove duplicates - great for unique collections. +473,The GIL allows only one thread to run Python code at a time. +474,return ends a function immediately and gives back a value. +475,finally always runs - no matter what happens in try/except. +476,Lists are ordered and mutable - you can edit them anytime. +477,List comprehensions are compact loops that build lists on the fly. +478,Use keyword arguments for clarity when calling functions. +479,Strings can use single or double quotes - consistency matters more than choice. +480,Type hints improve readability and help static checkers - Python won't enforce them. +481,Type hints improve readability and help static checkers - Python won't enforce them. +482,"Tuples are like lists, but locked - once made, they can't change." +483,len() tells you how many items are inside a container. +484,Strings can use single or double quotes - consistency matters more than choice. +485,finally always runs - no matter what happens in try/except. +486,Use print() to display results - your first debugging tool. +487,Modules are Python files you can reuse - import keeps code DRY. +488,Generators use yield to return items lazily - one by one. +489,Type hints improve readability and help static checkers - Python won't enforce them. +490,Type hints improve readability and help static checkers - Python won't enforce them. +491,super() calls methods from the parent class - super useful! +492,Variables don't need types declared - Python figures them out automatically. +493,Descriptors control attribute access at a deep level - used in properties. +494,Everything in Python OOP is built on top of object - the ultimate base class. +495,The GIL allows only one thread to run Python code at a time. +496,Decorators wrap functions to extend behavior - like adding extra powers. +497,Generators use yield to return items lazily - one by one. +498,return ends a function immediately and gives back a value. +499,Await can only be used inside async functions - never in normal ones. +500,try and except help your code recover from errors instead of crashing. diff --git a/quizproject/data/hard.csv b/quizproject/data/hard.csv new file mode 100644 index 0000000..ea23ca4 --- /dev/null +++ b/quizproject/data/hard.csv @@ -0,0 +1,501 @@ +Question ID,Question,Option A,Option B,Option C,Option D,Option E,Answer,Explanation +1,What is the value of s=pythonista then print(s[0:4]),pyth,yth,None of the above,pytho,pythonista,pyth,pyth is correct based on how this feature behaves in Python. +2,What does list({1: a 2: b}) evaluate to,[1 2],[(1 a) (2 b)],[2 1],[1 2],None of the above,[1 2],[1 2] is correct based on how this feature behaves in Python. +3,What does functools.lru_cache do,Stores results only for keyword arguments,Caches function results keyed by arguments to avoid recomputation,Validates argument types at runtime,Converts a function into a generator,Parallelizes the function across threads,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. +4,What is the value of s=pythonista then print(s[2:5]),None of the above,pytho,thonista,ho,tho,tho,tho is correct based on how this feature behaves in Python. +5,What is the output of print({1 2 3} < {1 2 3 4}),[],FALSE,Error,None of the above,TRUE,TRUE,True is correct based on how this feature behaves in Python. +6,What is the value of s=pythonista then print(s[0:5]),pytho,ytho,pythonista,None of the above,python,pytho,pytho is correct based on how this feature behaves in Python. +7,What is the output of print(sum(i*i for i in range(7))),None of the above,21,91,49,36,91,91 is correct based on how this feature behaves in Python. +8,What is output of print({}.setdefault(x [])),KeyError,[x],None,None of the above,[],[],[] is correct based on how this feature behaves in Python. +9,What does itertools.groupby require to group equal keys correctly,The key function must return unique values,The input must be a list not an iterator,The input must be pre sorted by the same key function,The keys must be strings,The values must be numbers,The input must be pre sorted by the same key function,groupby only groups adjacent equal keys so you must sort first. +10,Which statement about decorators is accurate,A decorator always speeds up function execution,A decorator changes the function name at runtime in CPython,A decorator can only be applied to async functions,A decorator must be a class not a function,A decorator wraps a function to modify behavior without changing the function code,A decorator wraps a function to modify behavior without changing the function code,A decorator takes a function and returns a new callable that adds behavior around it. +11,What is the value of s=pythonista then print(s[3:6]),hon,honista,None of the above,on,honi,hon,hon is correct based on how this feature behaves in Python. +12,What is the output of print(sum(i*i for i in range(6))),36,None of the above,25,Error,55,55,55 is correct based on how this feature behaves in Python. +13,What is the value of s=pythonista then print(s[0:5]),ytho,pytho,python,pythonista,None of the above,pytho,pytho is correct based on how this feature behaves in Python. +14,What is the output of print(sum(i*i for i in range(5))),14,55,10,25,30,30,Squares 0 1 4 9 16 add up to 30. +15,What is the output of print({i:i*i for i in range(3)}[2]),4,2,0,None of the above,3,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. +16,What is the output of print(sum(i*i for i in range(7))),Error,91,36,None of the above,49,91,91 is correct based on how this feature behaves in Python. +17,What is the value of s=pythonista then print(s[0:2]),pythonista,pyt,py,y,None of the above,py,py is correct based on how this feature behaves in Python. +18,What is the result of print(dict.fromkeys(aba 0)),{a: 0},{a:0 b:0 c:0},{a: 0 b: 0},{a:0 b:0 a:0},None of the above,{a: 0 b: 0},{a: 0 b: 0} is correct based on how this feature behaves in Python. +19,What is the output of print(sum(i*i for i in range(4))),Error,None of the above,9,6,14,14,14 is correct based on how this feature behaves in Python. +20,What is the output of print(sum(i*i for i in range(7))),91,21,Error,36,None of the above,91,91 is correct based on how this feature behaves in Python. +21,What is the value of s=pythonista then print(s[0:5]),python,ytho,pythonista,pytho,None of the above,pytho,pytho is correct based on how this feature behaves in Python. +22,What does print((1 2) < (1 3)) produce,None of the above,None,TRUE,0,Error,TRUE,True is correct based on how this feature behaves in Python. +23,What is the output of print(sum(i*i for i in range(3))),Error,9,4,5,3,5,5 is correct based on how this feature behaves in Python. +24,What is the output of print(sum(i*i for i in range(5))),10,None of the above,16,Error,30,30,Squares 0 1 4 9 16 add up to 30. +25,What is the output of print(sum(i*i for i in range(7))),49,21,91,36,Error,91,91 is correct based on how this feature behaves in Python. +26,What is the output of print(sum(i*i for i in range(7))),Error,91,36,49,None of the above,91,91 is correct based on how this feature behaves in Python. +27,What is the value of len(set(mississippi)),3,5,4,None of the above,8,4,4 is correct based on how this feature behaves in Python. +28,What does print((1 2) < (1 3)) produce,0,None of the above,FALSE,TRUE,None,TRUE,True is correct based on how this feature behaves in Python. +29,What is the value of s=pythonista then print(s[2:5]),tho,pytho,None of the above,thon,ho,tho,tho is correct based on how this feature behaves in Python. +30,What is the output of print(sum(i*i for i in range(5))),None of the above,Error,30,10,16,30,Squares 0 1 4 9 16 add up to 30. +31,What is output of print(a * 0 or b),None of the above,a,0,,b,b,b is correct based on how this feature behaves in Python. +32,What does functools.lru_cache do,Caches function results keyed by arguments to avoid recomputation,Converts a function into a generator,Stores results only for keyword arguments,Validates argument types at runtime,Parallelizes the function across threads,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. +33,What is the output of print(sum(i*i for i in range(7))),Error,49,None of the above,36,91,91,91 is correct based on how this feature behaves in Python. +34,What is the output of print(sum(i*i for i in range(5))),25,None of the above,16,Error,30,30,Squares 0 1 4 9 16 add up to 30. +35,What is the value of s=pythonista then print(s[3:7]),honista,honi,None of the above,honis,pythoni,honi,honi is correct based on how this feature behaves in Python. +36,What is the output of print(sum(i*i for i in range(7))),91,Error,None of the above,21,36,91,91 is correct based on how this feature behaves in Python. +37,What is the value of s=pythonista then print(s[2:5]),pytho,tho,None of the above,ho,thonista,tho,tho is correct based on how this feature behaves in Python. +38,What is the output of print(sum(i*i for i in range(7))),49,None of the above,91,Error,21,91,91 is correct based on how this feature behaves in Python. +39,What is printed by print(any([])),None of the above,0,FALSE,TRUE,Error,FALSE,any of an empty iterable is False as there is no truthy element. +40,What is the output of print(sum(i*i for i in range(3))),3,9,Error,None of the above,5,5,5 is correct based on how this feature behaves in Python. +41,What is the value of s=pythonista then print(s[0:3]),None of the above,pyt,pythonista,yt,pyth,pyt,pyt is correct based on how this feature behaves in Python. +42,What is the output of print(sum(i*i for i in range(5))),30,16,Error,25,None of the above,30,Squares 0 1 4 9 16 add up to 30. +43,What is the value of s=pythonista then print(s[0:3]),pyt,None of the above,pyth,pythonista,yt,pyt,pyt is correct based on how this feature behaves in Python. +44,What is the output of print(sum(i*i for i in range(6))),25,15,36,None of the above,55,55,55 is correct based on how this feature behaves in Python. +45,What is the value of s=pythonista then print(s[0:5]),pytho,pythonista,python,ytho,None of the above,pytho,pytho is correct based on how this feature behaves in Python. +46,What is the output of print(sum(i*i for i in range(6))),15,Error,55,None of the above,36,55,55 is correct based on how this feature behaves in Python. +47,What is the value of s=pythonista then print(s[1:6]),ythoni,ython,None of the above,thon,ythonista,ython,ython is correct based on how this feature behaves in Python. +48,What is the value of s=pythonista then print(s[3:7]),honis,None of the above,honi,pythoni,oni,honi,honi is correct based on how this feature behaves in Python. +49,What is the result of print(dict.fromkeys(aba 0)),None of the above,{a: 0 b: 0},{a: 0},{a:0 b:0 a:0},{b:0},{a: 0 b: 0},{a: 0 b: 0} is correct based on how this feature behaves in Python. +50,What is the output of print(sum(i*i for i in range(5))),None of the above,25,10,30,Error,30,Squares 0 1 4 9 16 add up to 30. +51,What is the output of print(sum(i*i for i in range(3))),5,Error,4,None of the above,9,5,5 is correct based on how this feature behaves in Python. +52,What is the output of print(sum(i*i for i in range(3))),5,4,3,9,Error,5,5 is correct based on how this feature behaves in Python. +53,What does print(all([])) return,FALSE,0,None,None of the above,TRUE,TRUE,all of an empty iterable is True by definition vacuously true. +54,What is the output of print(sum(i*i for i in range(7))),21,91,Error,None of the above,36,91,91 is correct based on how this feature behaves in Python. +55,What is the output of print(sum(i*i for i in range(7))),91,None of the above,36,21,49,91,91 is correct based on how this feature behaves in Python. +56,What is the output of print(sum(i*i for i in range(4))),16,Error,14,None of the above,6,14,14 is correct based on how this feature behaves in Python. +57,What is the value of s=pythonista then print(s[0:4]),pyth,yth,None of the above,pythonista,pytho,pyth,pyth is correct based on how this feature behaves in Python. +58,What is the output of print(sum(i*i for i in range(5))),30,25,None of the above,10,16,30,Squares 0 1 4 9 16 add up to 30. +59,What is the value of s=pythonista then print(s[3:8]),honista,None of the above,onis,pythonis,honis,honis,honis is correct based on how this feature behaves in Python. +60,What is the output of print(sum(i*i for i in range(3))),9,5,None of the above,3,4,5,5 is correct based on how this feature behaves in Python. +61,What is the output of print(sum(i*i for i in range(7))),36,Error,21,91,None of the above,91,91 is correct based on how this feature behaves in Python. +62,What is the value of s=pythonista then print(s[3:5]),pytho,ho,None of the above,honista,o,ho,ho is correct based on how this feature behaves in Python. +63,What is the value of s=pythonista then print(s[0:2]),pyt,py,y,pythonista,None of the above,py,py is correct based on how this feature behaves in Python. +64,What is the output of print(sum(i*i for i in range(4))),16,Error,None of the above,9,14,14,14 is correct based on how this feature behaves in Python. +65,What is the output of print(sum(i*i for i in range(7))),49,None of the above,36,21,91,91,91 is correct based on how this feature behaves in Python. +66,What is printed by print(any([])),None,FALSE,None of the above,0,Error,FALSE,any of an empty iterable is False as there is no truthy element. +67,What is the output of print(sum(i*i for i in range(6))),36,55,25,None of the above,Error,55,55 is correct based on how this feature behaves in Python. +68,Which statement about list vs deque is accurate,deque provides faster appends and pops from both ends while list is fast at random access,None of the above,list has O1 inserts at the front,list is always faster than deque for all operations,deque supports O1 random indexing,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. +69,Which statement about decorators is accurate,A decorator always speeds up function execution,A decorator can only be applied to async functions,A decorator wraps a function to modify behavior without changing the function code,A decorator must be a class not a function,A decorator changes the function name at runtime in CPython,A decorator wraps a function to modify behavior without changing the function code,A decorator takes a function and returns a new callable that adds behavior around it. +70,What is the output of print(sum(i*i for i in range(3))),5,4,9,Error,None of the above,5,5 is correct based on how this feature behaves in Python. +71,What is the output of print(sum(i*i for i in range(7))),21,36,91,49,Error,91,91 is correct based on how this feature behaves in Python. +72,What is the output of print(sum(i*i for i in range(5))),25,None of the above,Error,10,30,30,Squares 0 1 4 9 16 add up to 30. +73,What is the value of s=pythonista then print(s[2:6]),hon,None of the above,thoni,python,thon,thon,thon is correct based on how this feature behaves in Python. +74,What is the output of print(sum(i*i for i in range(6))),25,55,15,Error,None of the above,55,55 is correct based on how this feature behaves in Python. +75,What is the output of print(sum(i*i for i in range(6))),36,55,None of the above,15,Error,55,55 is correct based on how this feature behaves in Python. +76,What does functools.lru_cache do,Caches function results keyed by arguments to avoid recomputation,Converts a function into a generator,Parallelizes the function across threads,Stores results only for keyword arguments,Validates argument types at runtime,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. +77,What is the output of print(sum(i*i for i in range(7))),49,Error,21,91,None of the above,91,91 is correct based on how this feature behaves in Python. +78,What is the value of s=pythonista then print(s[2:4]),None of the above,h,tho,pyth,th,th,th is correct based on how this feature behaves in Python. +79,What is the value of s=pythonista then print(s[0:3]),pyt,pythonista,pyth,yt,None of the above,pyt,pyt is correct based on how this feature behaves in Python. +80,What is the output of print(sum(i*i for i in range(4))),None of the above,Error,14,6,9,14,14 is correct based on how this feature behaves in Python. +81,Which statement about float NaN is correct,None of the above,NaN sorts to the beginning in all Python sorts,NaN is equal to 0 0 by default,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN compares greater than all numbers,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. +82,What is the value of s=pythonista then print(s[3:5]),pytho,o,honista,ho,None of the above,ho,ho is correct based on how this feature behaves in Python. +83,What is the output of print(sum(i*i for i in range(6))),36,Error,55,None of the above,25,55,55 is correct based on how this feature behaves in Python. +84,Which statement about float NaN is correct,NaN sorts to the beginning in all Python sorts,NaN compares greater than all numbers,NaN is treated as None by min and max,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is equal to 0 0 by default,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. +85,What is the output of print(sum(i*i for i in range(6))),25,55,Error,None of the above,15,55,55 is correct based on how this feature behaves in Python. +86,What is the output of print(sum(i*i for i in range(3))),None of the above,Error,5,4,3,5,5 is correct based on how this feature behaves in Python. +87,What is the value of s=pythonista then print(s[0:2]),y,None of the above,pythonista,pyt,py,py,py is correct based on how this feature behaves in Python. +88,What is the value of s=pythonista then print(s[1:6]),None of the above,thon,ython,ythonista,python,ython,ython is correct based on how this feature behaves in Python. +89,Which description of asyncio.gather is accurate,Blocks the event loop until all tasks finish via time sleep,Guarantees order of completion equals input order,Starts new processes for each task,Cancels all tasks on the first exception always,Runs multiple awaitables concurrently and aggregates their results,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. +90,What is the value of s=pythonista then print(s[0:4]),pytho,yth,None of the above,pythonista,pyth,pyth,pyth is correct based on how this feature behaves in Python. +91,What is the value of s=pythonista then print(s[0:2]),pyt,pythonista,y,None of the above,py,py,py is correct based on how this feature behaves in Python. +92,What is the output of print(sum(i*i for i in range(3))),Error,None of the above,5,3,9,5,5 is correct based on how this feature behaves in Python. +93,What is the value of s=pythonista then print(s[3:6]),honista,hon,None of the above,python,honi,hon,hon is correct based on how this feature behaves in Python. +94,What is the output of print(sum(i*i for i in range(5))),Error,10,16,30,25,30,Squares 0 1 4 9 16 add up to 30. +95,What is the value of s=pythonista then print(s[1:6]),ythonista,python,None of the above,ythoni,ython,ython,ython is correct based on how this feature behaves in Python. +96,What is the output of print(sum(i*i for i in range(4))),16,14,9,Error,6,14,14 is correct based on how this feature behaves in Python. +97,What is the output of print(sum(i*i for i in range(4))),14,6,None of the above,Error,9,14,14 is correct based on how this feature behaves in Python. +98,What is the value of s=pythonista then print(s[3:7]),honis,oni,None of the above,honi,honista,honi,honi is correct based on how this feature behaves in Python. +99,What is the value of s=pythonista then print(s[0:5]),pythonista,pytho,ytho,None of the above,python,pytho,pytho is correct based on how this feature behaves in Python. +100,What is the output of print(sum(i*i for i in range(7))),None of the above,Error,49,21,91,91,91 is correct based on how this feature behaves in Python. +101,What is the output of print(sum(i*i for i in range(6))),25,36,Error,15,55,55,55 is correct based on how this feature behaves in Python. +102,What is the output of print(sum(i*i for i in range(6))),55,None of the above,25,15,Error,55,55 is correct based on how this feature behaves in Python. +103,What is the output of print(sum(i*i for i in range(5))),None of the above,25,30,16,Error,30,Squares 0 1 4 9 16 add up to 30. +104,What is the output of print(sum(i*i for i in range(4))),None of the above,6,9,16,14,14,14 is correct based on how this feature behaves in Python. +105,What is output of print({}.setdefault(x [])),[x],{},[],None of the above,None,[],[] is correct based on how this feature behaves in Python. +106,What does print(all([])) return,TRUE,FALSE,None,None of the above,0,TRUE,all of an empty iterable is True by definition vacuously true. +107,What is the value of s=pythonista then print(s[1:5]),pytho,tho,None of the above,ythonista,ytho,ytho,ytho is correct based on how this feature behaves in Python. +108,What is the output of print(sum(i*i for i in range(7))),49,21,Error,None of the above,91,91,91 is correct based on how this feature behaves in Python. +109,What is the output of print(sum(i*i for i in range(5))),10,25,30,55,None of the above,30,Squares 0 1 4 9 16 add up to 30. +110,What is output of print(bool(object())),TRUE,None of the above,0,None,Error,TRUE,Any object instance is truthy so bool is True. +111,What is printed by print(any([])),0,Error,TRUE,FALSE,None of the above,FALSE,any of an empty iterable is False as there is no truthy element. +112,What is the value of s=pythonista then print(s[0:4]),pyth,pythonista,None of the above,yth,pytho,pyth,pyth is correct based on how this feature behaves in Python. +113,What is the output of print(sum(i*i for i in range(6))),36,None of the above,Error,55,15,55,55 is correct based on how this feature behaves in Python. +114,What is the value of s=pythonista then print(s[3:7]),honista,oni,None of the above,honi,pythoni,honi,honi is correct based on how this feature behaves in Python. +115,What is the value of s=pythonista then print(s[2:7]),honi,thonista,thonis,pythoni,thoni,thoni,thoni is correct based on how this feature behaves in Python. +116,What is structural pattern matching match case primarily used for,Pattern matching only works with strings,Destructuring and matching data shapes like sequences mappings and classes,Switching on integer constants only,Dynamic type casting at runtime,Replacing if else for arithmetic,Destructuring and matching data shapes like sequences mappings and classes,match case can unpack and test shapes of data not just values. +117,What is output of print({}.setdefault(x [])),None of the above,[x],{},[],KeyError,[],[] is correct based on how this feature behaves in Python. +118,What is the output of print(sum(i*i for i in range(5))),Error,25,30,16,None of the above,30,Squares 0 1 4 9 16 add up to 30. +119,What is the output of print(sum(i*i for i in range(4))),None of the above,6,16,9,14,14,14 is correct based on how this feature behaves in Python. +120,Which method makes an object usable in a with statement,__enter__ and __exit__,__init__ and __del__,__aenter__ and __aexit__ only,__get__ and __set__,__iter__ and __next__,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. +121,What is the output of print(sum(i*i for i in range(5))),10,25,30,16,Error,30,Squares 0 1 4 9 16 add up to 30. +122,What is the value of s=pythonista then print(s[1:3]),t,None of the above,yt,yth,pyt,yt,yt is correct based on how this feature behaves in Python. +123,What is the value of s=pythonista then print(s[3:6]),None of the above,python,honi,honista,hon,hon,hon is correct based on how this feature behaves in Python. +124,In typing what does Protocol represent,A metaclass for ABCs,A runtime enforced interface,A network protocol implementation,A final class that cannot be subclassed,A structural type based on method signatures rather than concrete inheritance,A structural type based on method signatures rather than concrete inheritance,Protocol checks that a type has the right methods regardless of its base classes. +125,What is printed by print(any([])),Error,0,None of the above,FALSE,None,FALSE,any of an empty iterable is False as there is no truthy element. +126,What is the value of s=pythonista then print(s[3:8]),onis,honist,honis,pythonis,None of the above,honis,honis is correct based on how this feature behaves in Python. +127,Which statement about __slots__ is correct,__slots__ speeds up all attribute access always,__slots__ makes a class immutable,__slots__ enables multiple inheritance without MRO,__slots__ is required for dataclasses,__slots__ can reduce memory by preventing instance dict creation,__slots__ can reduce memory by preventing instance dict creation,Slots remove the per instance dict so instances can be smaller. +128,What is the output of print(sum(i*i for i in range(4))),9,6,None of the above,Error,14,14,14 is correct based on how this feature behaves in Python. +129,What is the result of s=abba; print(s.replace(b bb 1)),abbba,abbaa,abba,abbbba,None of the above,abbba,replace with count 1 replaces only the first match so one b becomes bb. +130,What is the output of print(sum(i*i for i in range(4))),6,16,Error,14,None of the above,14,14 is correct based on how this feature behaves in Python. +131,What is the output of print(sum(i*i for i in range(3))),4,None of the above,5,9,3,5,5 is correct based on how this feature behaves in Python. +132,What does print(type(range(3)).__name__) output,tuple,iterator,list,generator,range,range,range objects have type name range. +133,What is the output of print(sum(i*i for i in range(3))),None of the above,5,4,3,9,5,5 is correct based on how this feature behaves in Python. +134,What is the output of print([i for i in range(3)] is [0 1 2]),None of the above,FALSE,0,[0 1 2],TRUE,FALSE,False is correct based on how this feature behaves in Python. +135,What is the value of s=pythonista then print(s[0:4]),pythonista,pyth,yth,pytho,None of the above,pyth,pyth is correct based on how this feature behaves in Python. +136,What is the value of s=pythonista then print(s[3:5]),ho,pytho,None of the above,hon,o,ho,ho is correct based on how this feature behaves in Python. +137,What is the output of print(sum(i*i for i in range(4))),16,6,None of the above,14,9,14,14 is correct based on how this feature behaves in Python. +138,What does bisect.insort do,Sorts a list in place using mergesort,Removes duplicates from a list,Inserts an item into a sorted list keeping it sorted,Builds a heap from a list,Performs a binary search returning an index only,Inserts an item into a sorted list keeping it sorted,insort inserts while keeping the list sorted using binary search. +139,What is the output of print(sum(i*i for i in range(5))),None of the above,Error,10,30,25,30,Squares 0 1 4 9 16 add up to 30. +140,What is the value of s=pythonista then print(s[0:5]),None of the above,python,pytho,ytho,pythonista,pytho,pytho is correct based on how this feature behaves in Python. +141,What is the output of print(sum(i*i for i in range(7))),91,Error,None of the above,36,49,91,91 is correct based on how this feature behaves in Python. +142,What is the value of s=pythonista then print(s[3:5]),hon,honista,None of the above,ho,pytho,ho,ho is correct based on how this feature behaves in Python. +143,What is the value of len(set(mississippi)),8,5,7,3,4,4,4 is correct based on how this feature behaves in Python. +144,What is the value of s=pythonista then print(s[2:7]),honi,thonista,pythoni,None of the above,thoni,thoni,thoni is correct based on how this feature behaves in Python. +145,What does print((1 2) < (1 3)) produce,FALSE,Error,None,None of the above,TRUE,TRUE,True is correct based on how this feature behaves in Python. +146,What is the value of s=pythonista then print(s[2:6]),thonista,thoni,thon,None of the above,hon,thon,thon is correct based on how this feature behaves in Python. +147,What is the value of s=pythonista then print(s[1:3]),ythonista,None of the above,yth,t,yt,yt,yt is correct based on how this feature behaves in Python. +148,What is the value of s=pythonista then print(s[3:5]),honista,hon,ho,None of the above,o,ho,ho is correct based on how this feature behaves in Python. +149,Which statement about list vs deque is accurate,deque supports O1 random indexing,list has O1 inserts at the front,deque cannot be iterated,list is always faster than deque for all operations,deque provides faster appends and pops from both ends while list is fast at random access,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. +150,What is the output of print({a:1}.get(b) is None),FALSE,0,KeyError,TRUE,None,TRUE,True is correct based on how this feature behaves in Python. +151,What is the output of print(sum(i*i for i in range(4))),Error,16,None of the above,9,14,14,14 is correct based on how this feature behaves in Python. +152,What is the value of len(set(mississippi)),8,7,4,None of the above,5,4,4 is correct based on how this feature behaves in Python. +153,What is the value of s=pythonista then print(s[0:3]),pyth,yt,pyt,pythonista,None of the above,pyt,pyt is correct based on how this feature behaves in Python. +154,What is the output of print(sum(i*i for i in range(5))),None of the above,30,10,25,Error,30,Squares 0 1 4 9 16 add up to 30. +155,Which best describes the Global Interpreter Lock GIL,It locks the entire operating system scheduler,It blocks C extensions from running in parallel,It disables asyncio,It prevents subprocesses from spawning,It allows only one thread to execute Python bytecode at a time per process,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. +156,What is the value of s=pythonista then print(s[2:4]),h,None of the above,tho,th,pyth,th,th is correct based on how this feature behaves in Python. +157,What is the value of s=pythonista then print(s[0:2]),py,None of the above,pyt,y,pythonista,py,py is correct based on how this feature behaves in Python. +158,What is the output of print(sum(i*i for i in range(5))),30,10,None of the above,16,Error,30,Squares 0 1 4 9 16 add up to 30. +159,What does the walrus operator do,None of the above,It assigns and returns a value inside an expression,It defines a lambda,It performs integer division,It creates a context manager,It assigns and returns a value inside an expression,Walrus operator lets you assign a value as part of an expression. +160,What is the output of print([i for i in range(3)] is [0 1 2]),None of the above,TRUE,Error,FALSE,[0 1 2],FALSE,False is correct based on how this feature behaves in Python. +161,What is the result of s=abba; print(s.replace(b bb 1)),None of the above,abba,abbba,abbbba,a bb a,abbba,replace with count 1 replaces only the first match so one b becomes bb. +162,What is the output of print(sum(i*i for i in range(5))),30,10,None of the above,14,55,30,Squares 0 1 4 9 16 add up to 30. +163,What is the value of s=pythonista then print(s[1:6]),None of the above,python,ythoni,ython,ythonista,ython,ython is correct based on how this feature behaves in Python. +164,What is the output of print(sum(i*i for i in range(6))),36,15,Error,55,25,55,55 is correct based on how this feature behaves in Python. +165,What is the output of print([i for i in range(3)] is [0 1 2]),None of the above,Error,[0 1 2],FALSE,0,FALSE,False is correct based on how this feature behaves in Python. +166,What is the output of print(sum(i*i for i in range(7))),36,None of the above,21,91,Error,91,91 is correct based on how this feature behaves in Python. +167,What is the output of print(sum(i*i for i in range(7))),91,49,36,None of the above,Error,91,91 is correct based on how this feature behaves in Python. +168,What is the output of print(sum(i*i for i in range(5))),30,25,16,Error,None of the above,30,Squares 0 1 4 9 16 add up to 30. +169,What is the value of s=pythonista then print(s[0:3]),pyt,None of the above,pyth,pythonista,yt,pyt,pyt is correct based on how this feature behaves in Python. +170,What is the value of s=pythonista then print(s[2:5]),ho,tho,pytho,thonista,None of the above,tho,tho is correct based on how this feature behaves in Python. +171,What is the output of print(sum(i*i for i in range(6))),55,Error,25,None of the above,36,55,55 is correct based on how this feature behaves in Python. +172,What does list({1: a 2: b}) evaluate to,[2 1],[1 2],None of the above,[a b],[(1 a) (2 b)],[1 2],[1 2] is correct based on how this feature behaves in Python. +173,What is the output of print(tuple(map(lambda x:x+1 (1 2)))),(2 3),None of the above,(2 3 4),(1 2 3),(1 3),(2 3),(2 3) is correct based on how this feature behaves in Python. +174,What is the value of s=pythonista then print(s[1:3]),yt,t,ythonista,yth,pyt,yt,yt is correct based on how this feature behaves in Python. +175,Which built in is most appropriate for a stable sort with a custom key,heapq.nsmallest for all elements,reversed then sort,sorted with the key parameter,list.sort without key,bisect.insort for unsorted lists,sorted with the key parameter,sorted with key keeps equal keys in input order and uses the key for comparisons. +176,What is the output of print(sum(i*i for i in range(6))),55,25,Error,36,None of the above,55,55 is correct based on how this feature behaves in Python. +177,What is the output of print(sum(i*i for i in range(3))),Error,5,3,4,9,5,5 is correct based on how this feature behaves in Python. +178,What is the value of s=pythonista then print(s[1:3]),pyt,None of the above,t,yth,yt,yt,yt is correct based on how this feature behaves in Python. +179,What is the value of s=pythonista then print(s[0:5]),python,pytho,ytho,pythonista,None of the above,pytho,pytho is correct based on how this feature behaves in Python. +180,What is the value of s=pythonista then print(s[0:5]),pythonista,ytho,None of the above,pytho,python,pytho,pytho is correct based on how this feature behaves in Python. +181,Which best describes the Global Interpreter Lock GIL,It prevents subprocesses from spawning,It blocks C extensions from running in parallel,It allows only one thread to execute Python bytecode at a time per process,It locks the entire operating system scheduler,It disables asyncio,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. +182,What is the output of print(sum(i*i for i in range(5))),None of the above,30,25,10,Error,30,Squares 0 1 4 9 16 add up to 30. +183,What is the value of s=pythonista then print(s[1:4]),pyth,yth,None of the above,ytho,ythonista,yth,yth is correct based on how this feature behaves in Python. +184,What is the value of len(set(mississippi)),8,4,3,5,7,4,4 is correct based on how this feature behaves in Python. +185,What is the value of s=pythonista then print(s[1:5]),ython,None of the above,ytho,ythonista,tho,ytho,ytho is correct based on how this feature behaves in Python. +186,What is the value of s=pythonista then print(s[3:8]),onis,honis,None of the above,honista,pythonis,honis,honis is correct based on how this feature behaves in Python. +187,What is the value of s=pythonista then print(s[3:8]),honist,onis,honis,pythonis,None of the above,honis,honis is correct based on how this feature behaves in Python. +188,What is the output of print(sum(i*i for i in range(7))),49,Error,91,21,None of the above,91,91 is correct based on how this feature behaves in Python. +189,What is the value of s=pythonista then print(s[3:6]),None of the above,on,hon,honi,python,hon,hon is correct based on how this feature behaves in Python. +190,What is the value of s=pythonista then print(s[1:6]),ython,python,None of the above,thon,ythoni,ython,ython is correct based on how this feature behaves in Python. +191,What is the output of print(sum(i*i for i in range(3))),None of the above,Error,4,3,5,5,5 is correct based on how this feature behaves in Python. +192,What is the output of print(sum(i*i for i in range(6))),15,None of the above,55,Error,36,55,55 is correct based on how this feature behaves in Python. +193,What is the value of s=pythonista then print(s[3:6]),honista,on,None of the above,honi,hon,hon,hon is correct based on how this feature behaves in Python. +194,What is the output of print(sum(i*i for i in range(5))),25,10,Error,None of the above,30,30,Squares 0 1 4 9 16 add up to 30. +195,Which built in is most appropriate for a stable sort with a custom key,list.sort without key,bisect.insort for unsorted lists,heapq.nsmallest for all elements,reversed then sort,sorted with the key parameter,sorted with the key parameter,sorted with key keeps equal keys in input order and uses the key for comparisons. +196,What does list({1: a 2: b}) evaluate to,[1 2],[a b],[2 1],None of the above,[(1 a) (2 b)],[1 2],[1 2] is correct based on how this feature behaves in Python. +197,Which statement about decorators is accurate,A decorator changes the function name at runtime in CPython,A decorator can only be applied to async functions,None of the above,A decorator must be a class not a function,A decorator wraps a function to modify behavior without changing the function code,A decorator wraps a function to modify behavior without changing the function code,A decorator takes a function and returns a new callable that adds behavior around it. +198,What is output of print(bool(object())),FALSE,None,TRUE,0,None of the above,TRUE,Any object instance is truthy so bool is True. +199,What does itertools.groupby require to group equal keys correctly,The values must be numbers,The input must be pre sorted by the same key function,None of the above,The key function must return unique values,The input must be a list not an iterator,The input must be pre sorted by the same key function,groupby only groups adjacent equal keys so you must sort first. +200,What is the value of s=pythonista then print(s[3:7]),honis,honista,pythoni,honi,None of the above,honi,honi is correct based on how this feature behaves in Python. +201,What is the value of s=pythonista then print(s[0:3]),pyth,None of the above,pyt,pythonista,yt,pyt,pyt is correct based on how this feature behaves in Python. +202,What is structural pattern matching match case primarily used for,Destructuring and matching data shapes like sequences mappings and classes,Switching on integer constants only,Dynamic type casting at runtime,Replacing if else for arithmetic,Pattern matching only works with strings,Destructuring and matching data shapes like sequences mappings and classes,match case can unpack and test shapes of data not just values. +203,What is the output of print(sum(i*i for i in range(7))),36,49,91,Error,21,91,91 is correct based on how this feature behaves in Python. +204,What is the output of print(sum(i*i for i in range(4))),9,14,16,6,Error,14,14 is correct based on how this feature behaves in Python. +205,What is the value of s=pythonista then print(s[3:6]),None of the above,python,on,honista,hon,hon,hon is correct based on how this feature behaves in Python. +206,What is output of print(a * 0 or b),b,FALSE,0,None of the above,,b,b is correct based on how this feature behaves in Python. +207,What is the value of s=pythonista then print(s[1:5]),None of the above,ython,tho,ytho,pytho,ytho,ytho is correct based on how this feature behaves in Python. +208,What is the output of print(sum(i*i for i in range(6))),Error,55,25,None of the above,36,55,55 is correct based on how this feature behaves in Python. +209,What is the value of s=pythonista then print(s[1:5]),pytho,ytho,ythonista,None of the above,tho,ytho,ytho is correct based on how this feature behaves in Python. +210,What does contextlib.contextmanager do,Registers cleanup to run at interpreter shutdown only,Creates a thread safe lock automatically,Writes context logs to syslog,Turns a generator function into a context manager using yield to split setup and teardown,Provides async context management only,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. +211,Which description of asyncio.gather is accurate,Cancels all tasks on the first exception always,Blocks the event loop until all tasks finish via time sleep,Guarantees order of completion equals input order,Starts new processes for each task,Runs multiple awaitables concurrently and aggregates their results,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. +212,What is the output of print(sum(i*i for i in range(4))),Error,9,None of the above,14,6,14,14 is correct based on how this feature behaves in Python. +213,What does print((x:=len([1 2 3])) == 3 and x) output,FALSE,None,len list,3,None of the above,3,3 is correct based on how this feature behaves in Python. +214,What is the output of print(sum(i*i for i in range(6))),25,36,55,Error,None of the above,55,55 is correct based on how this feature behaves in Python. +215,What is the output of print(sum(i*i for i in range(6))),15,36,55,25,None of the above,55,55 is correct based on how this feature behaves in Python. +216,What is the value of s=pythonista then print(s[3:8]),honista,honist,pythonis,honis,None of the above,honis,honis is correct based on how this feature behaves in Python. +217,What is the output of print(sum(i*i for i in range(3))),4,5,None of the above,Error,9,5,5 is correct based on how this feature behaves in Python. +218,What is the value of s=pythonista then print(s[1:6]),None of the above,thon,ythoni,python,ython,ython,ython is correct based on how this feature behaves in Python. +219,What is the output of print(sum(i*i for i in range(4))),6,9,Error,None of the above,14,14,14 is correct based on how this feature behaves in Python. +220,What is the output of print(sum(i*i for i in range(3))),9,5,3,4,None of the above,5,5 is correct based on how this feature behaves in Python. +221,What does contextlib.contextmanager do,Creates a thread safe lock automatically,Turns a generator function into a context manager using yield to split setup and teardown,Writes context logs to syslog,Provides async context management only,Registers cleanup to run at interpreter shutdown only,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. +222,What is the output of print(sum(i*i for i in range(6))),25,None of the above,55,Error,15,55,55 is correct based on how this feature behaves in Python. +223,What is the value of s=pythonista then print(s[1:3]),yt,pyt,ythonista,yth,None of the above,yt,yt is correct based on how this feature behaves in Python. +224,What is the output of print(sum(i*i for i in range(6))),36,Error,None of the above,25,55,55,55 is correct based on how this feature behaves in Python. +225,What is the output of print([i for i in range(3)] is [0 1 2]),[0 1 2],TRUE,Error,None of the above,FALSE,FALSE,False is correct based on how this feature behaves in Python. +226,What is the output of print(sum(i*i for i in range(5))),10,Error,None of the above,25,30,30,Squares 0 1 4 9 16 add up to 30. +227,What is the output of print({1 2 3} < {1 2 3 4}),Error,None of the above,[],TRUE,FALSE,TRUE,True is correct based on how this feature behaves in Python. +228,What is the output of print(sum(i*i for i in range(6))),15,55,36,Error,None of the above,55,55 is correct based on how this feature behaves in Python. +229,What is the output of print(sum(i*i for i in range(6))),15,36,None of the above,25,55,55,55 is correct based on how this feature behaves in Python. +230,What does contextlib.contextmanager do,Writes context logs to syslog,Provides async context management only,Creates a thread safe lock automatically,Turns a generator function into a context manager using yield to split setup and teardown,Registers cleanup to run at interpreter shutdown only,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. +231,What is the value of s=pythonista then print(s[1:3]),pyt,ythonista,yt,t,yth,yt,yt is correct based on how this feature behaves in Python. +232,What is the value of s=pythonista then print(s[3:6]),python,hon,on,honista,None of the above,hon,hon is correct based on how this feature behaves in Python. +233,What is the output of print(sum(i*i for i in range(6))),55,Error,15,36,None of the above,55,55 is correct based on how this feature behaves in Python. +234,What is the output of print(sum(i*i for i in range(4))),6,9,16,14,Error,14,14 is correct based on how this feature behaves in Python. +235,What is the output of print(sum(i*i for i in range(3))),Error,4,None of the above,5,3,5,5 is correct based on how this feature behaves in Python. +236,What is the output of print(sum(i*i for i in range(3))),Error,5,3,9,None of the above,5,5 is correct based on how this feature behaves in Python. +237,What is output of print(bool(object())),None of the above,0,TRUE,None,Error,TRUE,Any object instance is truthy so bool is True. +238,What is the output of print(sum(i*i for i in range(6))),55,None of the above,25,Error,36,55,55 is correct based on how this feature behaves in Python. +239,What is the value of s=pythonista then print(s[1:6]),python,None of the above,ythonista,ython,ythoni,ython,ython is correct based on how this feature behaves in Python. +240,What is the output of print(sum(i*i for i in range(3))),4,9,None of the above,Error,5,5,5 is correct based on how this feature behaves in Python. +241,What is the output of print(sum(i*i for i in range(3))),None of the above,9,Error,5,3,5,5 is correct based on how this feature behaves in Python. +242,What is the output of print(sum(i*i for i in range(4))),16,14,9,6,None of the above,14,14 is correct based on how this feature behaves in Python. +243,What is the output of print(sum(i*i for i in range(6))),Error,15,36,55,25,55,55 is correct based on how this feature behaves in Python. +244,What is the value of s=pythonista then print(s[3:8]),None of the above,honista,onis,honis,pythonis,honis,honis is correct based on how this feature behaves in Python. +245,What is the value of s=pythonista then print(s[1:4]),ytho,pyth,ythonista,yth,th,yth,yth is correct based on how this feature behaves in Python. +246,What does contextlib.contextmanager do,Creates a thread safe lock automatically,Registers cleanup to run at interpreter shutdown only,Writes context logs to syslog,Provides async context management only,Turns a generator function into a context manager using yield to split setup and teardown,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. +247,Which statement about descriptors is correct,Descriptors can only be used with metaclasses,Descriptors require slots to be enabled,Descriptors are only available in C extensions,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Descriptors work only on built in types,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Implementing __get__ __set__ or __delete__ lets an object control attribute access. +248,Which method makes an object usable in a with statement,__iter__ and __next__,__enter__ and __exit__,__init__ and __del__,__aenter__ and __aexit__ only,__get__ and __set__,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. +249,Which statement about float NaN is correct,None of the above,NaN compares greater than all numbers,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is equal to 0 0 by default,NaN sorts to the beginning in all Python sorts,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. +250,What is the value of s=pythonista then print(s[3:5]),ho,None of the above,o,hon,honista,ho,ho is correct based on how this feature behaves in Python. +251,What is the output of print(sum(i*i for i in range(6))),Error,36,25,None of the above,55,55,55 is correct based on how this feature behaves in Python. +252,Which statement about mutable default arguments is correct,Only dict defaults are shared lists are not,A list used as a default parameter is shared across calls which can cause surprising bugs,This happens only in Python 2 not Python 3,None of the above,Defaults are re evaluated on each call so this is safe,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. +253,What is the output of print(sum(i*i for i in range(3))),None of the above,9,Error,5,4,5,5 is correct based on how this feature behaves in Python. +254,What is the output of print(sum(i*i for i in range(7))),49,Error,21,None of the above,91,91,91 is correct based on how this feature behaves in Python. +255,In typing what does Protocol represent,A network protocol implementation,A runtime enforced interface,A final class that cannot be subclassed,A metaclass for ABCs,A structural type based on method signatures rather than concrete inheritance,A structural type based on method signatures rather than concrete inheritance,Protocol checks that a type has the right methods regardless of its base classes. +256,What is output of print({}.setdefault(x [])),{},[x],None,[],KeyError,[],[] is correct based on how this feature behaves in Python. +257,What is the value of s=pythonista then print(s[3:8]),pythonis,None of the above,honista,onis,honis,honis,honis is correct based on how this feature behaves in Python. +258,What does itertools.groupby require to group equal keys correctly,The key function must return unique values,The values must be numbers,The input must be pre sorted by the same key function,The keys must be strings,The input must be a list not an iterator,The input must be pre sorted by the same key function,groupby only groups adjacent equal keys so you must sort first. +259,What is the output of print(sum(i*i for i in range(6))),15,None of the above,55,Error,36,55,55 is correct based on how this feature behaves in Python. +260,What is the value of s=pythonista then print(s[0:2]),pythonista,pyt,None of the above,py,y,py,py is correct based on how this feature behaves in Python. +261,What is the output of print(sum(i*i for i in range(6))),36,None of the above,25,55,Error,55,55 is correct based on how this feature behaves in Python. +262,What is the output of print(sum(i*i for i in range(3))),9,Error,None of the above,5,4,5,5 is correct based on how this feature behaves in Python. +263,What is the value of s=pythonista then print(s[0:5]),None of the above,pytho,ytho,pythonista,python,pytho,pytho is correct based on how this feature behaves in Python. +264,What is the output of print(sum(i*i for i in range(5))),30,Error,10,None of the above,25,30,Squares 0 1 4 9 16 add up to 30. +265,What is the output of print(sum(i*i for i in range(3))),5,3,4,Error,None of the above,5,5 is correct based on how this feature behaves in Python. +266,What is the value of s=pythonista then print(s[3:7]),honis,honi,honista,oni,None of the above,honi,honi is correct based on how this feature behaves in Python. +267,Which description of asyncio.gather is accurate,None of the above,Blocks the event loop until all tasks finish via time sleep,Starts new processes for each task,Runs multiple awaitables concurrently and aggregates their results,Cancels all tasks on the first exception always,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. +268,What is the output of print(sum(i*i for i in range(7))),36,21,91,49,None of the above,91,91 is correct based on how this feature behaves in Python. +269,What is the output of print(sum(i*i for i in range(5))),30,Error,25,None of the above,16,30,Squares 0 1 4 9 16 add up to 30. +270,What does print((x:=len([1 2 3])) == 3 and x) output,None,None of the above,len list,3,TRUE,3,3 is correct based on how this feature behaves in Python. +271,In typing what does Protocol represent,A structural type based on method signatures rather than concrete inheritance,A final class that cannot be subclassed,A runtime enforced interface,A metaclass for ABCs,A network protocol implementation,A structural type based on method signatures rather than concrete inheritance,Protocol checks that a type has the right methods regardless of its base classes. +272,What is the output of print(sum(i*i for i in range(4))),Error,14,None of the above,9,6,14,14 is correct based on how this feature behaves in Python. +273,What does dataclass frozen True guarantee,Only __repr__ is generated not __init__,All nested objects also become immutable automatically,Hash is always disabled,Instances are immutable and fields cannot be reassigned,Only new fields cannot be added but existing fields can change,Instances are immutable and fields cannot be reassigned,frozen dataclasses prevent reassignment to fields making instances immutable. +274,What is the value of s=pythonista then print(s[0:2]),pyt,None of the above,y,py,pythonista,py,py is correct based on how this feature behaves in Python. +275,What does print((0 and 5) or 7) produce,7,5,None of the above,FALSE,TRUE,7,0 is falsy so or returns the right value 7. +276,What is the output of print(sum(i*i for i in range(4))),Error,None of the above,14,16,9,14,14 is correct based on how this feature behaves in Python. +277,What does print((x:=len([1 2 3])) == 3 and x) output,3,TRUE,None of the above,len list,FALSE,3,3 is correct based on how this feature behaves in Python. +278,What does print(all([])) return,0,None,TRUE,None of the above,Error,TRUE,all of an empty iterable is True by definition vacuously true. +279,What is the value of s=pythonista then print(s[1:4]),ythonista,None of the above,pyth,th,yth,yth,yth is correct based on how this feature behaves in Python. +280,What is the output of print(sum(i*i for i in range(5))),16,10,30,Error,25,30,Squares 0 1 4 9 16 add up to 30. +281,What is the value of s=pythonista then print(s[2:6]),thon,python,hon,thonista,thoni,thon,thon is correct based on how this feature behaves in Python. +282,What is the output of print(sum(i*i for i in range(4))),6,16,14,Error,9,14,14 is correct based on how this feature behaves in Python. +283,Which method makes an object usable in a with statement,__enter__ and __exit__,__get__ and __set__,__init__ and __del__,__iter__ and __next__,__aenter__ and __aexit__ only,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. +284,What is the output of print(sum(i*i for i in range(7))),91,36,21,49,Error,91,91 is correct based on how this feature behaves in Python. +285,What is the output of print(sum(i*i for i in range(6))),Error,36,55,15,None of the above,55,55 is correct based on how this feature behaves in Python. +286,What is the output of print(sum(i*i for i in range(6))),55,25,None of the above,15,Error,55,55 is correct based on how this feature behaves in Python. +287,What is the value of s=pythonista then print(s[1:6]),ython,ythoni,None of the above,thon,python,ython,ython is correct based on how this feature behaves in Python. +288,What is a closure in Python,A function that closes files automatically,A class method bound to an instance,A lambda with no parameters,A function that captures variables from an enclosing scope even after that scope has finished,A function defined inside __init__ only,A function that captures variables from an enclosing scope even after that scope has finished,Closures remember variables from surrounding scope so they keep working after the scope ends. +289,What is the output of print({1 2 3} < {1 2 3 4}),Error,None of the above,TRUE,[],0,TRUE,True is correct based on how this feature behaves in Python. +290,What is the output of print(sum(i*i for i in range(5))),30,None of the above,25,16,Error,30,Squares 0 1 4 9 16 add up to 30. +291,Which statement about float NaN is correct,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN compares greater than all numbers,NaN is equal to 0 0 by default,NaN sorts to the beginning in all Python sorts,NaN is treated as None by min and max,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. +292,What is the value of s=pythonista then print(s[0:4]),None of the above,pytho,pyth,yth,pythonista,pyth,pyth is correct based on how this feature behaves in Python. +293,What is the value of s=pythonista then print(s[2:6]),thoni,None of the above,python,hon,thon,thon,thon is correct based on how this feature behaves in Python. +294,Which best describes __getattr__,None of the above,Called when attribute lookup fails allowing dynamic attribute handling,Called when deleting attributes,Called when setting attributes,Called only for private attributes starting with underscore,Called when attribute lookup fails allowing dynamic attribute handling,It fires only when normal lookup fails letting you supply attributes dynamically. +295,What is the output of print({i:i*i for i in range(3)}[2]),2,Error,0,None of the above,4,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. +296,What is the value of s=pythonista then print(s[3:6]),on,None of the above,hon,python,honi,hon,hon is correct based on how this feature behaves in Python. +297,What is the output of print({1 2 3} < {1 2 3 4}),None of the above,[],TRUE,FALSE,0,TRUE,True is correct based on how this feature behaves in Python. +298,Which best describes the Global Interpreter Lock GIL,It disables asyncio,It allows only one thread to execute Python bytecode at a time per process,It blocks C extensions from running in parallel,It locks the entire operating system scheduler,It prevents subprocesses from spawning,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. +299,Which statement about __slots__ is correct,__slots__ speeds up all attribute access always,__slots__ makes a class immutable,__slots__ is required for dataclasses,__slots__ can reduce memory by preventing instance dict creation,__slots__ enables multiple inheritance without MRO,__slots__ can reduce memory by preventing instance dict creation,Slots remove the per instance dict so instances can be smaller. +300,What is the output of print(sum(i*i for i in range(4))),14,None of the above,6,9,16,14,14 is correct based on how this feature behaves in Python. +301,What is the output of print(sum(i*i for i in range(6))),Error,15,55,36,None of the above,55,55 is correct based on how this feature behaves in Python. +302,Which best describes the Global Interpreter Lock GIL,It locks the entire operating system scheduler,It prevents subprocesses from spawning,It allows only one thread to execute Python bytecode at a time per process,It disables asyncio,It blocks C extensions from running in parallel,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. +303,What is the output of print(sum(i*i for i in range(3))),4,Error,5,9,None of the above,5,5 is correct based on how this feature behaves in Python. +304,What is the output of print(sum(i*i for i in range(6))),25,55,36,Error,15,55,55 is correct based on how this feature behaves in Python. +305,What is the output of print(sum(i*i for i in range(7))),91,36,None of the above,21,49,91,91 is correct based on how this feature behaves in Python. +306,What does list({1: a 2: b}) evaluate to,[1 2],[(1 a) (2 b)],[2 1],[1 2],[a b],[1 2],[1 2] is correct based on how this feature behaves in Python. +307,What is the value of s=pythonista then print(s[2:5]),None of the above,tho,thon,pytho,ho,tho,tho is correct based on how this feature behaves in Python. +308,What is the output of print(sum(i*i for i in range(7))),36,91,49,None of the above,21,91,91 is correct based on how this feature behaves in Python. +309,What is the value of s=pythonista then print(s[2:6]),python,thon,thoni,thonista,hon,thon,thon is correct based on how this feature behaves in Python. +310,Which statement about mutable default arguments is correct,A list used as a default parameter is shared across calls which can cause surprising bugs,Defaults are re evaluated on each call so this is safe,The interpreter forbids using lists as defaults,This happens only in Python 2 not Python 3,Only dict defaults are shared lists are not,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. +311,What is the output of print(sum(i*i for i in range(3))),Error,5,9,3,None of the above,5,5 is correct based on how this feature behaves in Python. +312,What is the output of print(sum(i*i for i in range(5))),None of the above,16,Error,30,25,30,Squares 0 1 4 9 16 add up to 30. +313,What is the output of print(sum(i*i for i in range(6))),15,None of the above,25,Error,55,55,55 is correct based on how this feature behaves in Python. +314,What does print(type(range(3)).__name__) output,list,iterator,range,None of the above,tuple,range,range objects have type name range. +315,What is the value of s=pythonista then print(s[0:5]),python,pytho,ytho,None of the above,pythonista,pytho,pytho is correct based on how this feature behaves in Python. +316,What is the output of print(sum(i*i for i in range(5))),16,None of the above,25,Error,30,30,Squares 0 1 4 9 16 add up to 30. +317,What is structural pattern matching match case primarily used for,Replacing if else for arithmetic,Pattern matching only works with strings,Switching on integer constants only,Destructuring and matching data shapes like sequences mappings and classes,Dynamic type casting at runtime,Destructuring and matching data shapes like sequences mappings and classes,match case can unpack and test shapes of data not just values. +318,What is the value of s=pythonista then print(s[0:2]),pythonista,pyt,None of the above,py,y,py,py is correct based on how this feature behaves in Python. +319,What does print((1 2) < (1 3)) produce,None of the above,Error,TRUE,FALSE,0,TRUE,True is correct based on how this feature behaves in Python. +320,What is a closure in Python,A function defined inside __init__ only,A function that captures variables from an enclosing scope even after that scope has finished,A class method bound to an instance,A function that closes files automatically,A lambda with no parameters,A function that captures variables from an enclosing scope even after that scope has finished,Closures remember variables from surrounding scope so they keep working after the scope ends. +321,What is the value of s=pythonista then print(s[2:6]),thon,thonista,thoni,python,None of the above,thon,thon is correct based on how this feature behaves in Python. +322,What is the output of print(sum(i*i for i in range(7))),36,91,21,Error,None of the above,91,91 is correct based on how this feature behaves in Python. +323,What is the output of print(sum(i*i for i in range(3))),None of the above,4,5,9,3,5,5 is correct based on how this feature behaves in Python. +324,What is the output of print(sum(i*i for i in range(7))),21,49,36,None of the above,91,91,91 is correct based on how this feature behaves in Python. +325,What is the output of print(sum(i*i for i in range(4))),6,None of the above,9,16,14,14,14 is correct based on how this feature behaves in Python. +326,What is the value of s=pythonista then print(s[0:2]),pyt,y,pythonista,None of the above,py,py,py is correct based on how this feature behaves in Python. +327,What is the value of s=pythonista then print(s[3:6]),python,honista,None of the above,hon,honi,hon,hon is correct based on how this feature behaves in Python. +328,What is the output of print(sum(i*i for i in range(4))),Error,14,6,9,16,14,14 is correct based on how this feature behaves in Python. +329,What does print(type(range(3)).__name__) output,list,range,None of the above,iterator,generator,range,range objects have type name range. +330,What is the output of print(sum(i*i for i in range(3))),None of the above,5,4,3,9,5,5 is correct based on how this feature behaves in Python. +331,What is the output of print(sum(i*i for i in range(3))),9,Error,4,5,None of the above,5,5 is correct based on how this feature behaves in Python. +332,What is the output of print(sum(i*i for i in range(4))),None of the above,Error,9,14,6,14,14 is correct based on how this feature behaves in Python. +333,Which statement about mutable default arguments is correct,Only dict defaults are shared lists are not,Defaults are re evaluated on each call so this is safe,This happens only in Python 2 not Python 3,None of the above,A list used as a default parameter is shared across calls which can cause surprising bugs,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. +334,What is the output of print(sum(i*i for i in range(5))),30,Error,25,10,None of the above,30,Squares 0 1 4 9 16 add up to 30. +335,What is a closure in Python,A function that captures variables from an enclosing scope even after that scope has finished,A class method bound to an instance,A lambda with no parameters,A function defined inside __init__ only,None of the above,A function that captures variables from an enclosing scope even after that scope has finished,Closures remember variables from surrounding scope so they keep working after the scope ends. +336,What is the value of s=pythonista then print(s[0:2]),y,py,pythonista,None of the above,pyt,py,py is correct based on how this feature behaves in Python. +337,What does dataclass frozen True guarantee,Only __repr__ is generated not __init__,Instances are immutable and fields cannot be reassigned,All nested objects also become immutable automatically,Only new fields cannot be added but existing fields can change,None of the above,Instances are immutable and fields cannot be reassigned,frozen dataclasses prevent reassignment to fields making instances immutable. +338,What is the output of print(sum(i*i for i in range(6))),25,15,55,Error,36,55,55 is correct based on how this feature behaves in Python. +339,What is the output of print({i:i*i for i in range(3)}[2]),3,Error,2,4,None of the above,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. +340,Which built in is most appropriate for a stable sort with a custom key,heapq.nsmallest for all elements,list.sort without key,bisect.insort for unsorted lists,reversed then sort,sorted with the key parameter,sorted with the key parameter,sorted with key keeps equal keys in input order and uses the key for comparisons. +341,What is the output of print(sum(i*i for i in range(6))),Error,None of the above,36,15,55,55,55 is correct based on how this feature behaves in Python. +342,What is the output of print(sum(i*i for i in range(4))),None of the above,14,16,Error,9,14,14 is correct based on how this feature behaves in Python. +343,What is the value of s=pythonista then print(s[2:7]),thoni,thonis,honi,None of the above,pythoni,thoni,thoni is correct based on how this feature behaves in Python. +344,What is the value of s=pythonista then print(s[2:5]),tho,None of the above,ho,pytho,thon,tho,tho is correct based on how this feature behaves in Python. +345,What does contextlib.contextmanager do,Registers cleanup to run at interpreter shutdown only,Turns a generator function into a context manager using yield to split setup and teardown,None of the above,Creates a thread safe lock automatically,Provides async context management only,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. +346,What is the output of print(sum(i*i for i in range(4))),None of the above,6,Error,14,9,14,14 is correct based on how this feature behaves in Python. +347,What is the output of print(sum(i*i for i in range(7))),Error,49,36,91,21,91,91 is correct based on how this feature behaves in Python. +348,What is the output of print(sum(i*i for i in range(6))),25,None of the above,55,15,Error,55,55 is correct based on how this feature behaves in Python. +349,What is the output of print(sum(i*i for i in range(4))),9,Error,14,16,None of the above,14,14 is correct based on how this feature behaves in Python. +350,What is the output of print(sum(i*i for i in range(6))),Error,55,15,None of the above,36,55,55 is correct based on how this feature behaves in Python. +351,What is output of print(a * 0 or b),,FALSE,None of the above,a,b,b,b is correct based on how this feature behaves in Python. +352,What does print(all([])) return,0,None of the above,None,TRUE,Error,TRUE,all of an empty iterable is True by definition vacuously true. +353,What is the output of print({a:1}.get(b) is None),KeyError,0,None of the above,FALSE,TRUE,TRUE,True is correct based on how this feature behaves in Python. +354,What is the output of print(sum(i*i for i in range(5))),None of the above,16,25,Error,30,30,Squares 0 1 4 9 16 add up to 30. +355,What is output of print(bool(object())),0,FALSE,None of the above,TRUE,None,TRUE,Any object instance is truthy so bool is True. +356,What does dataclass frozen True guarantee,Only new fields cannot be added but existing fields can change,Instances are immutable and fields cannot be reassigned,All nested objects also become immutable automatically,Only __repr__ is generated not __init__,None of the above,Instances are immutable and fields cannot be reassigned,frozen dataclasses prevent reassignment to fields making instances immutable. +357,What is the value of s=pythonista then print(s[1:5]),pytho,ythonista,None of the above,ytho,tho,ytho,ytho is correct based on how this feature behaves in Python. +358,What is the output of print(sum(i*i for i in range(5))),10,30,Error,16,25,30,Squares 0 1 4 9 16 add up to 30. +359,What is the result of s=abba; print(s.replace(b bb 1)),abbba,abbaa,a bb a,None of the above,abba,abbba,replace with count 1 replaces only the first match so one b becomes bb. +360,What is the output of print(tuple(map(lambda x:x+1 (1 2)))),[2 3],(2 3 4),(2 3),None of the above,(1 2 3),(2 3),(2 3) is correct based on how this feature behaves in Python. +361,What is the output of print(sum(i*i for i in range(5))),30,25,Error,None of the above,16,30,Squares 0 1 4 9 16 add up to 30. +362,Which statement about mutable default arguments is correct,Defaults are re evaluated on each call so this is safe,This happens only in Python 2 not Python 3,Only dict defaults are shared lists are not,The interpreter forbids using lists as defaults,A list used as a default parameter is shared across calls which can cause surprising bugs,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. +363,What is the output of print(sum(i*i for i in range(3))),Error,4,9,3,5,5,5 is correct based on how this feature behaves in Python. +364,What is the value of s=pythonista then print(s[1:5]),ython,tho,ythonista,ytho,pytho,ytho,ytho is correct based on how this feature behaves in Python. +365,What is the output of print(sum(i*i for i in range(6))),15,55,25,36,Error,55,55 is correct based on how this feature behaves in Python. +366,What is the value of s=pythonista then print(s[1:4]),th,ytho,ythonista,None of the above,yth,yth,yth is correct based on how this feature behaves in Python. +367,In typing what does Protocol represent,A final class that cannot be subclassed,A runtime enforced interface,A structural type based on method signatures rather than concrete inheritance,A network protocol implementation,A metaclass for ABCs,A structural type based on method signatures rather than concrete inheritance,Protocol checks that a type has the right methods regardless of its base classes. +368,What does print((1 2) < (1 3)) produce,TRUE,Error,None of the above,None,0,TRUE,True is correct based on how this feature behaves in Python. +369,What is the value of s=pythonista then print(s[1:5]),ythonista,tho,ython,None of the above,ytho,ytho,ytho is correct based on how this feature behaves in Python. +370,What is the value of s=pythonista then print(s[3:5]),hon,ho,None of the above,o,honista,ho,ho is correct based on how this feature behaves in Python. +371,What is the value of s=pythonista then print(s[1:6]),ythoni,ython,thon,ythonista,python,ython,ython is correct based on how this feature behaves in Python. +372,What does print((0 and 5) or 7) produce,7,None of the above,TRUE,0,5,7,0 is falsy so or returns the right value 7. +373,What is the value of s=pythonista then print(s[2:6]),None of the above,thonista,thon,python,hon,thon,thon is correct based on how this feature behaves in Python. +374,What is the value of s=pythonista then print(s[0:4]),pytho,None of the above,yth,pythonista,pyth,pyth,pyth is correct based on how this feature behaves in Python. +375,What is the output of print(sum(i*i for i in range(5))),30,10,None of the above,16,25,30,Squares 0 1 4 9 16 add up to 30. +376,What is the output of print(sum(i*i for i in range(4))),Error,9,14,16,None of the above,14,14 is correct based on how this feature behaves in Python. +377,What is the value of s=pythonista then print(s[3:5]),hon,ho,None of the above,honista,o,ho,ho is correct based on how this feature behaves in Python. +378,What is the value of s=pythonista then print(s[0:4]),pythonista,None of the above,pyth,pytho,yth,pyth,pyth is correct based on how this feature behaves in Python. +379,Which method makes an object usable in a with statement,__iter__ and __next__,__enter__ and __exit__,__aenter__ and __aexit__ only,__get__ and __set__,__init__ and __del__,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. +380,What is the value of s=pythonista then print(s[3:5]),o,hon,honista,None of the above,ho,ho,ho is correct based on how this feature behaves in Python. +381,What is the value of s=pythonista then print(s[1:6]),ython,ythonista,thon,python,None of the above,ython,ython is correct based on how this feature behaves in Python. +382,What is the output of print(sum(i*i for i in range(7))),None of the above,49,21,91,36,91,91 is correct based on how this feature behaves in Python. +383,What is the value of s=pythonista then print(s[3:6]),python,None of the above,hon,honi,on,hon,hon is correct based on how this feature behaves in Python. +384,What is the value of s=pythonista then print(s[1:6]),ython,thon,ythoni,python,None of the above,ython,ython is correct based on how this feature behaves in Python. +385,What is the output of print(sum(i*i for i in range(6))),55,36,Error,None of the above,25,55,55 is correct based on how this feature behaves in Python. +386,Which built in is most appropriate for a stable sort with a custom key,bisect.insort for unsorted lists,list.sort without key,sorted with the key parameter,reversed then sort,heapq.nsmallest for all elements,sorted with the key parameter,sorted with key keeps equal keys in input order and uses the key for comparisons. +387,What is the output of print(sum(i*i for i in range(3))),5,9,None of the above,4,3,5,5 is correct based on how this feature behaves in Python. +388,What is the output of print(sum(i*i for i in range(7))),49,Error,91,21,36,91,91 is correct based on how this feature behaves in Python. +389,What is structural pattern matching match case primarily used for,Replacing if else for arithmetic,Switching on integer constants only,Destructuring and matching data shapes like sequences mappings and classes,Pattern matching only works with strings,Dynamic type casting at runtime,Destructuring and matching data shapes like sequences mappings and classes,match case can unpack and test shapes of data not just values. +390,What does functools.lru_cache do,Parallelizes the function across threads,Converts a function into a generator,Caches function results keyed by arguments to avoid recomputation,Stores results only for keyword arguments,Validates argument types at runtime,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. +391,What is the output of print(sum(i*i for i in range(4))),9,None of the above,Error,6,14,14,14 is correct based on how this feature behaves in Python. +392,What is the output of print(sum(i*i for i in range(6))),None of the above,25,36,55,15,55,55 is correct based on how this feature behaves in Python. +393,What is the value of s=pythonista then print(s[3:8]),pythonis,honis,None of the above,honista,honist,honis,honis is correct based on how this feature behaves in Python. +394,What is the output of print(sum(i*i for i in range(3))),5,4,None of the above,9,Error,5,5 is correct based on how this feature behaves in Python. +395,What is the output of print(sum(i*i for i in range(7))),21,Error,49,None of the above,91,91,91 is correct based on how this feature behaves in Python. +396,Which statement about list vs deque is accurate,deque provides faster appends and pops from both ends while list is fast at random access,list is always faster than deque for all operations,deque supports O1 random indexing,deque cannot be iterated,list has O1 inserts at the front,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. +397,What is the value of s=pythonista then print(s[0:4]),pyth,pythonista,pytho,None of the above,yth,pyth,pyth is correct based on how this feature behaves in Python. +398,What is the value of s=pythonista then print(s[3:8]),pythonis,honista,None of the above,honis,onis,honis,honis is correct based on how this feature behaves in Python. +399,What does the walrus operator do,It declares a type hint,It performs integer division,It assigns and returns a value inside an expression,It defines a lambda,It creates a context manager,It assigns and returns a value inside an expression,Walrus operator lets you assign a value as part of an expression. +400,Which statement about list vs deque is accurate,list has O1 inserts at the front,deque cannot be iterated,deque supports O1 random indexing,deque provides faster appends and pops from both ends while list is fast at random access,list is always faster than deque for all operations,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. +401,What is the output of print(sum(i*i for i in range(5))),25,10,None of the above,30,Error,30,Squares 0 1 4 9 16 add up to 30. +402,What is the value of s=pythonista then print(s[3:8]),honis,None of the above,pythonis,onis,honista,honis,honis is correct based on how this feature behaves in Python. +403,What is the value of s=pythonista then print(s[2:5]),None of the above,thonista,thon,pytho,tho,tho,tho is correct based on how this feature behaves in Python. +404,What is the output of print(sum(i*i for i in range(4))),16,9,14,Error,None of the above,14,14 is correct based on how this feature behaves in Python. +405,What is the output of print({i:i*i for i in range(3)}[2]),0,Error,3,4,2,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. +406,What is the value of s=pythonista then print(s[1:3]),ythonista,yt,pyt,t,None of the above,yt,yt is correct based on how this feature behaves in Python. +407,What is the output of print(-3//2),-2,2,None of the above,0,-1,-2,Floor division rounds toward negative infinity so result is -2. +408,What is the output of print(sum(i*i for i in range(4))),14,None of the above,6,16,Error,14,14 is correct based on how this feature behaves in Python. +409,Which statement about list vs deque is accurate,list is always faster than deque for all operations,deque cannot be iterated,list has O1 inserts at the front,deque supports O1 random indexing,deque provides faster appends and pops from both ends while list is fast at random access,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. +410,What is the value of s=pythonista then print(s[3:8]),honist,honis,onis,honista,pythonis,honis,honis is correct based on how this feature behaves in Python. +411,What is the value of s=pythonista then print(s[2:6]),thoni,thonista,hon,python,thon,thon,thon is correct based on how this feature behaves in Python. +412,What is the value of s=pythonista then print(s[0:3]),pythonista,yt,pyth,None of the above,pyt,pyt,pyt is correct based on how this feature behaves in Python. +413,What does print((0 and 5) or 7) produce,FALSE,7,5,None of the above,0,7,0 is falsy so or returns the right value 7. +414,What is the output of print(sum(i*i for i in range(3))),9,5,3,None of the above,Error,5,5 is correct based on how this feature behaves in Python. +415,What is the result of s=abba; print(s.replace(b bb 1)),None of the above,abbba,abbaa,abbbba,abba,abbba,replace with count 1 replaces only the first match so one b becomes bb. +416,What is the value of s=pythonista then print(s[1:4]),None of the above,pyth,yth,ytho,th,yth,yth is correct based on how this feature behaves in Python. +417,What is the output of print(sum(i*i for i in range(3))),9,None of the above,5,3,4,5,5 is correct based on how this feature behaves in Python. +418,What is the output of print(sum(i*i for i in range(5))),30,25,10,Error,16,30,Squares 0 1 4 9 16 add up to 30. +419,What is the output of print(sum(i*i for i in range(5))),None of the above,Error,10,30,16,30,Squares 0 1 4 9 16 add up to 30. +420,What is the value of s=pythonista then print(s[2:5]),thonista,thon,tho,ho,pytho,tho,tho is correct based on how this feature behaves in Python. +421,What is the output of print(sum(i*i for i in range(6))),25,36,None of the above,Error,55,55,55 is correct based on how this feature behaves in Python. +422,What is the value of s=pythonista then print(s[2:6]),python,thoni,thonista,thon,None of the above,thon,thon is correct based on how this feature behaves in Python. +423,What is the value of s=pythonista then print(s[2:6]),python,None of the above,thon,thoni,hon,thon,thon is correct based on how this feature behaves in Python. +424,Which description of asyncio.gather is accurate,Blocks the event loop until all tasks finish via time sleep,Guarantees order of completion equals input order,Cancels all tasks on the first exception always,Runs multiple awaitables concurrently and aggregates their results,Starts new processes for each task,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. +425,What is the value of s=pythonista then print(s[0:4]),pytho,pythonista,pyth,None of the above,yth,pyth,pyth is correct based on how this feature behaves in Python. +426,What is output of print(bool(object())),0,FALSE,None of the above,TRUE,None,TRUE,Any object instance is truthy so bool is True. +427,What is the output of print(sum(i*i for i in range(6))),15,None of the above,55,25,Error,55,55 is correct based on how this feature behaves in Python. +428,What does bisect.insort do,Builds a heap from a list,Removes duplicates from a list,Sorts a list in place using mergesort,Inserts an item into a sorted list keeping it sorted,Performs a binary search returning an index only,Inserts an item into a sorted list keeping it sorted,insort inserts while keeping the list sorted using binary search. +429,What is the value of s=pythonista then print(s[3:5]),None of the above,o,pytho,hon,ho,ho,ho is correct based on how this feature behaves in Python. +430,What is the output of print(sum(i*i for i in range(4))),6,14,16,9,Error,14,14 is correct based on how this feature behaves in Python. +431,Which best describes __getattr__,None of the above,Called when attribute lookup fails allowing dynamic attribute handling,Called for every attribute access always,Called only for private attributes starting with underscore,Called when deleting attributes,Called when attribute lookup fails allowing dynamic attribute handling,It fires only when normal lookup fails letting you supply attributes dynamically. +432,Which statement about decorators is accurate,A decorator always speeds up function execution,A decorator must be a class not a function,A decorator changes the function name at runtime in CPython,A decorator can only be applied to async functions,A decorator wraps a function to modify behavior without changing the function code,A decorator wraps a function to modify behavior without changing the function code,A decorator takes a function and returns a new callable that adds behavior around it. +433,What is the value of s=pythonista then print(s[2:6]),hon,python,thoni,None of the above,thon,thon,thon is correct based on how this feature behaves in Python. +434,Which statement about float NaN is correct,NaN is treated as None by min and max,NaN is equal to 0 0 by default,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN compares greater than all numbers,NaN sorts to the beginning in all Python sorts,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. +435,What is the output of print(sum(i*i for i in range(7))),21,49,91,36,None of the above,91,91 is correct based on how this feature behaves in Python. +436,What is the output of print({i:i*i for i in range(3)}[2]),3,2,4,None of the above,0,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. +437,What is the value of s=pythonista then print(s[1:6]),python,ythoni,ython,None of the above,ythonista,ython,ython is correct based on how this feature behaves in Python. +438,What does functools.lru_cache do,Stores results only for keyword arguments,Parallelizes the function across threads,Validates argument types at runtime,Converts a function into a generator,Caches function results keyed by arguments to avoid recomputation,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. +439,What is the value of s=pythonista then print(s[0:4]),pythonista,yth,pytho,pyth,None of the above,pyth,pyth is correct based on how this feature behaves in Python. +440,What does bisect.insort do,Inserts an item into a sorted list keeping it sorted,Builds a heap from a list,Performs a binary search returning an index only,Sorts a list in place using mergesort,Removes duplicates from a list,Inserts an item into a sorted list keeping it sorted,insort inserts while keeping the list sorted using binary search. +441,What does print((0 and 5) or 7) produce,5,0,FALSE,7,TRUE,7,0 is falsy so or returns the right value 7. +442,What is the output of print(sum(i*i for i in range(4))),16,14,None of the above,9,Error,14,14 is correct based on how this feature behaves in Python. +443,What is the output of print(sum(i*i for i in range(7))),Error,49,91,36,None of the above,91,91 is correct based on how this feature behaves in Python. +444,What is the value of s=pythonista then print(s[3:7]),honis,oni,pythoni,honi,honista,honi,honi is correct based on how this feature behaves in Python. +445,What is output of print({}.setdefault(x [])),{},None of the above,[],KeyError,None,[],[] is correct based on how this feature behaves in Python. +446,What is the output of print(sum(i*i for i in range(7))),21,Error,49,36,91,91,91 is correct based on how this feature behaves in Python. +447,What is the result of print(dict.fromkeys(aba 0)),{a: 0 b: 0},None of the above,{a:0 b:0 a:0},{b:0},{a: 0},{a: 0 b: 0},{a: 0 b: 0} is correct based on how this feature behaves in Python. +448,What is the value of s=pythonista then print(s[0:3]),pythonista,None of the above,pyth,pyt,yt,pyt,pyt is correct based on how this feature behaves in Python. +449,What is the output of print(sum(i*i for i in range(4))),14,None of the above,Error,9,16,14,14 is correct based on how this feature behaves in Python. +450,Which statement about __slots__ is correct,__slots__ speeds up all attribute access always,__slots__ can reduce memory by preventing instance dict creation,__slots__ enables multiple inheritance without MRO,__slots__ is required for dataclasses,__slots__ makes a class immutable,__slots__ can reduce memory by preventing instance dict creation,Slots remove the per instance dict so instances can be smaller. +451,What is the output of print(-3//2),None of the above,0,-2,1,-1,-2,Floor division rounds toward negative infinity so result is -2. +452,What is the output of print({a:1}.get(b) is None),None of the above,TRUE,KeyError,FALSE,None,TRUE,True is correct based on how this feature behaves in Python. +453,What is the output of print(sum(i*i for i in range(5))),10,16,25,Error,30,30,Squares 0 1 4 9 16 add up to 30. +454,What does print(type(range(3)).__name__) output,range,None of the above,tuple,iterator,generator,range,range objects have type name range. +455,What is the result of s=abba; print(s.replace(b bb 1)),abba,abbaa,abbba,None of the above,a bb a,abbba,replace with count 1 replaces only the first match so one b becomes bb. +456,What is the value of s=pythonista then print(s[3:8]),honista,pythonis,honist,honis,onis,honis,honis is correct based on how this feature behaves in Python. +457,What is the value of s=pythonista then print(s[2:7]),thonis,honi,thonista,pythoni,thoni,thoni,thoni is correct based on how this feature behaves in Python. +458,What is the output of print(sum(i*i for i in range(6))),Error,25,55,36,15,55,55 is correct based on how this feature behaves in Python. +459,Which description of asyncio.gather is accurate,Cancels all tasks on the first exception always,Blocks the event loop until all tasks finish via time sleep,Runs multiple awaitables concurrently and aggregates their results,Guarantees order of completion equals input order,Starts new processes for each task,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. +460,What does the walrus operator do,It creates a context manager,It assigns and returns a value inside an expression,It defines a lambda,It performs integer division,It declares a type hint,It assigns and returns a value inside an expression,Walrus operator lets you assign a value as part of an expression. +461,What is the result of print(dict.fromkeys(aba 0)),{b:0},{a: 0 b: 0},None of the above,{a:0 b:0 c:0},{a:0 b:0 a:0},{a: 0 b: 0},{a: 0 b: 0} is correct based on how this feature behaves in Python. +462,What is the value of s=pythonista then print(s[3:5]),honista,hon,ho,o,None of the above,ho,ho is correct based on how this feature behaves in Python. +463,Which best describes the Global Interpreter Lock GIL,It blocks C extensions from running in parallel,It disables asyncio,It allows only one thread to execute Python bytecode at a time per process,It locks the entire operating system scheduler,It prevents subprocesses from spawning,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. +464,What is the value of s=pythonista then print(s[3:8]),honis,onis,honista,None of the above,honist,honis,honis is correct based on how this feature behaves in Python. +465,What is the value of s=pythonista then print(s[3:8]),onis,None of the above,honist,pythonis,honis,honis,honis is correct based on how this feature behaves in Python. +466,What is the value of s=pythonista then print(s[1:3]),None of the above,ythonista,t,yt,pyt,yt,yt is correct based on how this feature behaves in Python. +467,Which statement about __slots__ is correct,__slots__ is required for dataclasses,__slots__ speeds up all attribute access always,__slots__ can reduce memory by preventing instance dict creation,__slots__ enables multiple inheritance without MRO,__slots__ makes a class immutable,__slots__ can reduce memory by preventing instance dict creation,Slots remove the per instance dict so instances can be smaller. +468,What is the value of s=pythonista then print(s[1:6]),python,ython,ythonista,None of the above,ythoni,ython,ython is correct based on how this feature behaves in Python. +469,What is the value of s=pythonista then print(s[2:4]),None of the above,tho,th,h,pyth,th,th is correct based on how this feature behaves in Python. +470,What is the value of s=pythonista then print(s[1:4]),None of the above,yth,pyth,ythonista,ytho,yth,yth is correct based on how this feature behaves in Python. +471,What does print((x:=len([1 2 3])) == 3 and x) output,None of the above,len list,3,None,FALSE,3,3 is correct based on how this feature behaves in Python. +472,What is the value of s=pythonista then print(s[1:4]),ythonista,pyth,th,yth,ytho,yth,yth is correct based on how this feature behaves in Python. +473,What does print(all([])) return,None,Error,TRUE,0,None of the above,TRUE,all of an empty iterable is True by definition vacuously true. +474,What is the output of print(sum(i*i for i in range(7))),Error,21,91,49,36,91,91 is correct based on how this feature behaves in Python. +475,What is the output of print(sum(i*i for i in range(3))),4,None of the above,9,5,Error,5,5 is correct based on how this feature behaves in Python. +476,What is the output of print(tuple(map(lambda x:x+1 (1 2)))),[2 3],(1 2 3),(2 3 4),(1 3),(2 3),(2 3),(2 3) is correct based on how this feature behaves in Python. +477,What does print((x:=len([1 2 3])) == 3 and x) output,None,3,None of the above,FALSE,len list,3,3 is correct based on how this feature behaves in Python. +478,What is the output of print(sum(i*i for i in range(6))),25,Error,None of the above,55,36,55,55 is correct based on how this feature behaves in Python. +479,What is the output of print(sum(i*i for i in range(4))),14,9,Error,16,None of the above,14,14 is correct based on how this feature behaves in Python. +480,Which statement about mutable default arguments is correct,A list used as a default parameter is shared across calls which can cause surprising bugs,The interpreter forbids using lists as defaults,Defaults are re evaluated on each call so this is safe,Only dict defaults are shared lists are not,This happens only in Python 2 not Python 3,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. +481,What is the output of print(sum(i*i for i in range(7))),91,21,36,Error,None of the above,91,91 is correct based on how this feature behaves in Python. +482,What is the value of s=pythonista then print(s[0:4]),pythonista,None of the above,pytho,pyth,yth,pyth,pyth is correct based on how this feature behaves in Python. +483,What is the output of print({a:1}.get(b) is None),None,0,TRUE,KeyError,None of the above,TRUE,True is correct based on how this feature behaves in Python. +484,Which statement about descriptors is correct,Descriptors can only be used with metaclasses,Descriptors work only on built in types,Descriptors require slots to be enabled,Descriptors are only available in C extensions,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Implementing __get__ __set__ or __delete__ lets an object control attribute access. +485,Which statement about descriptors is correct,Descriptors are only available in C extensions,Descriptors can only be used with metaclasses,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,None of the above,Descriptors work only on built in types,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Implementing __get__ __set__ or __delete__ lets an object control attribute access. +486,Which statement about descriptors is correct,Descriptors can only be used with metaclasses,Descriptors work only on built in types,Descriptors are only available in C extensions,Descriptors require slots to be enabled,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Implementing __get__ __set__ or __delete__ lets an object control attribute access. +487,What is the value of s=pythonista then print(s[2:5]),thon,thonista,tho,None of the above,pytho,tho,tho is correct based on how this feature behaves in Python. +488,What does print((0 and 5) or 7) produce,FALSE,0,None of the above,5,7,7,0 is falsy so or returns the right value 7. +489,What is the output of print(sum(i*i for i in range(7))),91,Error,49,21,None of the above,91,91 is correct based on how this feature behaves in Python. +490,What is the output of print(sum(i*i for i in range(5))),30,None of the above,16,Error,25,30,Squares 0 1 4 9 16 add up to 30. +491,Which method makes an object usable in a with statement,None of the above,__init__ and __del__,__enter__ and __exit__,__aenter__ and __aexit__ only,__get__ and __set__,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. +492,What is the output of print(sum(i*i for i in range(7))),36,91,Error,None of the above,49,91,91 is correct based on how this feature behaves in Python. +493,What is the value of s=pythonista then print(s[3:7]),honis,pythoni,honi,None of the above,oni,honi,honi is correct based on how this feature behaves in Python. +494,What is the output of print(sum(i*i for i in range(4))),None of the above,Error,14,9,16,14,14 is correct based on how this feature behaves in Python. +495,What is the output of print(sum(i*i for i in range(5))),10,16,25,30,None of the above,30,Squares 0 1 4 9 16 add up to 30. +496,What is a closure in Python,A lambda with no parameters,A class method bound to an instance,A function that closes files automatically,A function that captures variables from an enclosing scope even after that scope has finished,A function defined inside __init__ only,A function that captures variables from an enclosing scope even after that scope has finished,Closures remember variables from surrounding scope so they keep working after the scope ends. +497,What is the value of s=pythonista then print(s[0:2]),None of the above,y,pythonista,pyt,py,py,py is correct based on how this feature behaves in Python. +498,What is the value of s=pythonista then print(s[0:4]),yth,pyth,pythonista,pytho,None of the above,pyth,pyth is correct based on how this feature behaves in Python. +499,What is the value of s=pythonista then print(s[1:6]),ython,python,thon,ythoni,ythonista,ython,ython is correct based on how this feature behaves in Python. +500,What does the walrus operator do,It creates a context manager,It performs integer division,It assigns and returns a value inside an expression,It declares a type hint,It defines a lambda,It assigns and returns a value inside an expression,Walrus operator lets you assign a value as part of an expression. diff --git a/quizproject/data/medium.csv b/quizproject/data/medium.csv new file mode 100644 index 0000000..1d0e530 --- /dev/null +++ b/quizproject/data/medium.csv @@ -0,0 +1,501 @@ +Question ID,Question,Option A,Option B,Option C,Option D,Answer,Explanation +1,What is 'python'[1:4]?,tho,yth,ytho,pyt,yth,Slicing from index 1 up to 4 takes the middle chunk yth. +2,What is the output of print(0 * -1)?,1,-1,0,Error,0,"Multiplication of 0 and -1 gives 0, so 0 is right." +3,"What is {1,2} | {2,3}?","{2,3}","{1,2}","{1, 2, 3}",{2},"{1, 2, 3}",Set union combines unique elements from both sets. +4,What is the output of print(-4 * -7)?,29,3,28,Error,28,"Multiplication of -4 and -7 gives 28, so 28 is right." +5,What is 'mississippi'.count('ss')?,2,4,0,1,2,2 is correct because it matches how this feature behaves in Python. +6,What is the output of print(3 * 6)?,Error,18,9,-3,18,"Multiplication of 3 and 6 gives 18, so 18 is right." +7,What is the output of print(-7 * 7)?,-49,-14,-50,-48,-49,"Multiplication of -7 and 7 gives -49, so -49 is right." +8,What is the output of print(-3 * 7)?,Error,-21,-10,4,-21,"Multiplication of -3 and 7 gives -21, so -21 is right." +9,"What is sorted([3,1,2])?","[1,3,2]","[1, 2, 3]",[],"[3,2,1]","[1, 2, 3]","sorted creates and returns a new sorted list, leaving the original alone." +10,What is the output of print(-5 * -5)?,26,24,-10,25,25,"Multiplication of -5 and -5 gives 25, so 25 is right." +11,What is the output of print(2 * 0)?,-1,2,0,Error,0,"Multiplication of 2 and 0 gives 0, so 0 is right." +12,What is the output of print(3 * -9)?,-28,Error,-27,-26,-27,"Multiplication of 3 and -9 gives -27, so -27 is right." +13,What is the output of print(type([]).__name__)?,object,list,dict,tuple,list,"Lists use square brackets and are mutable ordered collections, so their type is list." +14,What is the output of print(2 * 9)?,18,17,11,19,18,"Multiplication of 2 and 9 gives 18, so 18 is right." +15,What is the output of print(-6 * -8)?,48,2,47,49,48,"Multiplication of -6 and -8 gives 48, so 48 is right." +16,What does {x for x in 'aab'} produce length of?,3,0,1,2,2,"A set comprehension keeps unique letters only, so only a and b remain, making the length 2." +17,What is the output of print(-5 * 4)?,-20,-1,Error,-21,-20,"Multiplication of -5 and 4 gives -20, so -20 is right." +18,What is the output of print(2 * 5)?,Error,7,-3,10,10,"Multiplication of 2 and 5 gives 10, so 10 is right." +19,What is the output of print(9 * -8)?,17,1,-72,-73,-72,"Multiplication of 9 and -8 gives -72, so -72 is right." +20,What is the output of print(9 * -4)?,Error,13,-37,-36,-36,"Multiplication of 9 and -4 gives -36, so -36 is right." +21,What is 'python'[1:4]?,ytho,tho,yth,pyt,yth,Slicing from index 1 up to 4 takes the middle chunk yth. +22,What is the output of print(-4 * 1)?,-4,-5,-3,Error,-4,"Multiplication of -4 and 1 gives -4, so -4 is right." +23,What is the output of print(8 * -3)?,-24,11,-23,-25,-24,"Multiplication of 8 and -3 gives -24, so -24 is right." +24,What is the output of print(2 * -7)?,9,-5,-15,-14,-14,"Multiplication of 2 and -7 gives -14, so -14 is right." +25,Which built-in type is immutable?,list,tuple,dict,set,tuple,"Tuples are immutable, so once created their contents cannot be changed." +26,What is the output of print(-7 * 3)?,Error,-4,-10,-21,-21,"Multiplication of -7 and 3 gives -21, so -21 is right." +27,What is the output of print(7 * -2)?,-14,9,Error,-15,-14,"Multiplication of 7 and -2 gives -14, so -14 is right." +28,What is the output of print(2 * -4)?,-8,Error,6,-2,-8,"Multiplication of 2 and -4 gives -8, so -8 is right." +29,What is [i for i in range(3)][-1]?,FALSE,1,2,0,2,2 is correct because it matches how this feature behaves in Python. +30,What is the output of print(-7 * -4)?,-3,28,Error,27,28,"Multiplication of -7 and -4 gives 28, so 28 is right." +31,What is the output of print(-8 * 6)?,-49,-2,Error,-48,-48,"Multiplication of -8 and 6 gives -48, so -48 is right." +32,What is the output of print(-6 * -2)?,Error,-4,13,12,12,"Multiplication of -6 and -2 gives 12, so 12 is right." +33,What is ''.strip()?,'' '',None,,' ',,nan is correct because it matches how this feature behaves in Python. +34,What is the output of print(-8 * -7)?,-1,56,-15,Error,56,"Multiplication of -8 and -7 gives 56, so 56 is right." +35,What is the output of print(5 * -3)?,Error,-15,-16,2,-15,"Multiplication of 5 and -3 gives -15, so -15 is right." +36,What is the output of print(-1 * 8)?,Error,-7,7,-8,-8,"Multiplication of -1 and 8 gives -8, so -8 is right." +37,What is the output of print(-1 * -1)?,Error,2,1,-2,1,"Multiplication of -1 and -1 gives 1, so 1 is right." +38,What is the output of print(-9 * -2)?,18,-11,19,-7,18,"Multiplication of -9 and -2 gives 18, so 18 is right." +39,What does bool('') return?,0,None,TRUE,FALSE,FALSE,"Empty strings are falsy in Python, so bool of an empty string is False." +40,What is the output of print(-8 * 4)?,-33,-12,-32,-4,-32,"Multiplication of -8 and 4 gives -32, so -32 is right." +41,What is the output of print(0 * 8)?,0,8,-1,1,0,"Multiplication of 0 and 8 gives 0, so 0 is right." +42,What is tuple('ab')?,('ab'),FALSE,"['a','b']","('a', 'b')","('a', 'b')","('a', 'b') is correct because it matches how this feature behaves in Python." +43,What is the output of print(6 * 0)?,Error,6,0,1,0,"Multiplication of 6 and 0 gives 0, so 0 is right." +44,What is the output of print(-4 * 8)?,Error,-12,4,-32,-32,"Multiplication of -4 and 8 gives -32, so -32 is right." +45,What is the output of print(-5 * 5)?,0,-26,-25,-24,-25,"Multiplication of -5 and 5 gives -25, so -25 is right." +46,What is the output of print(-8 * 7)?,-56,Error,-1,-15,-56,"Multiplication of -8 and 7 gives -56, so -56 is right." +47,Which statement ensures cleanup for context managers?,defer,with,context,using,with,"with ensures files are closed even if errors happen, which is why it is used for cleanup." +48,What is the output of print(-9 * -5)?,44,Error,46,45,45,"Multiplication of -9 and -5 gives 45, so 45 is right." +49,What is the output of print(1 * 0)?,-1,0,1,Error,0,"Multiplication of 1 and 0 gives 0, so 0 is right." +50,Which function converts an ASCII code point to character?,ascii,ord,repr,chr,chr,chr turns a code point into the corresponding character; ord does the reverse. +51,What is the output of print(8 * -4)?,-32,-31,12,Error,-32,"Multiplication of 8 and -4 gives -32, so -32 is right." +52,What is 'python'.find('z')?,FALSE,Error,None,-1,-1,-1 is correct because it matches how this feature behaves in Python. +53,Which module provides a LRU cache decorator?,toolz,operator,itertools,functools,functools,functools has handy function utilities like lru_cache for memoization. +54,What is the output of print(-9 * -6)?,-3,53,54,Error,54,"Multiplication of -9 and -6 gives 54, so 54 is right." +55,What is 'python'.find('z')?,None,-1,FALSE,0,-1,-1 is correct because it matches how this feature behaves in Python. +56,What is the output of print(8 * 4)?,4,32,Error,12,32,"Multiplication of 8 and 4 gives 32, so 32 is right." +57,What does bool('') return?,None,TRUE,0,FALSE,FALSE,"Empty strings are falsy in Python, so bool of an empty string is False." +58,Which function returns the absolute value?,FALSE,abs,mag,len,abs,"abs returns the magnitude of a number, dropping any sign." +59,Which built-in converts bytes to str?,str.encode,bytes.decode,format,ord,bytes.decode,bytes.decode is correct because it matches how this feature behaves in Python. +60,What is [i for i in range(3)][-1]?,1,2,3,0,2,2 is correct because it matches how this feature behaves in Python. +61,What is the output of print(6 * -8)?,Error,14,-48,-2,-48,"Multiplication of 6 and -8 gives -48, so -48 is right." +62,What is the output of print(6 * -6)?,-35,-36,-37,12,-36,"Multiplication of 6 and -6 gives -36, so -36 is right." +63,What is the output of print(-9 * 2)?,-18,Error,-17,-7,-18,"Multiplication of -9 and 2 gives -18, so -18 is right." +64,What is the output of print(7 * -5)?,-36,-34,Error,-35,-35,"Multiplication of 7 and -5 gives -35, so -35 is right." +65,What is the output of print(0 * 4)?,4,-4,0,-1,0,"Multiplication of 0 and 4 gives 0, so 0 is right." +66,What is bool([0])?,0,FALSE,TRUE,Error,TRUE,"Non-empty lists are truthy, even if they contain zero; so this is True." +67,What is the output of print(-6 * -8)?,48,47,Error,49,48,"Multiplication of -6 and -8 gives 48, so 48 is right." +68,What is tuple('ab')?,('a';'b'),"('a', 'b')","('a','b','')",('ab'),"('a', 'b')","('a', 'b') is correct because it matches how this feature behaves in Python." +69,What is the correct file extension for Python source files?,.pt,.python,.py,.pyc,.py,.py is correct because it matches how this feature behaves in Python. +70,What is the output of print(1 * 8)?,-7,9,7,8,8,"Multiplication of 1 and 8 gives 8, so 8 is right." +71,What is bool([0])?,FALSE,Error,TRUE,0,TRUE,"Non-empty lists are truthy, even if they contain zero; so this is True." +72,What is the output of print(6 * -5)?,11,-30,-29,Error,-30,"Multiplication of 6 and -5 gives -30, so -30 is right." +73,"What is {'a':1,'b':2} == {'b':2,'a':1}?",0,FALSE,TypeError,TRUE,TRUE,"Dictionaries compare by key and value pairs, not by insertion order, so these are equal." +74,What is the output of print(7 * -4)?,11,-29,-27,-28,-28,"Multiplication of 7 and -4 gives -28, so -28 is right." +75,What is the output of print(-4 * 6)?,-23,-10,-24,2,-24,"Multiplication of -4 and 6 gives -24, so -24 is right." +76,What is the output of print(5 * -4)?,1,-19,-21,-20,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." +77,What is the output of print(1 * -2)?,-2,-3,-1,Error,-2,"Multiplication of 1 and -2 gives -2, so -2 is right." +78,What is the output of print(6 * 2)?,4,Error,13,12,12,"Multiplication of 6 and 2 gives 12, so 12 is right." +79,What is the correct file extension for Python source files?,.pt,.py,.pyc,.pyt,.py,.py is correct because it matches how this feature behaves in Python. +80,What is the output of print(-7 * 4)?,-27,-28,-29,-11,-28,"Multiplication of -7 and 4 gives -28, so -28 is right." +81,Which keyword is used to import a module?,use,import,module,require,import,import is correct because it matches how this feature behaves in Python. +82,"What is list(filter(None,[0,1,2]))?",[2],[],"[1, 2]","[0,1,2]","[1, 2]","[1, 2] is correct because it matches how this feature behaves in Python." +83,What is the output of print(1 * 3)?,3,-2,Error,4,3,"Multiplication of 1 and 3 gives 3, so 3 is right." +84,What is the output of print(4 * 7)?,29,-3,28,Error,28,"Multiplication of 4 and 7 gives 28, so 28 is right." +85,"What is {1,2,3} - {2}?","{1,2,3}","{2,3}","{1, 3}",{2},"{1, 3}",Set difference removes elements from the left set that appear on the right. +86,What is the output of print(-7 * -8)?,1,56,55,57,56,"Multiplication of -7 and -8 gives 56, so 56 is right." +87,What is the output of print(type([]).__name__)?,set,list,object,dict,list,"Lists use square brackets and are mutable ordered collections, so their type is list." +88,Which keyword is used to import a module?,include,require,import,module,import,import is correct because it matches how this feature behaves in Python. +89,What is the output of print(-3 * -7)?,Error,4,22,21,21,"Multiplication of -3 and -7 gives 21, so 21 is right." +90,What is the output of print(9 * 4)?,37,36,35,13,36,"Multiplication of 9 and 4 gives 36, so 36 is right." +91,Which module implements heaps?,queue,heapq,bisect,array,heapq,"heapq implements a min-heap, letting you efficiently get the smallest item." +92,What does len('hello') return?,1,0,6,5,5,"len counts elements in the sequence, so the result matches the number of items shown." +93,What is the output of print(6 * -9)?,-53,-55,-54,Error,-54,"Multiplication of 6 and -9 gives -54, so -54 is right." +94,What is type({}.keys()).__name__?,dict_items,dict_keys,list,view,dict_keys,"Dictionary view objects like dict_keys are special views, not plain lists." +95,What is the output of print(8 * 7)?,1,Error,56,57,56,"Multiplication of 8 and 7 gives 56, so 56 is right." +96,Which built-in checks if all elements are truthy?,len,bool,any,all,all,all is correct because it matches how this feature behaves in Python. +97,What is the output of print(-2 * -5)?,3,-7,9,10,10,"Multiplication of -2 and -5 gives 10, so 10 is right." +98,What is the output of print(4 * 8)?,32,12,33,-4,32,"Multiplication of 4 and 8 gives 32, so 32 is right." +99,What is the output of print('A' < 'a') in ASCII?,TRUE,FALSE,None,Error,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." +100,What is the output of print(-5 * -3)?,16,-8,-2,15,15,"Multiplication of -5 and -3 gives 15, so 15 is right." +101,"What does round(2.675,2) equal in CPython?",2.7,2.68,2.67,FALSE,2.67,"Binary floating point rounds 2.675 to 2.67 in CPython due to representation, so 2.67 is expected." +102,What is the output of print(5 * -4)?,-19,-20,Error,1,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." +103,What is the output of print(8 * 7)?,57,56,15,Error,56,"Multiplication of 8 and 7 gives 56, so 56 is right." +104,What is the output of print(-2 * -9)?,17,18,19,-11,18,"Multiplication of -2 and -9 gives 18, so 18 is right." +105,What is the result of 2**3?,6,23,16,8,8,The exponent operator ** raises 2 to the power 3 which is 8. +106,What is the output of print(-3 * 2)?,-1,-6,Error,-5,-6,"Multiplication of -3 and 2 gives -6, so -6 is right." +107,What is the output of print(-8 * -9)?,Error,72,73,-17,72,"Multiplication of -8 and -9 gives 72, so 72 is right." +108,Which built-in returns a sequence length?,count,length,len,(),len,len is correct because it matches how this feature behaves in Python. +109,What is the output of print(-7 * 8)?,1,-57,-15,-56,-56,"Multiplication of -7 and 8 gives -56, so -56 is right." +110,Which method removes and returns the last list element?,pop,discard,delete,chop,pop,pop is correct because it matches how this feature behaves in Python. +111,What is the output of print(7 * -3)?,-20,10,-22,-21,-21,"Multiplication of 7 and -3 gives -21, so -21 is right." +112,What is the output of print(7 * -7)?,-50,-48,-49,Error,-49,"Multiplication of 7 and -7 gives -49, so -49 is right." +113,What is the output of print(2 * -5)?,-9,-11,Error,-10,-10,"Multiplication of 2 and -5 gives -10, so -10 is right." +114,What is the output of print(-9 * -4)?,37,Error,36,-13,36,"Multiplication of -9 and -4 gives 36, so 36 is right." +115,What is the output of print(7 * 6)?,41,1,42,Error,42,"Multiplication of 7 and 6 gives 42, so 42 is right." +116,"What is 'a,b,c'.split(',')?","['a', 'b', 'c']","['a','b,c']",['a';'b';'c'],"('a','b','c')","['a', 'b', 'c']","split with a comma cuts the string at commas, returning the pieces in a list." +117,What is the output of print(7 * 3)?,10,21,Error,20,21,"Multiplication of 7 and 3 gives 21, so 21 is right." +118,What is the output of print(7 * 7)?,49,0,48,Error,49,"Multiplication of 7 and 7 gives 49, so 49 is right." +119,What is the output of print(8 * -9)?,-73,-72,Error,-1,-72,"Multiplication of 8 and -9 gives -72, so -72 is right." +120,Which built-in checks if all elements are truthy?,all,bool,len,any,all,all is correct because it matches how this feature behaves in Python. +121,Which keyword is used to define a coroutine function?,async def,def coroutine,await def,co def,async def,async def defines a coroutine function that can be awaited. +122,What is the output of print(-1 * -2)?,-3,Error,1,2,2,"Multiplication of -1 and -2 gives 2, so 2 is right." +123,Which keyword is used to import a module?,require,use,module,import,import,import is correct because it matches how this feature behaves in Python. +124,What is the output of print(1 * -5)?,-6,-5,-4,6,-5,"Multiplication of 1 and -5 gives -5, so -5 is right." +125,What is the output of print(7 * -5)?,2,Error,-35,12,-35,"Multiplication of 7 and -5 gives -35, so -35 is right." +126,What is the output of print(-3 * -2)?,5,Error,6,7,6,"Multiplication of -3 and -2 gives 6, so 6 is right." +127,What is the output of print(6 * -7)?,-41,-1,13,-42,-42,"Multiplication of 6 and -7 gives -42, so -42 is right." +128,"What is 'abc'.replace('b','x')?",abc,axc,xbc,abx,axc,"String methods return new strings without changing the original, and this method does exactly what its name says." +129,Which function returns the absolute value?,mag,abs,norm,fabs,abs,"abs returns the magnitude of a number, dropping any sign." +130,What is the output of print(2 * 1)?,3,2,Error,1,2,"Multiplication of 2 and 1 gives 2, so 2 is right." +131,"What is sorted([3,1,2])?","[3,2,1]","{1,2,3}","[1, 2, 3]","(1,2,3)","[1, 2, 3]","sorted creates and returns a new sorted list, leaving the original alone." +132,What is the output of print(9 * 1)?,8,9,Error,10,9,"Multiplication of 9 and 1 gives 9, so 9 is right." +133,What is the output of print(3 * 1)?,4,2,3,Error,3,"Multiplication of 3 and 1 gives 3, so 3 is right." +134,What is the output of print(-4 * -4)?,16,17,Error,15,16,"Multiplication of -4 and -4 gives 16, so 16 is right." +135,Which keyword is used to create an anonymous function?,inline,func,lambda,def,lambda,lambda is correct because it matches how this feature behaves in Python. +136,What is the output of print(8 * 9)?,-1,71,72,73,72,"Multiplication of 8 and 9 gives 72, so 72 is right." +137,What is the output of print(5 * 1)?,4,Error,5,6,5,"Multiplication of 5 and 1 gives 5, so 5 is right." +138,What is the output of print(0 * -7)?,0,-7,-1,Error,0,"Multiplication of 0 and -7 gives 0, so 0 is right." +139,What is the output of print(-7 * 6)?,-42,-43,-13,-1,-42,"Multiplication of -7 and 6 gives -42, so -42 is right." +140,What is the output of print(1 * -3)?,Error,4,-3,-4,-3,"Multiplication of 1 and -3 gives -3, so -3 is right." +141,Which built-in converts a string to an integer?,ord,int,float,str,int,int is correct because it matches how this feature behaves in Python. +142,What is the output of print(9 * -3)?,Error,12,6,-27,-27,"Multiplication of 9 and -3 gives -27, so -27 is right." +143,Which keyword is used to import a module?,require,use,None,import,import,import is correct because it matches how this feature behaves in Python. +144,What is the output of print(-1 * 1)?,Error,0,-1,-2,-1,"Multiplication of -1 and 1 gives -1, so -1 is right." +145,What is the output of print(-2 * -5)?,10,-7,3,9,10,"Multiplication of -2 and -5 gives 10, so 10 is right." +146,What is the output of print(-8 * -4)?,Error,31,32,-4,32,"Multiplication of -8 and -4 gives 32, so 32 is right." +147,What is the output of print(8 * 2)?,Error,15,6,16,16,"Multiplication of 8 and 2 gives 16, so 16 is right." +148,Which built-in checks if all elements are truthy?,sum,len,all,any,all,all is correct because it matches how this feature behaves in Python. +149,What is the output of print(7 * -6)?,-43,-42,1,13,-42,"Multiplication of 7 and -6 gives -42, so -42 is right." +150,Which decorator creates read-only attributes in dataclasses?,@readonly,@dataclass(frozen=True),@final,@frozen,@dataclass(frozen=True),@dataclass(frozen=True) is correct because it matches how this feature behaves in Python. +151,What is the output of print(8 * 9)?,73,Error,71,72,72,"Multiplication of 8 and 9 gives 72, so 72 is right." +152,What is 'python'[1:4]?,tho,pyt,yon,yth,yth,Slicing from index 1 up to 4 takes the middle chunk yth. +153,Which module offers precise decimal arithmetic?,math,fractions,numbers,decimal,decimal,"decimal handles base-10 decimals precisely, avoiding common binary float surprises." +154,"What is list(map(lambda x:x+1,[1,2]))?","[1,2]","(2,3)","[3,4]","[2, 3]","[2, 3]","[2, 3] is correct because it matches how this feature behaves in Python." +155,What is sum(range(4))?,6,3,10,7,6,6 is correct because it matches how this feature behaves in Python. +156,What is the output of print(8 * 8)?,64,63,16,Error,64,"Multiplication of 8 and 8 gives 64, so 64 is right." +157,What is the output of print(7 * -2)?,-13,5,-14,-15,-14,"Multiplication of 7 and -2 gives -14, so -14 is right." +158,What is {'a':1}.keys().__class__.__name__?,set,dict_keys,list,view,dict_keys,dict_keys is correct because it matches how this feature behaves in Python. +159,What is bool([0])?,TRUE,None,FALSE,Error,TRUE,"Non-empty lists are truthy, even if they contain zero; so this is True." +160,What is 5//2?,2,3,2.5,2,2,"The // operator is floor division, which drops the fractional part toward negative infinity." +161,Which operator tests object identity?,==,is,in,id,is,"is checks whether two names reference the same object, not just equal values." +162,What is the output of print(-4 * -6)?,24,Error,25,2,24,"Multiplication of -4 and -6 gives 24, so 24 is right." +163,What is the output of print(-7 * -6)?,42,Error,-13,-1,42,"Multiplication of -7 and -6 gives 42, so 42 is right." +164,Which decorator creates read-only attributes in dataclasses?,@sealed,@dataclass(frozen=True),@final,@readonly,@dataclass(frozen=True),@dataclass(frozen=True) is correct because it matches how this feature behaves in Python. +165,What is tuple('ab')?,('ab'),('a';'b'),"('a', 'b')","['a','b']","('a', 'b')","('a', 'b') is correct because it matches how this feature behaves in Python." +166,What is the output of print(1 * 6)?,-5,6,7,5,6,"Multiplication of 1 and 6 gives 6, so 6 is right." +167,What is the output of print(1 * -1)?,2,-1,0,Error,-1,"Multiplication of 1 and -1 gives -1, so -1 is right." +168,What is the output of print(5 * -4)?,-20,Error,9,1,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." +169,What is the output of print(4 * 7)?,11,28,27,Error,28,"Multiplication of 4 and 7 gives 28, so 28 is right." +170,What is the output of print(8 * -5)?,3,-40,-41,-39,-40,"Multiplication of 8 and -5 gives -40, so -40 is right." +171,What is the output of print(2 * -2)?,0,-4,4,Error,-4,"Multiplication of 2 and -2 gives -4, so -4 is right." +172,What is 'mississippi'.count('ss')?,TRUE,0,3,2,2,2 is correct because it matches how this feature behaves in Python. +173,What is the output of print(0 * 3)?,-3,3,0,1,0,"Multiplication of 0 and 3 gives 0, so 0 is right." +174,Which module is recommended for cryptographic randomness?,hashlib,random,secrets,uuid,secrets,secrets provides strong random values designed for security sensitive tasks. +175,What is the output of print(-2 * 3)?,-7,Error,-6,-5,-6,"Multiplication of -2 and 3 gives -6, so -6 is right." +176,What is the output of print(-3 * -8)?,-11,5,24,23,24,"Multiplication of -3 and -8 gives 24, so 24 is right." +177,What is the output of print(-8 * 4)?,-32,-4,-12,-31,-32,"Multiplication of -8 and 4 gives -32, so -32 is right." +178,"What is isinstance(True,int)?",None,TRUE,FALSE,TypeError,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." +179,What does PEP stand for?,Python Enhancement Proposal,Proposal for Enhanced Python,Python Engineering Plan,Programming Enhancement Proposal,Python Enhancement Proposal,"PEP means Python Enhancement Proposal, which documents ideas and changes to the language." +180,What is the output of print(9 * 5)?,Error,44,14,45,45,"Multiplication of 9 and 5 gives 45, so 45 is right." +181,What is type(range(3)).__name__?,iterator,list,range,TRUE,range,range objects have their own type in Python and generate sequences lazily. +182,What is the output of print(2 * -6)?,8,-11,Error,-12,-12,"Multiplication of 2 and -6 gives -12, so -12 is right." +183,What does [0]*3 produce?,"[0, 0, 0]","(0,0,0)","[0,3]","[0,0,0,0]","[0, 0, 0]","Multiplying a list by 3 repeats its elements three times, giving three zeros." +184,What is 'python'[::-1]?,py,pnohty,nohtyp,python,nohtyp,"Slicing with step -1 reverses the sequence, so you get the string backwards." +185,Which exception is raised for an out-of-range list index?,ValueError,LookupError,TypeError,IndexError,IndexError,Accessing a list with an invalid index raises IndexError. +186,What is the output of print(-4 * 0)?,-4,-1,Error,0,0,"Multiplication of -4 and 0 gives 0, so 0 is right." +187,"What is {1,2,3} - {2}?",{2},"{1,2}","{1, 3}","{2,3}","{1, 3}",Set difference removes elements from the left set that appear on the right. +188,Which keyword is used to define a coroutine function?,async def,def coroutine,def async,await def,async def,async def defines a coroutine function that can be awaited. +189,What is the output of print(-8 * 5)?,-3,-13,-39,-40,-40,"Multiplication of -8 and 5 gives -40, so -40 is right." +190,Which method adds a single element to a list?,append,push,extend,add,append,append is correct because it matches how this feature behaves in Python. +191,What is the output of print(2 * -7)?,-13,-14,Error,9,-14,"Multiplication of 2 and -7 gives -14, so -14 is right." +192,What is the output of print(3 * -6)?,-18,-19,-3,Error,-18,"Multiplication of 3 and -6 gives -18, so -18 is right." +193,What is the output of print(-2 * 4)?,-6,-8,Error,2,-8,"Multiplication of -2 and 4 gives -8, so -8 is right." +194,What is the output of print(0 * -1)?,-1,Error,0,1,0,"Multiplication of 0 and -1 gives 0, so 0 is right." +195,What is the output of print(-7 * 5)?,Error,-2,-35,-34,-35,"Multiplication of -7 and 5 gives -35, so -35 is right." +196,What is the output of print(-5 * -6)?,Error,1,30,31,30,"Multiplication of -5 and -6 gives 30, so 30 is right." +197,What is the output of print(7 * -5)?,-35,Error,2,12,-35,"Multiplication of 7 and -5 gives -35, so -35 is right." +198,What is the output of print(-1 * 2)?,1,-1,-3,-2,-2,"Multiplication of -1 and 2 gives -2, so -2 is right." +199,What is the output of print(-1 * 6)?,5,-6,-7,-5,-6,"Multiplication of -1 and 6 gives -6, so -6 is right." +200,What is the output of print(1 * -9)?,Error,-9,-8,-10,-9,"Multiplication of 1 and -9 gives -9, so -9 is right." +201,Which keyword annotates variables with types?,as,:,type,{},:,: is correct because it matches how this feature behaves in Python. +202,What is sum(i*i for i in range(4))?,13,16,12,14,14,14 is correct because it matches how this feature behaves in Python. +203,What is the output of print(-8 * 2)?,-6,-16,-15,-17,-16,"Multiplication of -8 and 2 gives -16, so -16 is right." +204,What is the output of print(-8 * 7)?,Error,-1,-56,-55,-56,"Multiplication of -8 and 7 gives -56, so -56 is right." +205,Which module helps parse command-line arguments?,argparse,shlex,getopt,click,argparse,argparse parses command-line arguments and automatically builds help messages. +206,What is the output of print(-2 * 3)?,-5,1,-6,Error,-6,"Multiplication of -2 and 3 gives -6, so -6 is right." +207,What is the output of print(6 * -1)?,-6,7,Error,-7,-6,"Multiplication of 6 and -1 gives -6, so -6 is right." +208,What is the output of print(8 * 2)?,16,15,17,6,16,"Multiplication of 8 and 2 gives 16, so 16 is right." +209,What is the output of print(-6 * -4)?,-10,Error,24,-2,24,"Multiplication of -6 and -4 gives 24, so 24 is right." +210,What is the output of print(6 * -7)?,-41,-42,-1,13,-42,"Multiplication of 6 and -7 gives -42, so -42 is right." +211,What is the output of print(8 * 6)?,49,14,48,47,48,"Multiplication of 8 and 6 gives 48, so 48 is right." +212,What is the output of print(-5 * -5)?,25,26,-10,0,25,"Multiplication of -5 and -5 gives 25, so 25 is right." +213,"What is list(zip([1,2,3],[4,5])) length?",0,5,2,3,2,"zip stops at the shortest input, so the length matches the smaller list." +214,What does bool('') return?,FALSE,(),TRUE,None,FALSE,"Empty strings are falsy in Python, so bool of an empty string is False." +215,What is the output of print(-4 * 7)?,-29,3,-28,-27,-28,"Multiplication of -4 and 7 gives -28, so -28 is right." +216,What is the output of print(2 * 3)?,Error,6,7,5,6,"Multiplication of 2 and 3 gives 6, so 6 is right." +217,Which operator performs floor division?,^^,/,//,**,//,// is correct because it matches how this feature behaves in Python. +218,Which keyword declares a class method?,@overload,@classmethod,@abstractmethod,@staticmethod,@classmethod,@classmethod is correct because it matches how this feature behaves in Python. +219,What is the output of print(1 * -9)?,-8,Error,-10,-9,-9,"Multiplication of 1 and -9 gives -9, so -9 is right." +220,What is the output of print(5 * 4)?,21,Error,20,19,20,"Multiplication of 5 and 4 gives 20, so 20 is right." +221,What is the output of print(-1 * -7)?,Error,-8,7,6,7,"Multiplication of -1 and -7 gives 7, so 7 is right." +222,What is the output of print(-1 * -5)?,-6,Error,5,6,5,"Multiplication of -1 and -5 gives 5, so 5 is right." +223,What is the output of print(-7 * 2)?,-14,-13,-15,-9,-14,"Multiplication of -7 and 2 gives -14, so -14 is right." +224,What is the output of print(-5 * -7)?,34,35,2,-12,35,"Multiplication of -5 and -7 gives 35, so 35 is right." +225,"What is {1,2} | {2,3}?","{1,2}","{2,3}","{1, 2, 3}",{2},"{1, 2, 3}",Set union combines unique elements from both sets. +226,Which collection does not allow duplicate elements?,set,deque,tuple,dict,set,"Sets keep unique elements only, so duplicates collapse to one." +227,What is the output of print(-6 * 8)?,-14,-48,-47,2,-48,"Multiplication of -6 and 8 gives -48, so -48 is right." +228,Which exception is raised for an out-of-range list index?,IndexError,TypeError,LookupError,KeyError,IndexError,Accessing a list with an invalid index raises IndexError. +229,What is the output of print(1 * -7)?,8,-7,-8,-6,-7,"Multiplication of 1 and -7 gives -7, so -7 is right." +230,What is the output of print(7 * 0)?,1,Error,7,0,0,"Multiplication of 7 and 0 gives 0, so 0 is right." +231,"What is {1,2,3} - {2}?","{1,2,3}","{1,2}",{2},"{1, 3}","{1, 3}",Set difference removes elements from the left set that appear on the right. +232,Which statement ensures cleanup for context managers?,0,with,using,context,with,"with ensures files are closed even if errors happen, which is why it is used for cleanup." +233,What is the output of print(-8 * -5)?,39,40,-13,Error,40,"Multiplication of -8 and -5 gives 40, so 40 is right." +234,What is the output of print(5 * -7)?,-2,-34,-35,12,-35,"Multiplication of 5 and -7 gives -35, so -35 is right." +235,"What is 'abc'.replace('b','x')?",axc,abc,xbc,ac,axc,"String methods return new strings without changing the original, and this method does exactly what its name says." +236,"What is sorted([3,1,2])?","[1, 2, 3]","[3,2,1]",Error,"[1,3,2]","[1, 2, 3]","sorted creates and returns a new sorted list, leaving the original alone." +237,What is the output of print(-6 * 5)?,-11,-30,-1,-31,-30,"Multiplication of -6 and 5 gives -30, so -30 is right." +238,What is ''.strip()?,'' '',' ',,None,,nan is correct because it matches how this feature behaves in Python. +239,What is the output of print(5 * 3)?,2,15,14,16,15,"Multiplication of 5 and 3 gives 15, so 15 is right." +240,What is the output of print(-2 * -3)?,-5,1,7,6,6,"Multiplication of -2 and -3 gives 6, so 6 is right." +241,What is the output of print(8 * 2)?,17,Error,6,16,16,"Multiplication of 8 and 2 gives 16, so 16 is right." +242,What is the output of print(-4 * 9)?,-13,-36,-35,-37,-36,"Multiplication of -4 and 9 gives -36, so -36 is right." +243,What is the output of print(-9 * 5)?,-44,-14,-4,-45,-45,"Multiplication of -9 and 5 gives -45, so -45 is right." +244,What is the output of print(-1 * 7)?,Error,-7,-8,6,-7,"Multiplication of -1 and 7 gives -7, so -7 is right." +245,What is the output of print(3 * 5)?,Error,16,15,8,15,"Multiplication of 3 and 5 gives 15, so 15 is right." +246,What is the output of print(-5 * -7)?,36,34,35,2,35,"Multiplication of -5 and -7 gives 35, so 35 is right." +247,What is the output of print(8 * -5)?,3,-39,-41,-40,-40,"Multiplication of 8 and -5 gives -40, so -40 is right." +248,"What is [1,2,3].append(4) return value?",None,"[1,2,3]",{},"[1,2,3,4]",None,"append changes the list in place and returns None, which is why the value is None." +249,What is the output of print(-2 * 4)?,Error,2,-7,-8,-8,"Multiplication of -2 and 4 gives -8, so -8 is right." +250,What is the output of print(0 * 9)?,9,0,1,-9,0,"Multiplication of 0 and 9 gives 0, so 0 is right." +251,What is the output of print(3 * 8)?,24,-5,Error,25,24,"Multiplication of 3 and 8 gives 24, so 24 is right." +252,What is the output of print(3 * -7)?,-21,Error,-4,10,-21,"Multiplication of 3 and -7 gives -21, so -21 is right." +253,"What does round(2.675,2) equal in CPython?",2.7,2.68,2.67,2.6,2.67,"Binary floating point rounds 2.675 to 2.67 in CPython due to representation, so 2.67 is expected." +254,Which operator tests object identity?,id,==,equals,is,is,"is checks whether two names reference the same object, not just equal values." +255,What is the output of print(-1 * -6)?,5,Error,7,6,6,"Multiplication of -1 and -6 gives 6, so 6 is right." +256,What is the output of print(-8 * 5)?,-41,-40,-13,-39,-40,"Multiplication of -8 and 5 gives -40, so -40 is right." +257,What is the output of print(5 * -8)?,-39,Error,13,-40,-40,"Multiplication of 5 and -8 gives -40, so -40 is right." +258,What is the output of print(7 * 1)?,7,8,6,Error,7,"Multiplication of 7 and 1 gives 7, so 7 is right." +259,What is the output of print(-3 * 5)?,-16,Error,-15,2,-15,"Multiplication of -3 and 5 gives -15, so -15 is right." +260,What does {x for x in 'aab'} produce length of?,1,0,4,2,2,"A set comprehension keeps unique letters only, so only a and b remain, making the length 2." +261,What is the output of print(-8 * -5)?,-3,40,41,-13,40,"Multiplication of -8 and -5 gives 40, so 40 is right." +262,Which method joins a list of strings with a separator?,concat,join,combine,append,join,join is correct because it matches how this feature behaves in Python. +263,What is the output of print(-5 * -1)?,6,5,-6,Error,5,"Multiplication of -5 and -1 gives 5, so 5 is right." +264,What is the output of print(5 * -2)?,-9,Error,7,-10,-10,"Multiplication of 5 and -2 gives -10, so -10 is right." +265,"What does {'a':1}.get('b',99) return?",99,KeyError,0,1,99,"get returns the default you pass when the key is missing, so you see 99." +266,What is the output of print(-7 * -6)?,42,Error,-13,41,42,"Multiplication of -7 and -6 gives 42, so 42 is right." +267,What is the output of print(3 * 2)?,Error,7,6,5,6,"Multiplication of 3 and 2 gives 6, so 6 is right." +268,What is the output of print(4 * 6)?,24,10,Error,-2,24,"Multiplication of 4 and 6 gives 24, so 24 is right." +269,Which module is recommended for cryptographic randomness?,hashlib,uuid,secrets,[],secrets,secrets provides strong random values designed for security sensitive tasks. +270,What is the output of print(4 * -8)?,-32,-33,-31,-4,-32,"Multiplication of 4 and -8 gives -32, so -32 is right." +271,What is the output of print(5 * 0)?,0,5,Error,-1,0,"Multiplication of 5 and 0 gives 0, so 0 is right." +272,What is the output of print(3 * -5)?,-16,-2,-15,8,-15,"Multiplication of 3 and -5 gives -15, so -15 is right." +273,What is the output of print(6 * 9)?,15,-3,Error,54,54,"Multiplication of 6 and 9 gives 54, so 54 is right." +274,What is the output of print(-5 * -9)?,45,Error,46,44,45,"Multiplication of -5 and -9 gives 45, so 45 is right." +275,Which module offers precise decimal arithmetic?,statistics,fractions,decimal,math,decimal,"decimal handles base-10 decimals precisely, avoiding common binary float surprises." +276,Which built-in converts a string to an integer?,ord,int,float,str,int,int is correct because it matches how this feature behaves in Python. +277,What is the output of print(-5 * -4)?,-1,20,19,21,20,"Multiplication of -5 and -4 gives 20, so 20 is right." +278,"What is list(zip([1,2,3],[4,5])) length?",1,3,5,2,2,"zip stops at the shortest input, so the length matches the smaller list." +279,What is the output of print(0 * -6)?,-6,0,Error,-1,0,"Multiplication of 0 and -6 gives 0, so 0 is right." +280,What is the output of print(7 * 1)?,8,6,7,Error,7,"Multiplication of 7 and 1 gives 7, so 7 is right." +281,"What is ''.join(['a','b'])?","a,b",ab,"['a','b']",a b,ab,join glues the strings together using the given separator; an empty separator just concatenates them. +282,What is the output of print(8 * 2)?,16,10,17,Error,16,"Multiplication of 8 and 2 gives 16, so 16 is right." +283,What is the output of print(5 * -8)?,-3,-40,13,-41,-40,"Multiplication of 5 and -8 gives -40, so -40 is right." +284,What is 'Python'.lower()?,pYTHON,PYTHON,python,py-thon,python,"String methods return new strings without changing the original, and this method does exactly what its name says." +285,"What is {'a':1,'b':2} == {'b':2,'a':1}?",0,None,TypeError,TRUE,TRUE,"Dictionaries compare by key and value pairs, not by insertion order, so these are equal." +286,Which module offers precise decimal arithmetic?,decimal,fractions,statistics,numbers,decimal,"decimal handles base-10 decimals precisely, avoiding common binary float surprises." +287,Which keyword declares a class method?,@property,@classmethod,@staticmethod,@abstractmethod,@classmethod,@classmethod is correct because it matches how this feature behaves in Python. +288,What does PEP stand for?,Python Enhancement Proposal,Python Extended Plan,Proposal for Enhanced Python,FALSE,Python Enhancement Proposal,"PEP means Python Enhancement Proposal, which documents ideas and changes to the language." +289,What is the output of print(2 * -4)?,-7,-2,-8,-9,-8,"Multiplication of 2 and -4 gives -8, so -8 is right." +290,What is the output of print(1 * 0)?,1,Error,-1,0,0,"Multiplication of 1 and 0 gives 0, so 0 is right." +291,Which keyword annotates variables with types?,:,::,->,type,:,: is correct because it matches how this feature behaves in Python. +292,Which built-in converts a string to an integer?,int,float,0,bool,int,int is correct because it matches how this feature behaves in Python. +293,"What is (2,)*3?","(2, 2, 2)","(2,3)","(2,2,2,)","[2,2,2]","(2, 2, 2)","(2, 2, 2) is correct because it matches how this feature behaves in Python." +294,What is the output of print(2 * -3)?,-6,5,Error,-5,-6,"Multiplication of 2 and -3 gives -6, so -6 is right." +295,What is the output of print(9 * -1)?,Error,-9,8,-10,-9,"Multiplication of 9 and -1 gives -9, so -9 is right." +296,What is the output of print(-3 * 5)?,Error,-15,-8,-14,-15,"Multiplication of -3 and 5 gives -15, so -15 is right." +297,Which statement is used to handle exceptions?,try ... except,guard ... catch,trap ... recover,handle ... except,try ... except,try ... except is correct because it matches how this feature behaves in Python. +298,Which module provides a LRU cache decorator?,functools,itertools,0,operator,functools,functools has handy function utilities like lru_cache for memoization. +299,What is the output of print(8 * -3)?,-24,-25,-23,5,-24,"Multiplication of 8 and -3 gives -24, so -24 is right." +300,What is the output of print(-9 * 4)?,Error,-35,-37,-36,-36,"Multiplication of -9 and 4 gives -36, so -36 is right." +301,What is the output of print(5 * -1)?,Error,4,-6,-5,-5,"Multiplication of 5 and -1 gives -5, so -5 is right." +302,What is the output of print(2 * 1)?,3,2,1,Error,2,"Multiplication of 2 and 1 gives 2, so 2 is right." +303,What is the output of print('A' < 'a') in ASCII?,TRUE,FALSE,Error,None,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." +304,What is the output of print(5 * -4)?,Error,-19,-20,-21,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." +305,What is the output of print(-7 * -7)?,49,0,48,-14,49,"Multiplication of -7 and -7 gives 49, so 49 is right." +306,What is the output of print(-7 * -2)?,14,Error,13,15,14,"Multiplication of -7 and -2 gives 14, so 14 is right." +307,What is the output of print(8 * -7)?,-56,-57,1,-55,-56,"Multiplication of 8 and -7 gives -56, so -56 is right." +308,What is the output of print(7 * -9)?,-63,-2,16,-64,-63,"Multiplication of 7 and -9 gives -63, so -63 is right." +309,What is the output of print(7 * 5)?,36,34,35,Error,35,"Multiplication of 7 and 5 gives 35, so 35 is right." +310,What is the output of print(0 * 6)?,-1,6,0,-6,0,"Multiplication of 0 and 6 gives 0, so 0 is right." +311,What is the output of print(2 * -2)?,-4,Error,0,4,-4,"Multiplication of 2 and -2 gives -4, so -4 is right." +312,What is the output of print(6 * 9)?,Error,15,-3,54,54,"Multiplication of 6 and 9 gives 54, so 54 is right." +313,What is the output of print(-6 * 7)?,-43,-41,Error,-42,-42,"Multiplication of -6 and 7 gives -42, so -42 is right." +314,What is the output of print(1 * -5)?,-6,Error,-5,-4,-5,"Multiplication of 1 and -5 gives -5, so -5 is right." +315,What is the output of print(8 * -7)?,1,-56,15,-55,-56,"Multiplication of 8 and -7 gives -56, so -56 is right." +316,Which keyword is used to create an anonymous function?,func,def,anon,lambda,lambda,lambda is correct because it matches how this feature behaves in Python. +317,Which built-in returns a sequence length?,len,count,cardinality,size,len,len is correct because it matches how this feature behaves in Python. +318,What is the output of print(-3 * -9)?,-12,28,6,27,27,"Multiplication of -3 and -9 gives 27, so 27 is right." +319,What is the output of print(type([]).__name__)?,tuple,object,list,dict,list,"Lists use square brackets and are mutable ordered collections, so their type is list." +320,What is the output of print(-5 * -4)?,-9,-1,21,20,20,"Multiplication of -5 and -4 gives 20, so 20 is right." +321,"What is [1,2,3] + [4]?","[4,1,2,3]","[1,2,3,4,]","[1,2,3]","[1, 2, 3, 4]","[1, 2, 3, 4]","[1, 2, 3, 4] is correct because it matches how this feature behaves in Python." +322,What is the output of print(-5 * 8)?,-40,-13,Error,-39,-40,"Multiplication of -5 and 8 gives -40, so -40 is right." +323,Which data structure is best for FIFO operations in collections?,tuple,array.array,list,collections.deque,collections.deque,"collections.deque is built for fast appends and pops from both ends, perfect for FIFO queues." +324,Which function converts an ASCII code point to character?,chr,hex,'',ord,chr,chr turns a code point into the corresponding character; ord does the reverse. +325,Which statement is used to handle exceptions?,try ... except,[],trap ... recover,guard ... catch,try ... except,try ... except is correct because it matches how this feature behaves in Python. +326,What is the output of print(-6 * -7)?,Error,41,43,42,42,"Multiplication of -6 and -7 gives 42, so 42 is right." +327,What is the output of print(-8 * -5)?,39,40,41,-3,40,"Multiplication of -8 and -5 gives 40, so 40 is right." +328,Which keyword declares a class method?,@abstractmethod,@classmethod,@overload,@property,@classmethod,@classmethod is correct because it matches how this feature behaves in Python. +329,What is the output of print(4 * -5)?,9,Error,-19,-20,-20,"Multiplication of 4 and -5 gives -20, so -20 is right." +330,What is 5//2?,2.5,2,Error,2,2,"The // operator is floor division, which drops the fractional part toward negative infinity." +331,What is the output of print(-5 * 5)?,-25,-10,-24,Error,-25,"Multiplication of -5 and 5 gives -25, so -25 is right." +332,What is the output of print(-2 * -8)?,-10,15,16,6,16,"Multiplication of -2 and -8 gives 16, so 16 is right." +333,Which built-in type is immutable?,set,bytearray,list,tuple,tuple,"Tuples are immutable, so once created their contents cannot be changed." +334,What is the output of print(1 * 9)?,9,10,Error,8,9,"Multiplication of 1 and 9 gives 9, so 9 is right." +335,What is the output of print(-1 * 1)?,-2,-1,Error,0,-1,"Multiplication of -1 and 1 gives -1, so -1 is right." +336,What is the output of print(7 * 2)?,15,Error,14,9,14,"Multiplication of 7 and 2 gives 14, so 14 is right." +337,What is the output of print(1 * 3)?,2,4,-2,3,3,"Multiplication of 1 and 3 gives 3, so 3 is right." +338,Which statement re-raises the current exception?,throw,raise,except,None,raise,raise is correct because it matches how this feature behaves in Python. +339,What is 'python'[1:4]?,tho,pyt,yth,ytho,yth,Slicing from index 1 up to 4 takes the middle chunk yth. +340,What is the output of print(-9 * -6)?,55,Error,53,54,54,"Multiplication of -9 and -6 gives 54, so 54 is right." +341,"What is list(filter(None,[0,1,2]))?","[1, 2]",[],[2],"[0,1,2]","[1, 2]","[1, 2] is correct because it matches how this feature behaves in Python." +342,What is the output of print(5 * 3)?,Error,15,16,2,15,"Multiplication of 5 and 3 gives 15, so 15 is right." +343,What is the output of print(-6 * 9)?,-54,Error,3,-53,-54,"Multiplication of -6 and 9 gives -54, so -54 is right." +344,What is 'mississippi'.count('ss')?,1,4,2,3,2,2 is correct because it matches how this feature behaves in Python. +345,What is the output of print(-4 * 5)?,-9,-20,1,Error,-20,"Multiplication of -4 and 5 gives -20, so -20 is right." +346,What is the output of print(-5 * -6)?,30,31,1,-11,30,"Multiplication of -5 and -6 gives 30, so 30 is right." +347,What is the output of print(-3 * -8)?,Error,23,25,24,24,"Multiplication of -3 and -8 gives 24, so 24 is right." +348,What is the output of print(-3 * -5)?,14,15,-8,2,15,"Multiplication of -3 and -5 gives 15, so 15 is right." +349,What is the output of print(-9 * -9)?,81,Error,82,-18,81,"Multiplication of -9 and -9 gives 81, so 81 is right." +350,What is the output of print(6 * -4)?,-24,10,-25,Error,-24,"Multiplication of 6 and -4 gives -24, so -24 is right." +351,What is the output of print(-2 * 9)?,7,-11,-19,-18,-18,"Multiplication of -2 and 9 gives -18, so -18 is right." +352,What is the output of print(-4 * 2)?,-7,-9,-2,-8,-8,"Multiplication of -4 and 2 gives -8, so -8 is right." +353,"What is isinstance(True,int)?",TRUE,FALSE,None,0,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." +354,Which module provides regular expressions?,re,match,regex,pattern,re,re is correct because it matches how this feature behaves in Python. +355,What is the output of print(-2 * 8)?,-16,-10,-15,Error,-16,"Multiplication of -2 and 8 gives -16, so -16 is right." +356,What is the output of print(3 * -2)?,5,-5,-6,1,-6,"Multiplication of 3 and -2 gives -6, so -6 is right." +357,What is the output of print(2 * -6)?,-4,-12,-13,Error,-12,"Multiplication of 2 and -6 gives -12, so -12 is right." +358,What is type({}.keys()).__name__?,dict_keys,set,dict_items,view,dict_keys,"Dictionary view objects like dict_keys are special views, not plain lists." +359,What is the output of print(0 * -5)?,1,0,5,-1,0,"Multiplication of 0 and -5 gives 0, so 0 is right." +360,What is the output of print(-8 * -2)?,16,-6,-10,17,16,"Multiplication of -8 and -2 gives 16, so 16 is right." +361,What is the output of print(-1 * -6)?,Error,6,5,-7,6,"Multiplication of -1 and -6 gives 6, so 6 is right." +362,What is the output of print(-4 * -8)?,32,-12,Error,4,32,"Multiplication of -4 and -8 gives 32, so 32 is right." +363,"What is isinstance(True,int)?",'',FALSE,0,TRUE,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." +364,What is the output of print(8 * -4)?,-33,4,-31,-32,-32,"Multiplication of 8 and -4 gives -32, so -32 is right." +365,What is the output of print(0 * -5)?,-1,1,Error,0,0,"Multiplication of 0 and -5 gives 0, so 0 is right." +366,What is the output of print(0 * 3)?,-1,3,1,0,0,"Multiplication of 0 and 3 gives 0, so 0 is right." +367,What is the output of print(6 * -3)?,3,-17,-18,-19,-18,"Multiplication of 6 and -3 gives -18, so -18 is right." +368,What is the output of print(-2 * 9)?,Error,-18,-11,7,-18,"Multiplication of -2 and 9 gives -18, so -18 is right." +369,What is the output of print(-8 * 0)?,Error,1,0,-1,0,"Multiplication of -8 and 0 gives 0, so 0 is right." +370,What is the file mode to read text (default)?,rb,r,w,rw,r,r opens a file for reading text by default. +371,What is the result of 2**3?,8,6,23,9,8,The exponent operator ** raises 2 to the power 3 which is 8. +372,What is the output of print(5 * -4)?,-19,Error,-20,9,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." +373,"What is sorted([3,1,2])?","(1,2,3)","[1, 2, 3]","[1,3,2]","[3,2,1]","[1, 2, 3]","sorted creates and returns a new sorted list, leaving the original alone." +374,What is the output of print(8 * 7)?,15,55,Error,56,56,"Multiplication of 8 and 7 gives 56, so 56 is right." +375,Which module helps parse command-line arguments?,click,sys,shlex,argparse,argparse,argparse parses command-line arguments and automatically builds help messages. +376,What is 'python'.find('z')?,None,FALSE,0,-1,-1,-1 is correct because it matches how this feature behaves in Python. +377,Which statement re-raises the current exception?,[],raise,retry,except,raise,raise is correct because it matches how this feature behaves in Python. +378,Which function schedules multiple coroutines to run concurrently?,asyncio.sleep,asyncio.gather,asyncio.run,asyncio.wait_for,asyncio.gather,asyncio.gather schedules multiple coroutines to run concurrently and waits for them. +379,What is the output of print(-3 * -1)?,-2,2,3,4,3,"Multiplication of -3 and -1 gives 3, so 3 is right." +380,Which method joins a list of strings with a separator?,join,combine,concat,append,join,join is correct because it matches how this feature behaves in Python. +381,Which module provides tools for working with iterators like permutations?,itertools,collections,random,typing,itertools,itertools houses fast iterator building blocks like permutations and combinations. +382,What is the output of print(4 * -6)?,-25,Error,-24,-2,-24,"Multiplication of 4 and -6 gives -24, so -24 is right." +383,What is the output of print(-7 * 8)?,Error,-56,-57,-15,-56,"Multiplication of -7 and 8 gives -56, so -56 is right." +384,What is the output of print(-3 * 9)?,-12,-26,-27,6,-27,"Multiplication of -3 and 9 gives -27, so -27 is right." +385,What is the output of print(-3 * 8)?,-24,-11,Error,5,-24,"Multiplication of -3 and 8 gives -24, so -24 is right." +386,Which function schedules multiple coroutines to run concurrently?,asyncio.sleep,asyncio.run,asyncio.gather,(),asyncio.gather,asyncio.gather schedules multiple coroutines to run concurrently and waits for them. +387,What is the output of print(-6 * 0)?,0,Error,-6,1,0,"Multiplication of -6 and 0 gives 0, so 0 is right." +388,What is the output of print(4 * -4)?,-16,8,-15,Error,-16,"Multiplication of 4 and -4 gives -16, so -16 is right." +389,What is the output of print(5 * 6)?,Error,31,-1,30,30,"Multiplication of 5 and 6 gives 30, so 30 is right." +390,What is the output of print(-1 * -9)?,Error,8,9,10,9,"Multiplication of -1 and -9 gives 9, so 9 is right." +391,What is the output of print(-4 * 6)?,Error,-25,-24,-23,-24,"Multiplication of -4 and 6 gives -24, so -24 is right." +392,What is the output of print(-9 * -3)?,-12,Error,26,27,27,"Multiplication of -9 and -3 gives 27, so 27 is right." +393,What is the output of print(-5 * 2)?,-11,-7,-10,-9,-10,"Multiplication of -5 and 2 gives -10, so -10 is right." +394,What is the output of print(4 * 1)?,4,3,5,Error,4,"Multiplication of 4 and 1 gives 4, so 4 is right." +395,What is the correct file extension for Python source files?,.pyc,.py,.pt,.pyt,.py,.py is correct because it matches how this feature behaves in Python. +396,What is the output of print(2 * -6)?,8,-4,-12,-11,-12,"Multiplication of 2 and -6 gives -12, so -12 is right." +397,What is the output of print(1 * -9)?,-10,-8,Error,-9,-9,"Multiplication of 1 and -9 gives -9, so -9 is right." +398,Which operator tests object identity?,is,id,in,(),is,"is checks whether two names reference the same object, not just equal values." +399,What is the output of print(-1 * -4)?,5,-5,4,Error,4,"Multiplication of -1 and -4 gives 4, so 4 is right." +400,What is the output of print(2 * 7)?,14,15,-5,9,14,"Multiplication of 2 and 7 gives 14, so 14 is right." +401,What is the output of print(9 * 8)?,1,Error,72,71,72,"Multiplication of 9 and 8 gives 72, so 72 is right." +402,What is the output of print(type([]).__name__)?,list,set,dict,object,list,"Lists use square brackets and are mutable ordered collections, so their type is list." +403,What is the output of print(8 * 0)?,8,0,1,-1,0,"Multiplication of 8 and 0 gives 0, so 0 is right." +404,What is the output of print(2 * -7)?,9,Error,-13,-14,-14,"Multiplication of 2 and -7 gives -14, so -14 is right." +405,What is the output of print(4 * 8)?,-4,33,32,Error,32,"Multiplication of 4 and 8 gives 32, so 32 is right." +406,What is 'Python'.lower()?,python,Python,PYTHON,pYTHON,python,"String methods return new strings without changing the original, and this method does exactly what its name says." +407,What is the output of print(5 * 4)?,20,21,Error,19,20,"Multiplication of 5 and 4 gives 20, so 20 is right." +408,What is the output of print(-5 * -2)?,11,Error,10,-3,10,"Multiplication of -5 and -2 gives 10, so 10 is right." +409,What is the output of print(0 * 5)?,5,0,1,-5,0,"Multiplication of 0 and 5 gives 0, so 0 is right." +410,"What does {'a':1}.get('b',99) return?",KeyError,99,None,0,99,"get returns the default you pass when the key is missing, so you see 99." +411,What is the output of print(-8 * 5)?,-40,-13,-3,-41,-40,"Multiplication of -8 and 5 gives -40, so -40 is right." +412,What is the output of print(-9 * -1)?,9,Error,8,-8,9,"Multiplication of -9 and -1 gives 9, so 9 is right." +413,Which method joins a list of strings with a separator?,merge,join,combine,concat,join,join is correct because it matches how this feature behaves in Python. +414,What is the output of print(6 * 0)?,1,6,-1,0,0,"Multiplication of 6 and 0 gives 0, so 0 is right." +415,What is the output of print(4 * -5)?,-21,-20,-19,9,-20,"Multiplication of 4 and -5 gives -20, so -20 is right." +416,"What is len(set([1,1,2]))?",1,0,2,3,2,"len counts elements in the sequence, so the result matches the number of items shown." +417,"What does {'a':1}.get('b',99) return?",1,0,None,99,99,"get returns the default you pass when the key is missing, so you see 99." +418,What is the output of print(-4 * 9)?,-36,-37,5,-35,-36,"Multiplication of -4 and 9 gives -36, so -36 is right." +419,What is ''.strip()?,' ',,None,[],,nan is correct because it matches how this feature behaves in Python. +420,What is the output of print(3 * -7)?,-4,-20,-21,-22,-21,"Multiplication of 3 and -7 gives -21, so -21 is right." +421,"What is [1,2,3] + [4]?","[4,1,2,3]","[1,2,3]+[4]","[1,2,3]","[1, 2, 3, 4]","[1, 2, 3, 4]","[1, 2, 3, 4] is correct because it matches how this feature behaves in Python." +422,What is the output of print(-5 * 1)?,-6,Error,-4,-5,-5,"Multiplication of -5 and 1 gives -5, so -5 is right." +423,"What is {1,2,3} == {3,2,1}?",0,Error,TRUE,None,TRUE,Set equality ignores order; same elements mean True. +424,What is the output of print(9 * 7)?,Error,63,62,2,63,"Multiplication of 9 and 7 gives 63, so 63 is right." +425,What is the output of print(4 * -1)?,-3,-4,-5,Error,-4,"Multiplication of 4 and -1 gives -4, so -4 is right." +426,Which keyword creates a generator inside a function?,yield,generate,produce,'',yield,yield turns a function into a generator that produces values lazily. +427,What is the output of print(8 * 4)?,32,12,31,4,32,"Multiplication of 8 and 4 gives 32, so 32 is right." +428,What is the output of print(-1 * -9)?,-10,10,8,9,9,"Multiplication of -1 and -9 gives 9, so 9 is right." +429,Which library path object uses the / operator to join?,os.path,sys.path,pathlib.Path,shutil,pathlib.Path,pathlib.Path overloads the division operator to join path parts neatly. +430,What is the output of print(-9 * 4)?,-35,-5,-36,-13,-36,"Multiplication of -9 and 4 gives -36, so -36 is right." +431,Which collection does not allow duplicate elements?,list,set,deque,tuple,set,"Sets keep unique elements only, so duplicates collapse to one." +432,Which module helps parse command-line arguments?,shlex,getopt,click,argparse,argparse,argparse parses command-line arguments and automatically builds help messages. +433,What is the output of print(0 * 5)?,0,-1,-5,1,0,"Multiplication of 0 and 5 gives 0, so 0 is right." +434,What is the output of print(0 * -2)?,2,0,-1,1,0,"Multiplication of 0 and -2 gives 0, so 0 is right." +435,What is the output of print(9 * 9)?,18,82,Error,81,81,"Multiplication of 9 and 9 gives 81, so 81 is right." +436,What is the output of print(9 * 4)?,36,37,5,Error,36,"Multiplication of 9 and 4 gives 36, so 36 is right." +437,What is the output of print(6 * -2)?,4,-12,Error,8,-12,"Multiplication of 6 and -2 gives -12, so -12 is right." +438,What is the output of print(0 * 9)?,0,1,9,-9,0,"Multiplication of 0 and 9 gives 0, so 0 is right." +439,What is the output of print(-1 * -6)?,5,-7,6,7,6,"Multiplication of -1 and -6 gives 6, so 6 is right." +440,What is the output of print(1 * -9)?,-10,-8,-9,10,-9,"Multiplication of 1 and -9 gives -9, so -9 is right." +441,What is the output of print(8 * 5)?,41,Error,40,39,40,"Multiplication of 8 and 5 gives 40, so 40 is right." +442,What is bool([0])?,FALSE,TRUE,None,FALSE,TRUE,"Non-empty lists are truthy, even if they contain zero; so this is True." +443,What is the output of print(5 * 0)?,1,5,0,-1,0,"Multiplication of 5 and 0 gives 0, so 0 is right." +444,What is the output of print(1 * 0)?,Error,-1,0,1,0,"Multiplication of 1 and 0 gives 0, so 0 is right." +445,What is the output of print(3 * 2)?,6,Error,1,7,6,"Multiplication of 3 and 2 gives 6, so 6 is right." +446,What is 'Python'.lower()?,python,pYTHON,PYTHON,Python,python,"String methods return new strings without changing the original, and this method does exactly what its name says." +447,What is the output of print(5 * 6)?,-1,31,Error,30,30,"Multiplication of 5 and 6 gives 30, so 30 is right." +448,What is the output of print(5 * -3)?,-16,8,-15,2,-15,"Multiplication of 5 and -3 gives -15, so -15 is right." +449,Which keyword creates a generator inside a function?,generate,return,yield,produce,yield,yield turns a function into a generator that produces values lazily. +450,What is the output of print(-9 * -4)?,-13,-5,36,37,36,"Multiplication of -9 and -4 gives 36, so 36 is right." +451,What is type(range(3)).__name__?,generator,range,iterator,tuple,range,range objects have their own type in Python and generate sequences lazily. +452,What is the output of print(-4 * -4)?,-8,0,Error,16,16,"Multiplication of -4 and -4 gives 16, so 16 is right." +453,"What is len(set([1,1,2]))?",1,3,0,2,2,"len counts elements in the sequence, so the result matches the number of items shown." +454,What is the output of print(4 * -3)?,7,Error,-11,-12,-12,"Multiplication of 4 and -3 gives -12, so -12 is right." +455,What is the output of print(4 * -3)?,Error,-11,7,-12,-12,"Multiplication of 4 and -3 gives -12, so -12 is right." +456,What does len('hello') return?,6,0,5,4,5,"len counts elements in the sequence, so the result matches the number of items shown." +457,What is the output of print(3 * -2)?,Error,1,-5,-6,-6,"Multiplication of 3 and -2 gives -6, so -6 is right." +458,What is the file mode to read text (default)?,r,rt,rb,(),r,r opens a file for reading text by default. +459,What is the output of print(2 * -6)?,-13,Error,-12,-11,-12,"Multiplication of 2 and -6 gives -12, so -12 is right." +460,Which keyword is used to define a coroutine function?,TRUE,await def,def coroutine,async def,async def,async def defines a coroutine function that can be awaited. +461,What is the output of print(-3 * 2)?,Error,-6,-7,-1,-6,"Multiplication of -3 and 2 gives -6, so -6 is right." +462,What is the output of print(7 * 3)?,Error,21,22,4,21,"Multiplication of 7 and 3 gives 21, so 21 is right." +463,What is the output of print(-5 * 8)?,-41,-13,-39,-40,-40,"Multiplication of -5 and 8 gives -40, so -40 is right." +464,What is the output of print(3 * -6)?,-3,-18,-19,9,-18,"Multiplication of 3 and -6 gives -18, so -18 is right." +465,What is the output of print(-2 * 5)?,-7,3,-11,-10,-10,"Multiplication of -2 and 5 gives -10, so -10 is right." +466,"What is len(set([1,1,2]))?",1,2,0,Error,2,"len counts elements in the sequence, so the result matches the number of items shown." +467,What is the output of print(9 * 7)?,Error,2,16,63,63,"Multiplication of 9 and 7 gives 63, so 63 is right." +468,What is the output of print(-3 * 8)?,Error,-24,-23,5,-24,"Multiplication of -3 and 8 gives -24, so -24 is right." +469,What is -3 % 2?,-1,3,1,2,1,1 is correct because it matches how this feature behaves in Python. +470,Which statement is used to handle exceptions?,handle ... except,try ... except,if ... else,trap ... recover,try ... except,try ... except is correct because it matches how this feature behaves in Python. +471,Which keyword defines a function in Python?,0,func,lambda,def,def,def is correct because it matches how this feature behaves in Python. +472,What is the output of print(5 * 0)?,5,0,Error,1,0,"Multiplication of 5 and 0 gives 0, so 0 is right." +473,What is the output of print(-4 * 0)?,Error,-4,-1,0,0,"Multiplication of -4 and 0 gives 0, so 0 is right." +474,What is the output of print(-5 * 8)?,-39,-40,-13,-41,-40,"Multiplication of -5 and 8 gives -40, so -40 is right." +475,What is the output of print(-3 * -8)?,Error,5,24,25,24,"Multiplication of -3 and -8 gives 24, so 24 is right." +476,What is the output of print(-4 * 6)?,-24,2,Error,-10,-24,"Multiplication of -4 and 6 gives -24, so -24 is right." +477,What is the output of print(3 * 1)?,3,Error,2,4,3,"Multiplication of 3 and 1 gives 3, so 3 is right." +478,What is the output of print(1 * -2)?,-3,Error,-2,-1,-2,"Multiplication of 1 and -2 gives -2, so -2 is right." +479,What is the output of print(-9 * -3)?,-6,27,Error,26,27,"Multiplication of -9 and -3 gives 27, so 27 is right." +480,What is the output of print(7 * 3)?,22,20,21,Error,21,"Multiplication of 7 and 3 gives 21, so 21 is right." +481,"Which function returns an iterator of (index, value) pairs?",enumerate,zip,map,TRUE,enumerate,enumerate gives you index and value for each item as you iterate. +482,Which keyword prevents a dataclass from being mutable?,static=True,final=True,frozen=True,sealed=True,frozen=True,frozen=True is correct because it matches how this feature behaves in Python. +483,What is the output of print(4 * -8)?,-32,-4,-31,-33,-32,"Multiplication of 4 and -8 gives -32, so -32 is right." +484,What is the output of print(5 * 3)?,16,14,8,15,15,"Multiplication of 5 and 3 gives 15, so 15 is right." +485,What is the output of print(-1 * 1)?,-2,0,-1,Error,-1,"Multiplication of -1 and 1 gives -1, so -1 is right." +486,What is the output of print(-7 * 4)?,-29,-3,-28,-27,-28,"Multiplication of -7 and 4 gives -28, so -28 is right." +487,What is the output of print(-5 * 8)?,3,-40,-41,-13,-40,"Multiplication of -5 and 8 gives -40, so -40 is right." +488,Which built-in converts bytes to str?,bytes.decode,format,str.encode,repr,bytes.decode,bytes.decode is correct because it matches how this feature behaves in Python. +489,What is the output of print(-2 * 6)?,-12,Error,-13,4,-12,"Multiplication of -2 and 6 gives -12, so -12 is right." +490,"What is list(map(lambda x:x+1,[1,2]))?","[2,3,4]","[1,2]","[2, 3]","[3,4]","[2, 3]","[2, 3] is correct because it matches how this feature behaves in Python." +491,What is the output of print(5 * -3)?,2,-15,-16,-14,-15,"Multiplication of 5 and -3 gives -15, so -15 is right." +492,What is the output of print(8 * 1)?,9,7,8,Error,8,"Multiplication of 8 and 1 gives 8, so 8 is right." +493,"What is ''.join(['a','b'])?","['a','b']",ab,"a,b",a b,ab,join glues the strings together using the given separator; an empty separator just concatenates them. +494,What is the output of print(5 * 9)?,-4,44,45,14,45,"Multiplication of 5 and 9 gives 45, so 45 is right." +495,Which method returns a new sorted list without modifying the original?,order,sort,arrange,sorted,sorted,sorted is correct because it matches how this feature behaves in Python. +496,What does PEP stand for?,Python Extended Plan,Python Enhancement Proposal,TRUE,Python Engineering Plan,Python Enhancement Proposal,"PEP means Python Enhancement Proposal, which documents ideas and changes to the language." +497,What is the output of print(-8 * 9)?,-71,-73,-72,-17,-72,"Multiplication of -8 and 9 gives -72, so -72 is right." +498,What is the output of print(7 * 8)?,56,55,15,-1,56,"Multiplication of 7 and 8 gives 56, so 56 is right." +499,Which data structure is best for FIFO operations in collections?,list,tuple,collections.deque,set,collections.deque,"collections.deque is built for fast appends and pops from both ends, perfect for FIFO queues." +500,Which operator tests object identity?,in,equals,==,is,is,"is checks whether two names reference the same object, not just equal values." From 0c977417add3c3d80ef6625c20b488455e1e3471 Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 21:16:33 -0500 Subject: [PATCH 11/28] build workflow --- .github/workflows/build.yaml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..04f3b7a --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,40 @@ +name: CI / CD +on: [pull_request] +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + matrix: + python-version: ["3.9", "3.11"] + steps: + - uses: actions/checkout@v4 + - name: Install Python, pipenv and Pipfile packages + uses: kojoru/prepare-pipenv@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Turn on 'editable' mode + run: | + pipenv install -e . + - name: Test with pytest + run: | + pipenv install pytest + pipenv --venv + pipenv run python -m pytest + # deliver: + # needs: [build] + # runs-on: ubuntu-latest + # timeout-minutes: 5 + # steps: + # - uses: actions/checkout@v4 + # - name: Install Python, pipenv and Pipfile packages + # uses: kojoru/prepare-pipenv@v1 + # - name: Build package + # run: | + # pipenv install build + # pipenv run python -m build . + # - name: Publish to PyPI test server + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # password: ${{ secrets.TEST_PYPI_API_TOKEN }} + # repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From 775433305059709e048d8d5caef047e102425e6e Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 21:18:32 -0500 Subject: [PATCH 12/28] badge readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65a66ad..dab2728 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # EmojiGuessr -[![](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/event-logger.yml/badge.svg)](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/event-logger.yml) +[![](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/build.yaml/badge.svg)](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/build.yaml) Link to PyPI: []() From e272f24769ed533598eb64d8fe88a0e6a32dd70a Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:01:10 -0500 Subject: [PATCH 13/28] first data.random_emojis test --- Pipfile | 7 +++++- Pipfile.lock | 16 +++++++++++--- README.md | 2 ++ tests/test_data.py | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 tests/test_data.py diff --git a/Pipfile b/Pipfile index e37cf8b..bba80c8 100644 --- a/Pipfile +++ b/Pipfile @@ -3,12 +3,17 @@ name = "pypi" url = "https://pypi.org/simple" verify_ssl = true +[[source]] +url = "https://test.pypi.org/simple/" +verify_ssl = true +name = "testpypi" + [packages] coverage = "*" twine = "*" build = "*" pytest = "*" -emojiguessr = {file = ".", editable = true} +emojiguessr = {version = "==0.0.1", index = "testpypi"} [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index f544a26..6938beb 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "0bb31abc3f9385f65dcb125d368c70ec58c2755c72e4fa58d1492ecdb2544384" + "sha256": "7dd36bddba3fac1f94a3df09c3fa5a5754ab7c78286538f2a0a62c8aaeff1b5c" }, "pipfile-spec": 6, "requires": { @@ -12,6 +12,11 @@ "name": "pypi", "url": "https://pypi.org/simple", "verify_ssl": true + }, + { + "name": "testpypi", + "url": "https://test.pypi.org/simple/", + "verify_ssl": true } ] }, @@ -260,8 +265,13 @@ "version": "==0.22.2" }, "emojiguessr": { - "editable": true, - "file": "." + "hashes": [ + "sha256:12f28a5cf04d91b1eb9727a97a71eb9b38b9d5d23af19f8fa7bbcb90dc0769e1", + "sha256:ed6f411982b4e6fc7ddb7593d57a091f244c54932686380a34462dcbc5d10f71" + ], + "index": "testpypi", + "markers": "python_version >= '3.9'", + "version": "==0.0.1" }, "id": { "hashes": [ diff --git a/README.md b/README.md index dab2728..7ebc4af 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ member5 ## Installation +pipenv install -i https://test.pypi.org/simple/ emojiguessr==0.0.1 + ## Usage (code examples) ## Develop and Contribute diff --git a/tests/test_data.py b/tests/test_data.py new file mode 100644 index 0000000..e1d865d --- /dev/null +++ b/tests/test_data.py @@ -0,0 +1,53 @@ +import pytest +from emojiguessr import data + +class Tests: + # + # Fixtures - these are functions that can do any optional setup or teardown before or after a test function is run. + # + + @pytest.fixture + def example_fixture(self): + """ + An example of a pytest fixture - a function that can be used for setup and teardown before and after test functions are run. + """ + + # place any setup you want to do before any test function that uses this fixture is run + + yield # at th=e yield point, the test function will run and do its business + + # place with any teardown you want to do after any test function that uses this fixture has completed + + + # + # Test functions + # + + def test_sanity_check(self, example_fixture): + """ + Test debugging... making sure that we can run a simple test that always passes. + Note the use of the example_fixture in the parameter list - any setup and teardown in that fixture will be run before and after this test function executes + From the main project directory, run the `python3 -m pytest` command to run all tests. + """ + expected = True # the value we expect to be present + actual = True # the value we see in reality + assert actual == expected, "Expected True to be equal to True!" + + def test_random_emojis(self): + """ + Verify random_emojis() function and make sure it returns the correct number of emojis. + """ + # test with default parameters + actual = data.random_emojis() + assert ( + len(actual) == 3 + ), f"Expected random_emojis() to return 3 emojis by default. Instead, it returned {len(actual)} emojis." + + # test with counts 1-10 + for i in range(10): + actual = data.random_emojis(i) + assert ( + len(actual) == i + ), f"Expected random_emojis({i}) to return {i} emojis. Instead, it returned {len(actual)} emojis." + + From f0eb7b5a77eddfca7bc924d2ac7b111558e2aec9 Mon Sep 17 00:00:00 2001 From: KhushbooAgrawal190803 Date: Tue, 4 Nov 2025 22:01:56 -0500 Subject: [PATCH 14/28] Delete quizproject/data directory to work on emoji quiz --- quizproject/data/easy.csv | 501 -------------------------------- quizproject/data/flashcards.csv | 501 -------------------------------- quizproject/data/hard.csv | 501 -------------------------------- quizproject/data/medium.csv | 501 -------------------------------- 4 files changed, 2004 deletions(-) delete mode 100644 quizproject/data/easy.csv delete mode 100644 quizproject/data/flashcards.csv delete mode 100644 quizproject/data/hard.csv delete mode 100644 quizproject/data/medium.csv diff --git a/quizproject/data/easy.csv b/quizproject/data/easy.csv deleted file mode 100644 index ae48080..0000000 --- a/quizproject/data/easy.csv +++ /dev/null @@ -1,501 +0,0 @@ -Question ID,Question,Answer -1,The expression `-37 + -39 == 1443` evaluates to True,FALSE -2,The expression `'python'[::-1] == 'nohtyp'` evaluates to True,TRUE -3,The expression `-2 + -15 == 30` evaluates to True,FALSE -4,The standard library module statistics exists,TRUE -5,The expression `[x*x for x in range(4)][-1] == 9` evaluates to True,TRUE -6,The expression `-21 + 48 == -1008` evaluates to True,FALSE -7,The expression `[x*x for x in range(26)][-1] == 625` evaluates to True,TRUE -8,staticmethod receives no implicit first argument,TRUE -9,filter returns a list in Python 3,FALSE -10,The expression `19 + -39 == -741` evaluates to True,FALSE -11,Exceptions in Python must inherit from BaseException,TRUE -12,The expression `-45 * 43 == -1935` evaluates to True,TRUE -13,The expression `-10 + 1 == -10` evaluates to True,FALSE -14,hash of a tuple of only hashable items works,TRUE -15,The expression `-23 * 22 == -506` evaluates to True,TRUE -16,"isinstance(True, int) is True",TRUE -17,"The expression `min([3,1,2]) == 1` evaluates to True",TRUE -18,"The expression `{1,2,3} - {2} == {1,3}` evaluates to True",TRUE -19,asyncio.run creates and runs an event loop,TRUE -20,"The expression {'a':1}.get('b', 99) returns 99",TRUE -21,The expression `-21 * -38 == 798` evaluates to True,TRUE -22,The expression `sum(x for x in range(8)) == 64` evaluates to True,FALSE -23,NaN is not equal to itself by definition,TRUE -24,os.environ is a mapping of environment variables,TRUE -25,match case is a structural pattern matching syntax introduced in Python 3.10,TRUE -26,map returns an iterator in Python 3,TRUE -27,Accessing a missing key with dict indexing raises KeyError,TRUE -28,"The expression any(x%3==0 for x in [1,2,3,4]) is True",TRUE -29,"List comprehension [x for x in range(3)] creates a list [0,1,2]",TRUE -30,The expression `-3 * -5 == 15` evaluates to True,TRUE -31,Pathlib Path objects support division operator for joining paths,TRUE -32,The expression len(range(5)) equals 5,TRUE -33,format specifiers like f'{3.14159:.2f}' are valid,TRUE -34,The expression `-2 + -38 == 76` evaluates to True,FALSE -35,The expression `sum(x for x in range(26)) == 676` evaluates to True,FALSE -36,time.sleep blocks the current thread,TRUE -37,The slice 'pythonista'[0:3] equals 'pyt',TRUE -38,The key parameter for sorted accepts a function,TRUE -39,The expression `[x*x for x in range(12)][-1] == 121` evaluates to True,TRUE -40,set is unordered so its iteration order is not guaranteed,TRUE -41,A generator expression uses parentheses like (x*x for x in range(3)),TRUE -42,"The expression any([False, False, True]) is True",TRUE -43,The expression `18 + 43 == 774` evaluates to True,FALSE -44,The expression `sum(range(20)) == 190` evaluates to True,TRUE -45,The expression `sum(range(35)) == 595` evaluates to True,TRUE -46,The expression `sum(x for x in range(9)) == 81` evaluates to True,FALSE -47,The expression `sum(x for x in range(28)) == 784` evaluates to True,FALSE -48,"The expression `dict(a=1,b=2)['a'] == (1999)` evaluates to True",FALSE -49,The expression `[x*x for x in range(23)][-1] == 484` evaluates to True,TRUE -50,The expression `sum(range(10)) == 45` evaluates to True,TRUE -51,The expression `[x*x for x in range(29)][-1] == 784` evaluates to True,TRUE -52,csv module can both read and write CSV files,TRUE -53,A class __init__ method may return a non None value,FALSE -54,dataclasses can generate __init__ and __repr__ automatically,TRUE -55,The expression `[x*x for x in range(5)][-1] == 16` evaluates to True,TRUE -56,GIL means Global Interpreter Lock,TRUE -57,Ellipsis ... is a valid singleton object in Python,TRUE -58,The expression `-15 + -50 == 750` evaluates to True,FALSE -59,The expression `-13 * -40 == 520` evaluates to True,TRUE -60,The expression 'PY' in 'python' is True,FALSE -61,argparse helps parse command line arguments,TRUE -62,The expression `38 + 21 == 798` evaluates to True,FALSE -63,The operator is checks identity not equality,TRUE -64,The expression `41 + 33 == 1353` evaluates to True,FALSE -65,"The expression `sorted({'b':2,'a':1}) == ['a','b']` evaluates to True",TRUE -66,The expression '10' < '2' is True for string comparison,TRUE -67,PEP stands for Python Enhancement Proposal,TRUE -68,The expression `-2 * -38 == 76` evaluates to True,TRUE -69,classmethod receives the class as its first argument,TRUE -70,The expression `8 + 31 == 248` evaluates to True,FALSE -71,The expression `(i for i in range(3)).__iter__() is not None` evaluates to True,TRUE -72,The expression -3 % 2 equals 1,TRUE -73,The expression `-19 + -30 == 570` evaluates to True,FALSE -74,The module typing provides Protocol and TypedDict,TRUE -75,The expression `sum(x for x in range(20)) == 400` evaluates to True,FALSE -76,The expression `sum(x for x in range(12)) == 144` evaluates to True,FALSE -77,The expression `[x*x for x in range(16)][-1] == 225` evaluates to True,TRUE -78,"The expression `{1: 'a', 2: 'b'}.get(3) is None` evaluates to True",TRUE -79,The expression `sum(range(40)) == 780` evaluates to True,TRUE -80,The expression 'รค'.encode('ascii') succeeds,FALSE -81,The slice object can be used to slice sequences programmatically,TRUE -82,Python uses indentation to define blocks,TRUE -83,The expression `[x*x for x in range(31)][-1] == 900` evaluates to True,TRUE -84,The expression `8 * 31 == 248` evaluates to True,TRUE -85,__str__ is intended for a user friendly representation,TRUE -86,The expression `sum(x for x in range(25)) == 625` evaluates to True,FALSE -87,The expression `44 * -37 == -1628` evaluates to True,TRUE -88,The expression `-21 + -38 == 798` evaluates to True,FALSE -89,"The expression [1,2] * 2 equals [1,2,1,2]",TRUE -90,str.encode converts str to bytes,TRUE -91,The expression `[x*x for x in range(9)][-1] == 64` evaluates to True,TRUE -92,The expression `-22 * 37 == -814` evaluates to True,TRUE -93,functools.partial can freeze some function arguments,TRUE -94,The expression `9 * -2 == -18` evaluates to True,TRUE -95,The expression sys.getrecursionlimit returns the current recursion depth limit,TRUE -96,The expression {'a':1} | {'b':2} merges dictionaries in Python 3.9 plus,TRUE -97,The expression 0.1 + 0.2 == 0.3 evaluates to True,FALSE -98,The module functools provides lru_cache,TRUE -99,dict.get returns None by default when a key is missing,TRUE -100,range produces values lazily rather than storing all values,TRUE -101,deque supports fast appends and pops from both ends,TRUE -102,The expression -3 // 2 equals -2,TRUE -103,The expression 'python'.title() equals 'Python',TRUE -104,The expression `27 + -17 == -459` evaluates to True,FALSE -105,The walrus operator can be used inside list comprehensions,TRUE -106,"The expression max([], default=0) returns 0",TRUE -107,The operator in on a string checks for substring presence,TRUE -108,The expression `-41 * 27 == -1107` evaluates to True,TRUE -109,The expression `37 + 32 == 1184` evaluates to True,FALSE -110,"The expression `tuple(x for x in range(3)) == ((0,1,2)999)` evaluates to True",FALSE -111,datetime.datetime is timezone naive by default,TRUE -112,open supports text and binary modes via 't' and 'b' flags,TRUE -113,The expression None == 0 is True,FALSE -114,async def defines a coroutine function,TRUE -115,"The expression `not ({1: 'a', 2: 'b'}.get(3) is None)` evaluates to True",FALSE -116,The expression 'abc'.index('d') returns -1,FALSE -117,The expression `[x*x for x in range(7)][-1] == 36` evaluates to True,TRUE -118,The expression `[x*x for x in range(15)][-1] == 196` evaluates to True,TRUE -119,The expression `-46 * -47 == 2162` evaluates to True,TRUE -120,The expression `7 + 25 == 175` evaluates to True,FALSE -121,Python supports underscores in numeric literals like 1_000_000,TRUE -122,The expression `[x*x for x in range(28)][-1] == 729` evaluates to True,TRUE -123,"The expression `len(list(zip_longest := __import__('itertools').zip_longest([],[]))) == (0999)` evaluates to True",FALSE -124,The slice 'data science'[-3:] equals 'nce',TRUE -125,The expression `-22 + 37 == -814` evaluates to True,FALSE -126,pip is the default Python package installer,TRUE -127,Accessing a list at an out of range index raises IndexError,TRUE -128,The expression `-40 * 20 == -800` evaluates to True,TRUE -129,The keyword nonlocal affects names in the nearest enclosing function scope,TRUE -130,The expression `[x*x for x in range(14)][-1] == 169` evaluates to True,TRUE -131,The expression `21 * -25 == -525` evaluates to True,TRUE -132,fractions.Fraction can represent rational numbers exactly,TRUE -133,The expression `-24 * 35 == -840` evaluates to True,TRUE -134,random.seed makes random results reproducible,TRUE -135,The expression `-22 + -33 == 726` evaluates to True,FALSE -136,The built in function chr returns a character from a code point,TRUE -137,The expression `-21 + -46 == 966` evaluates to True,FALSE -138,The expression `sum(x for x in range(22)) == 484` evaluates to True,FALSE -139,setdefault on dict inserts a default if the key is missing,TRUE -140,The expression `18 * 43 == 774` evaluates to True,TRUE -141,The expression bool([]) is True,FALSE -142,The expression 'A' < 'a' is True in ASCII,TRUE -143,The expression [][0:5] returns [],TRUE -144,The expression `[x*x for x in range(13)][-1] == 144` evaluates to True,TRUE -145,Set comprehension uses curly braces like {x for x in range(3)},TRUE -146,math.inf is a float representing infinity,TRUE -147,The expression list({1: 'a'}) equals [1],TRUE -148,The expression `'abc'.upper() == 'ABC'` evaluates to True,TRUE -149,bool of an empty dict is False,TRUE -150,The slice 'pythonista'[-3:] equals 'sta',TRUE -151,"The expression tuple([1,2]) equals (1,2)",TRUE -152,The slice 'abcdef'[-3:] equals 'def',TRUE -153,The expression `-16 + 31 == -496` evaluates to True,FALSE -154,The expression `-16 * 39 == -624` evaluates to True,TRUE -155,super works only with single inheritance,FALSE -156,The expression `31 * -29 == -899` evaluates to True,TRUE -157,The expression `39 + 4 == 156` evaluates to True,FALSE -158,The expression `-7 + -15 == 105` evaluates to True,FALSE -159,copy.deepcopy performs a deep copy,TRUE -160,The expression 'Hello'.lower() == 'hello',TRUE -161,The slice 'data science'[0:3] equals 'dat',TRUE -162,Tabs and spaces can be mixed safely in Python 3,FALSE -163,The expression `-21 * -46 == 966` evaluates to True,TRUE -164,The expression `-4 + -30 == 120` evaluates to True,FALSE -165,"The expression `sorted({3,1,2}) == [1,2,3]` evaluates to True",TRUE -166,__repr__ is intended to be an unambiguous representation of an object,TRUE -167,"The expression len({'a':1, 'b':2}) equals 2",TRUE -168,The walrus operator is written as :=,TRUE -169,The expression `-19 * -30 == 570` evaluates to True,TRUE -170,pickle loads untrusted data safely,FALSE -171,The expression `25 + 4 == 100` evaluates to True,FALSE -172,The expression `sum(range(55)) == 1485` evaluates to True,TRUE -173,pathlib.Path objects represent filesystem paths,TRUE -174,"The expression `not (all(x<5 for x in [0,1,2,3,4]))` evaluates to True",FALSE -175,super can call methods from a base class,TRUE -176,You can use expression inside f strings like f'{2+3}',TRUE -177,"The expression `any(x%2==0 for x in [1,3,5,6])` evaluates to True",TRUE -178,The expression `[x*x for x in range(21)][-1] == 400` evaluates to True,TRUE -179,The expression `-24 + 35 == -840` evaluates to True,FALSE -180,The expression '5' + 5 produces 10,FALSE -181,The expression `sum(x for x in range(17)) == 289` evaluates to True,FALSE -182,The expression `sum(x for x in range(23)) == 529` evaluates to True,FALSE -183,Multiple inheritance is supported in Python,TRUE -184,The in operator on a dictionary tests keys by default,TRUE -185,The expression 'abc' * 3 equals 'abcabcabc',TRUE -186,The expression `40 * -42 == -1680` evaluates to True,TRUE -187,bytes are sequences of integers 0 to 255,TRUE -188,threading.Thread targets run in the same process,TRUE -189,hash randomization can make dict order vary between processes when not insertion ordered,FALSE -190,f strings are prefixed with f,TRUE -191,bisect can locate insertion points in sorted lists,TRUE -192,The expression `'python'[1:4] == ('yth'999)` evaluates to True,FALSE -193,hash of a list works,FALSE -194,The expression `sum(x for x in range(16)) == 256` evaluates to True,FALSE -195,"The expression any([False, False]) equals False",TRUE -196,threading.Lock can be used as a context manager,TRUE -197,The expression `'mississippi'.count('ss') == 2` evaluates to True,TRUE -198,The with statement ensures proper resource cleanup for context managers,TRUE -199,"The expression ''.join(['a','b']) equals 'ab'",TRUE -200,The expression `sum(x for x in range(19)) == 361` evaluates to True,FALSE -201,Method resolution order is determined by C3 linearization,TRUE -202,The expression `-47 * 44 == -2068` evaluates to True,TRUE -203,"The expression `list(map(lambda x: x+1, [1,2])) == ([2,3]999)` evaluates to True",FALSE -204,"The expression `{1,2,3}.issuperset({1,2})` evaluates to True",TRUE -205,The expression `-9 * 48 == -432` evaluates to True,TRUE -206,"The expression [1,2,3] == [3,2,1] is True",FALSE -207,The expression `sum(x for x in range(3)) == 9` evaluates to True,FALSE -208,The expression `40 + -42 == -1680` evaluates to True,FALSE -209,json.dumps converts Python objects to JSON strings,TRUE -210,tempfile.TemporaryDirectory cleans up on exit from its context,TRUE -211,"The expression `max([3,1,2]) == 3` evaluates to True",TRUE -212,The expression `sum(range(50)) == 1225` evaluates to True,TRUE -213,A dataclass with frozen True is immutable,TRUE -214,"The expression `{1,2,3} - {2} == ({1,3}999)` evaluates to True",FALSE -215,The GIL allows only one thread to execute Python bytecode at a time,TRUE -216,"The expression [1,2,3].append(4) modifies the list in place",TRUE -217,You can annotate variables with types without enforcing them at runtime,TRUE -218,subprocess.run can execute external programs,TRUE -219,int supports arbitrary precision without overflow in normal use,TRUE -220,The expression `-15 * -50 == 750` evaluates to True,TRUE -221,The expression `-16 + 39 == -624` evaluates to True,FALSE -222,ZeroDivisionError is raised for division by zero,TRUE -223,The expression int(True) equals 1,TRUE -224,The expression {x for x in 'aaab'} has length 2,TRUE -225,A list can be used as a dictionary key,FALSE -226,The expression `sum(i*i for i in range(4)) == 14` evaluates to True,TRUE -227,bool of an empty set is False,TRUE -228,"The expression `len(list(zip_longest := __import__('itertools').zip_longest([],[]))) == 0` evaluates to True",TRUE -229,The expression `47 + -30 == -1410` evaluates to True,FALSE -230,A lambda can contain statements,FALSE -231,The expression `9 + -2 == -18` evaluates to True,FALSE -232,if __name__ == '__main__' guards top level script execution,TRUE -233,"The expression `list(filter(None, [0,1,2])) == [1,2]` evaluates to True",TRUE -234,"The expression `max([3,1,2]) == (3999)` evaluates to True",FALSE -235,Virtual environments help isolate dependencies,TRUE -236,The expression `27 * -17 == -459` evaluates to True,TRUE -237,The expression `29 + -4 == -116` evaluates to True,FALSE -238,A Python set cannot contain duplicate elements,TRUE -239,A tuple can be used as a dictionary key if it contains only hashable items,TRUE -240,The expression `-47 + 44 == -2068` evaluates to True,FALSE -241,typing.List is mainly for type hints not for runtime subclass checks,TRUE -242,"The expression `list(map(lambda x: x+1, [1,2])) == [2,3]` evaluates to True",TRUE -243,The expression `'abc'.capitalize() == ('Abc'999)` evaluates to True,FALSE -244,The expression `39 + 19 == 741` evaluates to True,FALSE -245,"The expression [1,2,3].append(4) returns [1,2,3,4]",FALSE -246,The expression `-3 + -5 == 15` evaluates to True,FALSE -247,The expression `'mississippi'.count('ss') == (2999)` evaluates to True,FALSE -248,The expression 2**3 equals 8,TRUE -249,The expression `31 + -29 == -899` evaluates to True,FALSE -250,The expression `-46 + -47 == 2162` evaluates to True,FALSE -251,"The expression `{1,2}.issuperset({1,2,3})` evaluates to True",FALSE -252,The expression `-23 + 22 == -506` evaluates to True,FALSE -253,match case can destructure sequences and mappings,TRUE -254,open with mode 'xb' creates a file and fails if it exists,TRUE -255,The expression sum([]) equals 0,TRUE -256,zip stops at the shortest input,TRUE -257,The expression `[x*x for x in range(30)][-1] == 841` evaluates to True,TRUE -258,bytes.decode converts bytes to str,TRUE -259,"The expression `sorted({'b':2,'a':1}) == (['a','b']999)` evaluates to True",FALSE -260,"The expression len(set([1,1,2])) equals 2",TRUE -261,The expression `-31 + -23 == 713` evaluates to True,FALSE -262,The expression `sum(x for x in range(30)) == 900` evaluates to True,FALSE -263,format can specify alignment and width,TRUE -264,The expression 'Python'.swapcase() equals 'pYTHON',TRUE -265,The expression `39 * 19 == 741` evaluates to True,TRUE -266,The expression `-45 + 34 == -1530` evaluates to True,FALSE -267,The expression float('nan') == float('nan') is True,FALSE -268,The expression 'abc'.find('d') returns -1,TRUE -269,The expression `[x*x for x in range(17)][-1] == 256` evaluates to True,TRUE -270,multiprocessing.Process targets run in a separate process,TRUE -271,The expression `49 + -43 == -2107` evaluates to True,FALSE -272,The expression `sum(i*i for i in range(4)) == (14999)` evaluates to True,FALSE -273,"The expression `''.join(sorted(set('aba'))) in ('ab','ba')` evaluates to True",TRUE -274,Using dict.get on a missing key raises KeyError by default,FALSE -275,"The expression `sum(1 for _ in zip([1,2,3],[4,5])) == (2999)` evaluates to True",FALSE -276,asyncio.gather can run coroutines concurrently,TRUE -277,The expression `3 + -22 == -66` evaluates to True,FALSE -278,The expression `not ((i for i in range(3)).__iter__() is not None)` evaluates to True,FALSE -279,The expression `-2 * -15 == 30` evaluates to True,TRUE -280,defaultdict can supply default values for missing keys,TRUE -281,raise can be used without specifying an exception inside an except block to re raise,TRUE -282,"with open('x.txt','w') as f ensures f is closed on exit",TRUE -283,The method extend adds elements from an iterable to a list,TRUE -284,"The expression `sorted({3,1,2}) == ([1,2,3]999)` evaluates to True",FALSE -285,The expression `sum(range(30)) == 435` evaluates to True,TRUE -286,await can be used at top level in a normal module without an event loop,FALSE -287,pip installs go into the standard library,FALSE -288,The expression `49 * -43 == -2107` evaluates to True,TRUE -289,The expression `-13 * 30 == -390` evaluates to True,TRUE -290,decimal.Decimal can represent decimal fractions exactly,TRUE -291,The expression `-9 + 48 == -432` evaluates to True,FALSE -292,finally blocks run even if a return executes in try or except,TRUE -293,The expression `[x*x for x in range(27)][-1] == 676` evaluates to True,TRUE -294,The expression `-45 + 43 == -1935` evaluates to True,FALSE -295,help shows documentation in an interactive pager,TRUE -296,The expression `-21 + 14 == -294` evaluates to True,FALSE -297,"The expression `sum(1 for _ in zip([1,2,3],[4,5])) == 2` evaluates to True",TRUE -298,The expression `8 * 18 == 144` evaluates to True,TRUE -299,The expression `36 + 44 == 1584` evaluates to True,FALSE -300,The expression min([]) raises ValueError,TRUE -301,The expression `27 + -47 == -1269` evaluates to True,FALSE -302,Two identical small integers may be identical objects due to interning,TRUE -303,The expression bool([0]) is True,TRUE -304,The expression `-39 * -23 == 897` evaluates to True,TRUE -305,"The expression {1,2,3} == {3,2,1} is True",TRUE -306,The expression `31 + -36 == -1116` evaluates to True,FALSE -307,The expression `29 * -4 == -116` evaluates to True,TRUE -308,"The expression `all(x<5 for x in [0,1,2,3,4])` evaluates to True",TRUE -309,Strings in Python are immutable,TRUE -310,Reading a closed file succeeds,FALSE -311,"The expression `tuple(x for x in range(3)) == (0,1,2)` evaluates to True",TRUE -312,The expression `27 * -47 == -1269` evaluates to True,TRUE -313,In Python bool is a subclass of int,TRUE -314,The expression `-16 * -42 == 672` evaluates to True,TRUE -315,The expression `sum(x for x in range(24)) == 576` evaluates to True,FALSE -316,"The expression `{1,2}.issubset({1,2,3})` evaluates to True",TRUE -317,The expression `[x*x for x in range(3)][-1] == 4` evaluates to True,TRUE -318,The expression `36 * 44 == 1584` evaluates to True,TRUE -319,math.isclose compares floats within a tolerance,TRUE -320,A function without a return statement returns None,TRUE -321,The default argument values are evaluated at function definition time,TRUE -322,The expression `-7 * -15 == 105` evaluates to True,TRUE -323,The expression print returns None,TRUE -324,The expression 5/2 returns an int,FALSE -325,The keyword global allows assignment to a module level name inside a function,TRUE -326,Chained comparisons like 1 < 2 < 3 are valid syntax,TRUE -327,The expression `[x*x for x in range(8)][-1] == 49` evaluates to True,TRUE -328,contextlib.contextmanager can turn a generator into a context manager,TRUE -329,The expression `sum(x for x in range(21)) == 441` evaluates to True,FALSE -330,typing.Final indicates a name should not be reassigned,TRUE -331,"The expression `'abc'.replace('b','x') == 'axc'` evaluates to True",TRUE -332,The built in function id returns the memory identity of an object,TRUE -333,PEP 8 is the official Python style guide,TRUE -334,"round(2.675, 2) equals 2.67 in binary floating point",TRUE -335,itertools.product produces cartesian products,TRUE -336,The expression `[x*x for x in range(6)][-1] == 25` evaluates to True,TRUE -337,lstrip removes from the left only,TRUE -338,"The expression `round(2.5) in (2,3)` evaluates to True",TRUE -339,The membership test 'z' in 'pythonista' is True,FALSE -340,The membership test 'z' in 'abcdef' is True,FALSE -341,The built in function ord returns the code point of a character,TRUE -342,The expression `8 + 18 == 144` evaluates to True,FALSE -343,copy.copy performs a shallow copy,TRUE -344,The expression `-21 * 48 == -1008` evaluates to True,TRUE -345,The expression `-39 + -23 == 897` evaluates to True,FALSE -346,json.loads converts JSON strings to Python objects,TRUE -347,The expression ''.strip() on an empty string returns '',TRUE -348,"The expression `{1,2} | {2,3} == ({1,2,3}999)` evaluates to True",FALSE -349,The expression `7 * 25 == 175` evaluates to True,TRUE -350,shutil.rmtree can remove a directory tree,TRUE -351,Negative slicing like 'abcd'[::-1] reverses the string,TRUE -352,Exponent operator in Python is ^,FALSE -353,The expression `47 * -30 == -1410` evaluates to True,TRUE -354,Integer division in Python uses // not /,TRUE -355,The expression `31 * -36 == -1116` evaluates to True,TRUE -356,Left shift operator is <<,TRUE -357,Dictionaries preserve insertion order in Python 3.7 and later,TRUE -358,The expression `[x*x for x in range(18)][-1] == 289` evaluates to True,TRUE -359,The expression `39 * 4 == 156` evaluates to True,TRUE -360,The expression 'py' in 'python' is True,TRUE -361,The expression `sum(x for x in range(6)) == 36` evaluates to True,FALSE -362,"The expression all(x<10 for x in [1,9,10]) is True",FALSE -363,In Python everything is an object including functions,TRUE -364,The operator module exposes function versions of operators like add,TRUE -365,The expression `[x*x for x in range(10)][-1] == 81` evaluates to True,TRUE -366,The expression datetime.date.today() returns a date,TRUE -367,The expression `[x*x for x in range(24)][-1] == 529` evaluates to True,TRUE -368,Dict comprehension can map keys to values like {x: x*x for x in range(3)},TRUE -369,"The expression `{1,2} | {2,3} == {1,2,3}` evaluates to True",TRUE -370,"The expression `{1,2} & {2,3} == ({2}999)` evaluates to True",FALSE -371,"The expression `list(range(0,6,2)) == [0,2,4]` evaluates to True",TRUE -372,The expression `-41 + 27 == -1107` evaluates to True,FALSE -373,The expression `44 + -37 == -1628` evaluates to True,FALSE -374,The expression `-21 * 14 == -294` evaluates to True,TRUE -375,The expression `[x*x for x in range(19)][-1] == 324` evaluates to True,TRUE -376,await works only inside async functions,TRUE -377,The expression `-31 * -23 == 713` evaluates to True,TRUE -378,The module collections provides namedtuple and Counter,TRUE -379,The expression `3 * -22 == -66` evaluates to True,TRUE -380,The expression `-5 * -6 == 30` evaluates to True,TRUE -381,The expression `37 * 32 == 1184` evaluates to True,TRUE -382,The expression `sum(x for x in range(29)) == 841` evaluates to True,FALSE -383,The expression `[x*x for x in range(20)][-1] == 361` evaluates to True,TRUE -384,@property can make a method accessible like an attribute,TRUE -385,The expression `sum(x for x in range(27)) == 729` evaluates to True,FALSE -386,The expression `[x*x for x in range(25)][-1] == 576` evaluates to True,TRUE -387,The reverse parameter for sorted reverses the sort order,TRUE -388,The expression `sum(range(15)) == 105` evaluates to True,TRUE -389,"The expression `sorted(['b','a','C'], key=str.lower) == ['a','b','C']` evaluates to True",TRUE -390,The expression `25 * 4 == 100` evaluates to True,TRUE -391,"The expression bytes('abc', 'utf8') equals b'abc'",TRUE -392,"The expression list((1,2)) equals [1,2]",TRUE -393,"The expression `min([3,1,2]) == (1999)` evaluates to True",FALSE -394,The expression `23 * -26 == -598` evaluates to True,TRUE -395,Bitwise XOR operator is ^,TRUE -396,"The expression `len({1,1,2}) == (2999)` evaluates to True",FALSE -397,The expression `-5 + -6 == 30` evaluates to True,FALSE -398,Slicing beyond bounds does not raise an IndexError,TRUE -399,"The expression 'a,b'.split(',') equals ['a','b']",TRUE -400,The slice 'abcdef'[0:3] equals 'abc',TRUE -401,rstrip removes from the right only,TRUE -402,The expression (x := 3) assigns 3 to x and returns 3,TRUE -403,strip without args removes whitespace from both ends,TRUE -404,multiprocessing can use multiple CPU cores,TRUE -405,The expression `sum(x for x in range(18)) == 324` evaluates to True,FALSE -406,The expression `-10 * 1 == -10` evaluates to True,TRUE -407,The expression None is None is True,TRUE -408,The expression `'abc'.upper() == ('ABC'999)` evaluates to True,FALSE -409,Namedtuple instances are immutable,TRUE -410,Adding an existing element to a set changes its length,FALSE -411,Tuples in Python are immutable,TRUE -412,"The expression `sum([1,2,3]) == (6999)` evaluates to True",FALSE -413,The expression `-13 + -40 == 520` evaluates to True,FALSE -414,"The expression `''.join(sorted(set('aba'))) in ('zz',)` evaluates to True",FALSE -415,list.sort sorts the list in place and returns None,TRUE -416,The expression `38 * 21 == 798` evaluates to True,TRUE -417,"issubclass(List[int], list) is True at runtime",FALSE -418,The expression `sum(x for x in range(13)) == 169` evaluates to True,FALSE -419,The module itertools provides combinations and permutations,TRUE -420,Methods defined in a class are descriptors,TRUE -421,The expression `-16 * 31 == -496` evaluates to True,TRUE -422,The expression `-15 * -19 == 285` evaluates to True,TRUE -423,assert statements can be disabled with optimization flags,TRUE -424,f'{10:04d}' equals '0010',TRUE -425,The expression all([]) equals True,TRUE -426,"The expression `not (any(x%2==0 for x in [1,3,5,6]))` evaluates to True",FALSE -427,type(3) is int,TRUE -428,The expression `23 + -26 == -598` evaluates to True,FALSE -429,"The expression `list(range(0,6,2)) == ([0,2,4]999)` evaluates to True",FALSE -430,The expression `[x*x for x in range(22)][-1] == 441` evaluates to True,TRUE -431,The expression `47 + -7 == -329` evaluates to True,FALSE -432,The expression `sum(x for x in range(4)) == 16` evaluates to True,FALSE -433,Lists in Python are immutable,FALSE -434,"The expression `{1,2} & {2,3} == {2}` evaluates to True",TRUE -435,sorted returns a new list and does not modify the original,TRUE -436,The expression `'python'[1:4] == 'yth'` evaluates to True,TRUE -437,try except finally always runs finally,TRUE -438,Generators are created by functions that contain yield,TRUE -439,heapq implements a min heap,TRUE -440,The expression `-15 + -19 == 285` evaluates to True,FALSE -441,The expression `-45 * 34 == -1530` evaluates to True,TRUE -442,importing a module runs its top level code,TRUE -443,The expression `-40 + 20 == -800` evaluates to True,FALSE -444,"The expression `not (round(2.5) in (2,3))` evaluates to True",FALSE -445,The expression `41 * 33 == 1353` evaluates to True,TRUE -446,A generator computes and stores all values at once,FALSE -447,The expression `-37 * -39 == 1443` evaluates to True,TRUE -448,The expression `sum(x for x in range(11)) == 121` evaluates to True,FALSE -449,The keyword pass does nothing and is used as a placeholder,TRUE -450,The expression `sum(x for x in range(14)) == 196` evaluates to True,FALSE -451,The expression `sum(range(25)) == 300` evaluates to True,TRUE -452,You can assign a function to a variable and call it via the new name,TRUE -453,"The expression `list(filter(None, [0,1,2])) == ([1,2]999)` evaluates to True",FALSE -454,"The expression `sum([1,2,3]) == 6` evaluates to True",TRUE -455,The expression `sum(x for x in range(10)) == 100` evaluates to True,FALSE -456,The with statement can handle exceptions in the context manager,TRUE -457,frozenset is an immutable set,TRUE -458,The expression 5//2 returns 2,TRUE -459,Two sets with the same elements are equal regardless of order,TRUE -460,"The expression `len({1,1,2}) == 2` evaluates to True",TRUE -461,The expression `21 + -25 == -525` evaluates to True,FALSE -462,The expression `-4 * -30 == 120` evaluates to True,TRUE -463,list.sort returns the sorted list,FALSE -464,'{:.1f}'.format(3.14) equals '3.1',TRUE -465,"The expression [1,2,3] + [4] equals [1,2,3,4]",TRUE -466,Using a mutable default like [] can lead to shared state across calls,TRUE -467,The expression `-16 + -42 == 672` evaluates to True,FALSE -468,"The expression {'a':1} == {'a':1, 'b':2} is True",FALSE -469,The expression `-13 + 30 == -390` evaluates to True,FALSE -470,The expression [] is [] is True,FALSE -471,"The expression `'abc'.replace('b','x') == ('axc'999)` evaluates to True",FALSE -472,"The expression `{1,2,3}.issubset({1,2})` evaluates to True",FALSE -473,Opening a file without closing it may leak resources,TRUE -474,Counter can count hashable items from an iterable,TRUE -475,A context manager must define __enter__ and __exit__,TRUE -476,dir shows attributes of an object,TRUE -477,The membership test 'z' in 'data science' is True,FALSE -478,The expression `[x*x for x in range(11)][-1] == 100` evaluates to True,TRUE -479,The expression `'abc'.capitalize() == 'Abc'` evaluates to True,TRUE -480,"The expression all([True, True, False]) is True",FALSE -481,The expression `-35 + -2 == 70` evaluates to True,FALSE -482,enumerate yields index and value pairs,TRUE -483,"The expression `sorted(['b','a','C'], key=str.lower) == (['a','b','C']999)` evaluates to True",FALSE -484,The expression `sum(range(45)) == 990` evaluates to True,TRUE -485,The expression `-35 * -2 == 70` evaluates to True,TRUE -486,bytearray is mutable while bytes is immutable,TRUE -487,Reading a non existent file without handling exceptions raises FileNotFoundError,TRUE -488,re module provides regular expressions,TRUE -489,KeyError is raised when accessing a missing dict key with indexing,TRUE -490,"The expression `dict(a=1,b=2)['a'] == 1` evaluates to True",TRUE -491,The expression `-22 * -33 == 726` evaluates to True,TRUE -492,The expression `sum(x for x in range(15)) == 225` evaluates to True,FALSE -493,The expression `sum(x for x in range(7)) == 49` evaluates to True,FALSE -494,secrets module is preferred for cryptographic randomness,TRUE -495,The expression `'python'[::-1] == ('nohtyp'999)` evaluates to True,FALSE -496,The expression `19 * -39 == -741` evaluates to True,TRUE -497,The expression [ [0]*2 ]*2 creates two independent lists,FALSE -498,An async function can be called directly without awaiting and it runs to completion immediately,FALSE -499,The expression `47 * -7 == -329` evaluates to True,TRUE -500,The expression `sum(x for x in range(5)) == 25` evaluates to True,FALSE diff --git a/quizproject/data/flashcards.csv b/quizproject/data/flashcards.csv deleted file mode 100644 index 51461fc..0000000 --- a/quizproject/data/flashcards.csv +++ /dev/null @@ -1,501 +0,0 @@ -Card ID,Flashcard -1,"In Python, everything is an object - even numbers and functions!" -2,"Indentation defines structure in Python - forget braces, spacing matters." -3,Variables don't need types declared - Python figures them out automatically. -4,Strings can use single or double quotes - consistency matters more than choice. -5,Use '#' to add a comment - it's ignored by Python but loved by humans. -6,"Python reads top to bottom, so order your logic carefully." -7,Use print() to display results - your first debugging tool. -8,Triple quotes let you write multi-line strings easily. -9,input() always gives you a string - even if you type a number. -10,Use type() to check what kind of object you're working with. -11,Lists are ordered and mutable - you can edit them anytime. -12,"Tuples are like lists, but locked - once made, they can't change." -13,Sets automatically remove duplicates - great for unique collections. -14,Dictionaries store data in key-value pairs - like labeled boxes. -15,len() tells you how many items are inside a container. -16,Lists can hold anything - even other lists or functions! -17,Negative indexes count from the end - -1 is the last item. -18,Slicing lets you grab parts of sequences - [start:end:step] is the syntax. -19,"Strings are immutable - you can replace them, not modify them." -20,Use sorted() to get a new sorted list - or sort() to change it in place. -21,Functions are created with def - short for define. -22,A function that doesn't return anything actually returns None. -23,Default arguments are evaluated once - not every call. -24,Use keyword arguments for clarity when calling functions. -25,Lambda functions are tiny throwaway functions - perfect for one-liners. -26,Functions are objects too - you can pass them around like data. -27,Use *args for variable arguments and **kwargs for named arguments. -28,Docstrings describe what your function does - use triple quotes right under def. -29,"Recursion is a function calling itself - cool, but watch your base case!" -30,return ends a function immediately and gives back a value. -31,for loops can go through any iterable - from lists to strings. -32,while loops run until their condition becomes False. -33,"break stops a loop cold, while continue skips to the next round." -34,Use pass as a placeholder - it literally does nothing but keeps your code valid. -35,"if, elif, else decide what runs based on truthiness." -36,Booleans in Python are capitalized - True and False. -37,"None is falsy - just like 0, '', and empty collections." -38,"Use 'in' to check membership - it works for lists, strings, and sets." -39,Chained comparisons like 1 < x < 10 make your code clean and readable. -40,Use ternary expressions like 'a if cond else b' to make compact decisions. -41,Classes group data and behavior - they're blueprints for objects. -42,__init__ sets up new objects - it's the constructor method. -43,self refers to the instance - it's how methods access data. -44,"Class variables belong to the class, not each instance." -45,Inheritance lets a class reuse code from another class. -46,super() calls methods from the parent class - super useful! -47,Private attributes are just a naming convention - nothing truly private here. -48,Polymorphism means different objects can share method names and still work. -49,Magic methods like __str__ and __add__ let you customize built-in behavior. -50,Everything in Python OOP is built on top of object - the ultimate base class. -51,List comprehensions are compact loops that build lists on the fly. -52,Dict comprehensions let you create mappings in one neat line. -53,Generators use yield to return items lazily - one by one. -54,Iterators remember where they left off - that's why you can only loop once. -55,Decorators wrap functions to extend behavior - like adding extra powers. -56,Closures remember variables even after their function has finished. -57,with automatically cleans up resources - think of it as polite programming. -58,try and except help your code recover from errors instead of crashing. -59,finally always runs - no matter what happens in try/except. -60,Modules are Python files you can reuse - import keeps code DRY. -61,Everything is passed by object reference - Python doesn't copy by default. -62,The GIL allows only one thread to run Python code at a time. -63,Multiprocessing lets you sidestep the GIL using multiple processes. -64,Asyncio helps run many tasks concurrently using async and await. -65,Await can only be used inside async functions - never in normal ones. -66,Descriptors control attribute access at a deep level - used in properties. -67,Type hints improve readability and help static checkers - Python won't enforce them. -68,"Metaclasses are classes of classes - yes, Python can go that deep." -69,F-strings are the modern way to format text - clean and efficient. -70,contextlib helps you build your own context managers with yield. -71,Lists are ordered and mutable - you can edit them anytime. -72,The GIL allows only one thread to run Python code at a time. -73,Default arguments are evaluated once - not every call. -74,"Metaclasses are classes of classes - yes, Python can go that deep." -75,"In Python, everything is an object - even numbers and functions!" -76,Polymorphism means different objects can share method names and still work. -77,Magic methods like __str__ and __add__ let you customize built-in behavior. -78,Default arguments are evaluated once - not every call. -79,return ends a function immediately and gives back a value. -80,input() always gives you a string - even if you type a number. -81,Magic methods like __str__ and __add__ let you customize built-in behavior. -82,Dict comprehensions let you create mappings in one neat line. -83,Sets automatically remove duplicates - great for unique collections. -84,"Python reads top to bottom, so order your logic carefully." -85,Lists can hold anything - even other lists or functions! -86,Docstrings describe what your function does - use triple quotes right under def. -87,Magic methods like __str__ and __add__ let you customize built-in behavior. -88,Sets automatically remove duplicates - great for unique collections. -89,Generators use yield to return items lazily - one by one. -90,Use print() to display results - your first debugging tool. -91,return ends a function immediately and gives back a value. -92,Strings can use single or double quotes - consistency matters more than choice. -93,Lists are ordered and mutable - you can edit them anytime. -94,Descriptors control attribute access at a deep level - used in properties. -95,input() always gives you a string - even if you type a number. -96,Lambda functions are tiny throwaway functions - perfect for one-liners. -97,Lambda functions are tiny throwaway functions - perfect for one-liners. -98,Strings can use single or double quotes - consistency matters more than choice. -99,return ends a function immediately and gives back a value. -100,return ends a function immediately and gives back a value. -101,Dict comprehensions let you create mappings in one neat line. -102,List comprehensions are compact loops that build lists on the fly. -103,finally always runs - no matter what happens in try/except. -104,super() calls methods from the parent class - super useful! -105,Type hints improve readability and help static checkers - Python won't enforce them. -106,Strings can use single or double quotes - consistency matters more than choice. -107,Magic methods like __str__ and __add__ let you customize built-in behavior. -108,len() tells you how many items are inside a container. -109,contextlib helps you build your own context managers with yield. -110,Functions are objects too - you can pass them around like data. -111,Use *args for variable arguments and **kwargs for named arguments. -112,Lists can hold anything - even other lists or functions! -113,while loops run until their condition becomes False. -114,Default arguments are evaluated once - not every call. -115,Use '#' to add a comment - it's ignored by Python but loved by humans. -116,len() tells you how many items are inside a container. -117,Dict comprehensions let you create mappings in one neat line. -118,Slicing lets you grab parts of sequences - [start:end:step] is the syntax. -119,Lists are ordered and mutable - you can edit them anytime. -120,Polymorphism means different objects can share method names and still work. -121,"Tuples are like lists, but locked - once made, they can't change." -122,Polymorphism means different objects can share method names and still work. -123,finally always runs - no matter what happens in try/except. -124,Strings can use single or double quotes - consistency matters more than choice. -125,Booleans in Python are capitalized - True and False. -126,with automatically cleans up resources - think of it as polite programming. -127,Type hints improve readability and help static checkers - Python won't enforce them. -128,"Tuples are like lists, but locked - once made, they can't change." -129,super() calls methods from the parent class - super useful! -130,Sets automatically remove duplicates - great for unique collections. -131,Use '#' to add a comment - it's ignored by Python but loved by humans. -132,Dict comprehensions let you create mappings in one neat line. -133,finally always runs - no matter what happens in try/except. -134,"Strings are immutable - you can replace them, not modify them." -135,Use *args for variable arguments and **kwargs for named arguments. -136,Triple quotes let you write multi-line strings easily. -137,Lists can hold anything - even other lists or functions! -138,Multiprocessing lets you sidestep the GIL using multiple processes. -139,Generators use yield to return items lazily - one by one. -140,finally always runs - no matter what happens in try/except. -141,finally always runs - no matter what happens in try/except. -142,Triple quotes let you write multi-line strings easily. -143,input() always gives you a string - even if you type a number. -144,__init__ sets up new objects - it's the constructor method. -145,The GIL allows only one thread to run Python code at a time. -146,Lists can hold anything - even other lists or functions! -147,Polymorphism means different objects can share method names and still work. -148,Lists are ordered and mutable - you can edit them anytime. -149,Use sorted() to get a new sorted list - or sort() to change it in place. -150,input() always gives you a string - even if you type a number. -151,"Use 'in' to check membership - it works for lists, strings, and sets." -152,Lists are ordered and mutable - you can edit them anytime. -153,finally always runs - no matter what happens in try/except. -154,Lists are ordered and mutable - you can edit them anytime. -155,The GIL allows only one thread to run Python code at a time. -156,"Use 'in' to check membership - it works for lists, strings, and sets." -157,"In Python, everything is an object - even numbers and functions!" -158,Use print() to display results - your first debugging tool. -159,finally always runs - no matter what happens in try/except. -160,"Use 'in' to check membership - it works for lists, strings, and sets." -161,Generators use yield to return items lazily - one by one. -162,Triple quotes let you write multi-line strings easily. -163,Polymorphism means different objects can share method names and still work. -164,Use ternary expressions like 'a if cond else b' to make compact decisions. -165,super() calls methods from the parent class - super useful! -166,return ends a function immediately and gives back a value. -167,Sets automatically remove duplicates - great for unique collections. -168,Dict comprehensions let you create mappings in one neat line. -169,Asyncio helps run many tasks concurrently using async and await. -170,return ends a function immediately and gives back a value. -171,"Use 'in' to check membership - it works for lists, strings, and sets." -172,Use print() to display results - your first debugging tool. -173,Sets automatically remove duplicates - great for unique collections. -174,Polymorphism means different objects can share method names and still work. -175,Type hints improve readability and help static checkers - Python won't enforce them. -176,input() always gives you a string - even if you type a number. -177,Generators use yield to return items lazily - one by one. -178,Generators use yield to return items lazily - one by one. -179,Generators use yield to return items lazily - one by one. -180,Decorators wrap functions to extend behavior - like adding extra powers. -181,"None is falsy - just like 0, '', and empty collections." -182,Triple quotes let you write multi-line strings easily. -183,Default arguments are evaluated once - not every call. -184,Polymorphism means different objects can share method names and still work. -185,Chained comparisons like 1 < x < 10 make your code clean and readable. -186,Type hints improve readability and help static checkers - Python won't enforce them. -187,Use '#' to add a comment - it's ignored by Python but loved by humans. -188,Variables don't need types declared - Python figures them out automatically. -189,Lambda functions are tiny throwaway functions - perfect for one-liners. -190,input() always gives you a string - even if you type a number. -191,Lists can hold anything - even other lists or functions! -192,List comprehensions are compact loops that build lists on the fly. -193,"None is falsy - just like 0, '', and empty collections." -194,Inheritance lets a class reuse code from another class. -195,Type hints improve readability and help static checkers - Python won't enforce them. -196,The GIL allows only one thread to run Python code at a time. -197,Variables don't need types declared - Python figures them out automatically. -198,Magic methods like __str__ and __add__ let you customize built-in behavior. -199,Type hints improve readability and help static checkers - Python won't enforce them. -200,Type hints improve readability and help static checkers - Python won't enforce them. -201,"if, elif, else decide what runs based on truthiness." -202,Use '#' to add a comment - it's ignored by Python but loved by humans. -203,Generators use yield to return items lazily - one by one. -204,Dict comprehensions let you create mappings in one neat line. -205,input() always gives you a string - even if you type a number. -206,Descriptors control attribute access at a deep level - used in properties. -207,Chained comparisons like 1 < x < 10 make your code clean and readable. -208,List comprehensions are compact loops that build lists on the fly. -209,finally always runs - no matter what happens in try/except. -210,The GIL allows only one thread to run Python code at a time. -211,"None is falsy - just like 0, '', and empty collections." -212,len() tells you how many items are inside a container. -213,Generators use yield to return items lazily - one by one. -214,Polymorphism means different objects can share method names and still work. -215,Use sorted() to get a new sorted list - or sort() to change it in place. -216,Use '#' to add a comment - it's ignored by Python but loved by humans. -217,Use ternary expressions like 'a if cond else b' to make compact decisions. -218,The GIL allows only one thread to run Python code at a time. -219,Use print() to display results - your first debugging tool. -220,len() tells you how many items are inside a container. -221,Magic methods like __str__ and __add__ let you customize built-in behavior. -222,input() always gives you a string - even if you type a number. -223,"None is falsy - just like 0, '', and empty collections." -224,Descriptors control attribute access at a deep level - used in properties. -225,Descriptors control attribute access at a deep level - used in properties. -226,Sets automatically remove duplicates - great for unique collections. -227,Dict comprehensions let you create mappings in one neat line. -228,"Use 'in' to check membership - it works for lists, strings, and sets." -229,input() always gives you a string - even if you type a number. -230,finally always runs - no matter what happens in try/except. -231,Variables don't need types declared - Python figures them out automatically. -232,Dict comprehensions let you create mappings in one neat line. -233,Inheritance lets a class reuse code from another class. -234,return ends a function immediately and gives back a value. -235,Type hints improve readability and help static checkers - Python won't enforce them. -236,Default arguments are evaluated once - not every call. -237,Dict comprehensions let you create mappings in one neat line. -238,finally always runs - no matter what happens in try/except. -239,Strings can use single or double quotes - consistency matters more than choice. -240,input() always gives you a string - even if you type a number. -241,finally always runs - no matter what happens in try/except. -242,Polymorphism means different objects can share method names and still work. -243,"Python reads top to bottom, so order your logic carefully." -244,Type hints improve readability and help static checkers - Python won't enforce them. -245,Slicing lets you grab parts of sequences - [start:end:step] is the syntax. -246,Strings can use single or double quotes - consistency matters more than choice. -247,Chained comparisons like 1 < x < 10 make your code clean and readable. -248,return ends a function immediately and gives back a value. -249,Variables don't need types declared - Python figures them out automatically. -250,Sets automatically remove duplicates - great for unique collections. -251,Dict comprehensions let you create mappings in one neat line. -252,Use print() to display results - your first debugging tool. -253,Functions are objects too - you can pass them around like data. -254,finally always runs - no matter what happens in try/except. -255,finally always runs - no matter what happens in try/except. -256,Magic methods like __str__ and __add__ let you customize built-in behavior. -257,return ends a function immediately and gives back a value. -258,return ends a function immediately and gives back a value. -259,Everything is passed by object reference - Python doesn't copy by default. -260,"Tuples are like lists, but locked - once made, they can't change." -261,input() always gives you a string - even if you type a number. -262,Dict comprehensions let you create mappings in one neat line. -263,finally always runs - no matter what happens in try/except. -264,Use print() to display results - your first debugging tool. -265,Lists are ordered and mutable - you can edit them anytime. -266,Polymorphism means different objects can share method names and still work. -267,finally always runs - no matter what happens in try/except. -268,Descriptors control attribute access at a deep level - used in properties. -269,Use print() to display results - your first debugging tool. -270,"Use 'in' to check membership - it works for lists, strings, and sets." -271,Generators use yield to return items lazily - one by one. -272,Descriptors control attribute access at a deep level - used in properties. -273,Use *args for variable arguments and **kwargs for named arguments. -274,Decorators wrap functions to extend behavior - like adding extra powers. -275,for loops can go through any iterable - from lists to strings. -276,Strings can use single or double quotes - consistency matters more than choice. -277,Multiprocessing lets you sidestep the GIL using multiple processes. -278,Sets automatically remove duplicates - great for unique collections. -279,finally always runs - no matter what happens in try/except. -280,len() tells you how many items are inside a container. -281,Use *args for variable arguments and **kwargs for named arguments. -282,Multiprocessing lets you sidestep the GIL using multiple processes. -283,return ends a function immediately and gives back a value. -284,Docstrings describe what your function does - use triple quotes right under def. -285,input() always gives you a string - even if you type a number. -286,input() always gives you a string - even if you type a number. -287,Lists can hold anything - even other lists or functions! -288,Lists can hold anything - even other lists or functions! -289,Polymorphism means different objects can share method names and still work. -290,List comprehensions are compact loops that build lists on the fly. -291,Triple quotes let you write multi-line strings easily. -292,Type hints improve readability and help static checkers - Python won't enforce them. -293,Docstrings describe what your function does - use triple quotes right under def. -294,Polymorphism means different objects can share method names and still work. -295,"Tuples are like lists, but locked - once made, they can't change." -296,Use *args for variable arguments and **kwargs for named arguments. -297,Strings can use single or double quotes - consistency matters more than choice. -298,Docstrings describe what your function does - use triple quotes right under def. -299,Magic methods like __str__ and __add__ let you customize built-in behavior. -300,List comprehensions are compact loops that build lists on the fly. -301,"if, elif, else decide what runs based on truthiness." -302,input() always gives you a string - even if you type a number. -303,Decorators wrap functions to extend behavior - like adding extra powers. -304,Polymorphism means different objects can share method names and still work. -305,Functions are objects too - you can pass them around like data. -306,super() calls methods from the parent class - super useful! -307,Lists are ordered and mutable - you can edit them anytime. -308,super() calls methods from the parent class - super useful! -309,Dict comprehensions let you create mappings in one neat line. -310,Use print() to display results - your first debugging tool. -311,Use print() to display results - your first debugging tool. -312,Use print() to display results - your first debugging tool. -313,finally always runs - no matter what happens in try/except. -314,input() always gives you a string - even if you type a number. -315,Private attributes are just a naming convention - nothing truly private here. -316,Sets automatically remove duplicates - great for unique collections. -317,finally always runs - no matter what happens in try/except. -318,Sets automatically remove duplicates - great for unique collections. -319,Variables don't need types declared - Python figures them out automatically. -320,Polymorphism means different objects can share method names and still work. -321,len() tells you how many items are inside a container. -322,Type hints improve readability and help static checkers - Python won't enforce them. -323,finally always runs - no matter what happens in try/except. -324,Default arguments are evaluated once - not every call. -325,Use print() to display results - your first debugging tool. -326,try and except help your code recover from errors instead of crashing. -327,Generators use yield to return items lazily - one by one. -328,Dict comprehensions let you create mappings in one neat line. -329,finally always runs - no matter what happens in try/except. -330,Asyncio helps run many tasks concurrently using async and await. -331,Dict comprehensions let you create mappings in one neat line. -332,"In Python, everything is an object - even numbers and functions!" -333,Polymorphism means different objects can share method names and still work. -334,Polymorphism means different objects can share method names and still work. -335,finally always runs - no matter what happens in try/except. -336,Polymorphism means different objects can share method names and still work. -337,Use '#' to add a comment - it's ignored by Python but loved by humans. -338,Use keyword arguments for clarity when calling functions. -339,"Python reads top to bottom, so order your logic carefully." -340,Strings can use single or double quotes - consistency matters more than choice. -341,"Use 'in' to check membership - it works for lists, strings, and sets." -342,"Use 'in' to check membership - it works for lists, strings, and sets." -343,Use '#' to add a comment - it's ignored by Python but loved by humans. -344,"None is falsy - just like 0, '', and empty collections." -345,Use sorted() to get a new sorted list - or sort() to change it in place. -346,Sets automatically remove duplicates - great for unique collections. -347,Lists can hold anything - even other lists or functions! -348,len() tells you how many items are inside a container. -349,return ends a function immediately and gives back a value. -350,super() calls methods from the parent class - super useful! -351,Triple quotes let you write multi-line strings easily. -352,"In Python, everything is an object - even numbers and functions!" -353,F-strings are the modern way to format text - clean and efficient. -354,contextlib helps you build your own context managers with yield. -355,return ends a function immediately and gives back a value. -356,input() always gives you a string - even if you type a number. -357,"Tuples are like lists, but locked - once made, they can't change." -358,Triple quotes let you write multi-line strings easily. -359,len() tells you how many items are inside a container. -360,Use keyword arguments for clarity when calling functions. -361,Magic methods like __str__ and __add__ let you customize built-in behavior. -362,Type hints improve readability and help static checkers - Python won't enforce them. -363,finally always runs - no matter what happens in try/except. -364,input() always gives you a string - even if you type a number. -365,super() calls methods from the parent class - super useful! -366,Polymorphism means different objects can share method names and still work. -367,input() always gives you a string - even if you type a number. -368,Closures remember variables even after their function has finished. -369,Generators use yield to return items lazily - one by one. -370,__init__ sets up new objects - it's the constructor method. -371,Polymorphism means different objects can share method names and still work. -372,Everything is passed by object reference - Python doesn't copy by default. -373,Triple quotes let you write multi-line strings easily. -374,input() always gives you a string - even if you type a number. -375,Generators use yield to return items lazily - one by one. -376,finally always runs - no matter what happens in try/except. -377,return ends a function immediately and gives back a value. -378,Use sorted() to get a new sorted list - or sort() to change it in place. -379,Descriptors control attribute access at a deep level - used in properties. -380,Docstrings describe what your function does - use triple quotes right under def. -381,F-strings are the modern way to format text - clean and efficient. -382,"None is falsy - just like 0, '', and empty collections." -383,Polymorphism means different objects can share method names and still work. -384,Type hints improve readability and help static checkers - Python won't enforce them. -385,Magic methods like __str__ and __add__ let you customize built-in behavior. -386,Lists can hold anything - even other lists or functions! -387,Magic methods like __str__ and __add__ let you customize built-in behavior. -388,Use keyword arguments for clarity when calling functions. -389,Use print() to display results - your first debugging tool. -390,Multiprocessing lets you sidestep the GIL using multiple processes. -391,super() calls methods from the parent class - super useful! -392,Dict comprehensions let you create mappings in one neat line. -393,input() always gives you a string - even if you type a number. -394,"if, elif, else decide what runs based on truthiness." -395,Strings can use single or double quotes - consistency matters more than choice. -396,Use *args for variable arguments and **kwargs for named arguments. -397,Lists are ordered and mutable - you can edit them anytime. -398,contextlib helps you build your own context managers with yield. -399,"Tuples are like lists, but locked - once made, they can't change." -400,Type hints improve readability and help static checkers - Python won't enforce them. -401,"None is falsy - just like 0, '', and empty collections." -402,Polymorphism means different objects can share method names and still work. -403,Multiprocessing lets you sidestep the GIL using multiple processes. -404,Lists are ordered and mutable - you can edit them anytime. -405,Default arguments are evaluated once - not every call. -406,Triple quotes let you write multi-line strings easily. -407,Await can only be used inside async functions - never in normal ones. -408,"Use 'in' to check membership - it works for lists, strings, and sets." -409,The GIL allows only one thread to run Python code at a time. -410,contextlib helps you build your own context managers with yield. -411,Use '#' to add a comment - it's ignored by Python but loved by humans. -412,The GIL allows only one thread to run Python code at a time. -413,Functions are objects too - you can pass them around like data. -414,return ends a function immediately and gives back a value. -415,Variables don't need types declared - Python figures them out automatically. -416,Multiprocessing lets you sidestep the GIL using multiple processes. -417,finally always runs - no matter what happens in try/except. -418,List comprehensions are compact loops that build lists on the fly. -419,Magic methods like __str__ and __add__ let you customize built-in behavior. -420,Everything in Python OOP is built on top of object - the ultimate base class. -421,Use *args for variable arguments and **kwargs for named arguments. -422,Use *args for variable arguments and **kwargs for named arguments. -423,Type hints improve readability and help static checkers - Python won't enforce them. -424,Lists can hold anything - even other lists or functions! -425,Use keyword arguments for clarity when calling functions. -426,input() always gives you a string - even if you type a number. -427,return ends a function immediately and gives back a value. -428,Use sorted() to get a new sorted list - or sort() to change it in place. -429,try and except help your code recover from errors instead of crashing. -430,"break stops a loop cold, while continue skips to the next round." -431,contextlib helps you build your own context managers with yield. -432,super() calls methods from the parent class - super useful! -433,Type hints improve readability and help static checkers - Python won't enforce them. -434,try and except help your code recover from errors instead of crashing. -435,Variables don't need types declared - Python figures them out automatically. -436,Await can only be used inside async functions - never in normal ones. -437,Generators use yield to return items lazily - one by one. -438,Use *args for variable arguments and **kwargs for named arguments. -439,Closures remember variables even after their function has finished. -440,Generators use yield to return items lazily - one by one. -441,finally always runs - no matter what happens in try/except. -442,Type hints improve readability and help static checkers - Python won't enforce them. -443,Docstrings describe what your function does - use triple quotes right under def. -444,Dict comprehensions let you create mappings in one neat line. -445,input() always gives you a string - even if you type a number. -446,return ends a function immediately and gives back a value. -447,finally always runs - no matter what happens in try/except. -448,while loops run until their condition becomes False. -449,"Use 'in' to check membership - it works for lists, strings, and sets." -450,Strings can use single or double quotes - consistency matters more than choice. -451,Use *args for variable arguments and **kwargs for named arguments. -452,"In Python, everything is an object - even numbers and functions!" -453,Generators use yield to return items lazily - one by one. -454,Multiprocessing lets you sidestep the GIL using multiple processes. -455,Dict comprehensions let you create mappings in one neat line. -456,Magic methods like __str__ and __add__ let you customize built-in behavior. -457,Triple quotes let you write multi-line strings easily. -458,input() always gives you a string - even if you type a number. -459,Lambda functions are tiny throwaway functions - perfect for one-liners. -460,"None is falsy - just like 0, '', and empty collections." -461,Slicing lets you grab parts of sequences - [start:end:step] is the syntax. -462,Use print() to display results - your first debugging tool. -463,return ends a function immediately and gives back a value. -464,"Use 'in' to check membership - it works for lists, strings, and sets." -465,F-strings are the modern way to format text - clean and efficient. -466,Everything is passed by object reference - Python doesn't copy by default. -467,try and except help your code recover from errors instead of crashing. -468,return ends a function immediately and gives back a value. -469,Magic methods like __str__ and __add__ let you customize built-in behavior. -470,Lambda functions are tiny throwaway functions - perfect for one-liners. -471,Use *args for variable arguments and **kwargs for named arguments. -472,Sets automatically remove duplicates - great for unique collections. -473,The GIL allows only one thread to run Python code at a time. -474,return ends a function immediately and gives back a value. -475,finally always runs - no matter what happens in try/except. -476,Lists are ordered and mutable - you can edit them anytime. -477,List comprehensions are compact loops that build lists on the fly. -478,Use keyword arguments for clarity when calling functions. -479,Strings can use single or double quotes - consistency matters more than choice. -480,Type hints improve readability and help static checkers - Python won't enforce them. -481,Type hints improve readability and help static checkers - Python won't enforce them. -482,"Tuples are like lists, but locked - once made, they can't change." -483,len() tells you how many items are inside a container. -484,Strings can use single or double quotes - consistency matters more than choice. -485,finally always runs - no matter what happens in try/except. -486,Use print() to display results - your first debugging tool. -487,Modules are Python files you can reuse - import keeps code DRY. -488,Generators use yield to return items lazily - one by one. -489,Type hints improve readability and help static checkers - Python won't enforce them. -490,Type hints improve readability and help static checkers - Python won't enforce them. -491,super() calls methods from the parent class - super useful! -492,Variables don't need types declared - Python figures them out automatically. -493,Descriptors control attribute access at a deep level - used in properties. -494,Everything in Python OOP is built on top of object - the ultimate base class. -495,The GIL allows only one thread to run Python code at a time. -496,Decorators wrap functions to extend behavior - like adding extra powers. -497,Generators use yield to return items lazily - one by one. -498,return ends a function immediately and gives back a value. -499,Await can only be used inside async functions - never in normal ones. -500,try and except help your code recover from errors instead of crashing. diff --git a/quizproject/data/hard.csv b/quizproject/data/hard.csv deleted file mode 100644 index ea23ca4..0000000 --- a/quizproject/data/hard.csv +++ /dev/null @@ -1,501 +0,0 @@ -Question ID,Question,Option A,Option B,Option C,Option D,Option E,Answer,Explanation -1,What is the value of s=pythonista then print(s[0:4]),pyth,yth,None of the above,pytho,pythonista,pyth,pyth is correct based on how this feature behaves in Python. -2,What does list({1: a 2: b}) evaluate to,[1 2],[(1 a) (2 b)],[2 1],[1 2],None of the above,[1 2],[1 2] is correct based on how this feature behaves in Python. -3,What does functools.lru_cache do,Stores results only for keyword arguments,Caches function results keyed by arguments to avoid recomputation,Validates argument types at runtime,Converts a function into a generator,Parallelizes the function across threads,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. -4,What is the value of s=pythonista then print(s[2:5]),None of the above,pytho,thonista,ho,tho,tho,tho is correct based on how this feature behaves in Python. -5,What is the output of print({1 2 3} < {1 2 3 4}),[],FALSE,Error,None of the above,TRUE,TRUE,True is correct based on how this feature behaves in Python. -6,What is the value of s=pythonista then print(s[0:5]),pytho,ytho,pythonista,None of the above,python,pytho,pytho is correct based on how this feature behaves in Python. -7,What is the output of print(sum(i*i for i in range(7))),None of the above,21,91,49,36,91,91 is correct based on how this feature behaves in Python. -8,What is output of print({}.setdefault(x [])),KeyError,[x],None,None of the above,[],[],[] is correct based on how this feature behaves in Python. -9,What does itertools.groupby require to group equal keys correctly,The key function must return unique values,The input must be a list not an iterator,The input must be pre sorted by the same key function,The keys must be strings,The values must be numbers,The input must be pre sorted by the same key function,groupby only groups adjacent equal keys so you must sort first. -10,Which statement about decorators is accurate,A decorator always speeds up function execution,A decorator changes the function name at runtime in CPython,A decorator can only be applied to async functions,A decorator must be a class not a function,A decorator wraps a function to modify behavior without changing the function code,A decorator wraps a function to modify behavior without changing the function code,A decorator takes a function and returns a new callable that adds behavior around it. -11,What is the value of s=pythonista then print(s[3:6]),hon,honista,None of the above,on,honi,hon,hon is correct based on how this feature behaves in Python. -12,What is the output of print(sum(i*i for i in range(6))),36,None of the above,25,Error,55,55,55 is correct based on how this feature behaves in Python. -13,What is the value of s=pythonista then print(s[0:5]),ytho,pytho,python,pythonista,None of the above,pytho,pytho is correct based on how this feature behaves in Python. -14,What is the output of print(sum(i*i for i in range(5))),14,55,10,25,30,30,Squares 0 1 4 9 16 add up to 30. -15,What is the output of print({i:i*i for i in range(3)}[2]),4,2,0,None of the above,3,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. -16,What is the output of print(sum(i*i for i in range(7))),Error,91,36,None of the above,49,91,91 is correct based on how this feature behaves in Python. -17,What is the value of s=pythonista then print(s[0:2]),pythonista,pyt,py,y,None of the above,py,py is correct based on how this feature behaves in Python. -18,What is the result of print(dict.fromkeys(aba 0)),{a: 0},{a:0 b:0 c:0},{a: 0 b: 0},{a:0 b:0 a:0},None of the above,{a: 0 b: 0},{a: 0 b: 0} is correct based on how this feature behaves in Python. -19,What is the output of print(sum(i*i for i in range(4))),Error,None of the above,9,6,14,14,14 is correct based on how this feature behaves in Python. -20,What is the output of print(sum(i*i for i in range(7))),91,21,Error,36,None of the above,91,91 is correct based on how this feature behaves in Python. -21,What is the value of s=pythonista then print(s[0:5]),python,ytho,pythonista,pytho,None of the above,pytho,pytho is correct based on how this feature behaves in Python. -22,What does print((1 2) < (1 3)) produce,None of the above,None,TRUE,0,Error,TRUE,True is correct based on how this feature behaves in Python. -23,What is the output of print(sum(i*i for i in range(3))),Error,9,4,5,3,5,5 is correct based on how this feature behaves in Python. -24,What is the output of print(sum(i*i for i in range(5))),10,None of the above,16,Error,30,30,Squares 0 1 4 9 16 add up to 30. -25,What is the output of print(sum(i*i for i in range(7))),49,21,91,36,Error,91,91 is correct based on how this feature behaves in Python. -26,What is the output of print(sum(i*i for i in range(7))),Error,91,36,49,None of the above,91,91 is correct based on how this feature behaves in Python. -27,What is the value of len(set(mississippi)),3,5,4,None of the above,8,4,4 is correct based on how this feature behaves in Python. -28,What does print((1 2) < (1 3)) produce,0,None of the above,FALSE,TRUE,None,TRUE,True is correct based on how this feature behaves in Python. -29,What is the value of s=pythonista then print(s[2:5]),tho,pytho,None of the above,thon,ho,tho,tho is correct based on how this feature behaves in Python. -30,What is the output of print(sum(i*i for i in range(5))),None of the above,Error,30,10,16,30,Squares 0 1 4 9 16 add up to 30. -31,What is output of print(a * 0 or b),None of the above,a,0,,b,b,b is correct based on how this feature behaves in Python. -32,What does functools.lru_cache do,Caches function results keyed by arguments to avoid recomputation,Converts a function into a generator,Stores results only for keyword arguments,Validates argument types at runtime,Parallelizes the function across threads,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. -33,What is the output of print(sum(i*i for i in range(7))),Error,49,None of the above,36,91,91,91 is correct based on how this feature behaves in Python. -34,What is the output of print(sum(i*i for i in range(5))),25,None of the above,16,Error,30,30,Squares 0 1 4 9 16 add up to 30. -35,What is the value of s=pythonista then print(s[3:7]),honista,honi,None of the above,honis,pythoni,honi,honi is correct based on how this feature behaves in Python. -36,What is the output of print(sum(i*i for i in range(7))),91,Error,None of the above,21,36,91,91 is correct based on how this feature behaves in Python. -37,What is the value of s=pythonista then print(s[2:5]),pytho,tho,None of the above,ho,thonista,tho,tho is correct based on how this feature behaves in Python. -38,What is the output of print(sum(i*i for i in range(7))),49,None of the above,91,Error,21,91,91 is correct based on how this feature behaves in Python. -39,What is printed by print(any([])),None of the above,0,FALSE,TRUE,Error,FALSE,any of an empty iterable is False as there is no truthy element. -40,What is the output of print(sum(i*i for i in range(3))),3,9,Error,None of the above,5,5,5 is correct based on how this feature behaves in Python. -41,What is the value of s=pythonista then print(s[0:3]),None of the above,pyt,pythonista,yt,pyth,pyt,pyt is correct based on how this feature behaves in Python. -42,What is the output of print(sum(i*i for i in range(5))),30,16,Error,25,None of the above,30,Squares 0 1 4 9 16 add up to 30. -43,What is the value of s=pythonista then print(s[0:3]),pyt,None of the above,pyth,pythonista,yt,pyt,pyt is correct based on how this feature behaves in Python. -44,What is the output of print(sum(i*i for i in range(6))),25,15,36,None of the above,55,55,55 is correct based on how this feature behaves in Python. -45,What is the value of s=pythonista then print(s[0:5]),pytho,pythonista,python,ytho,None of the above,pytho,pytho is correct based on how this feature behaves in Python. -46,What is the output of print(sum(i*i for i in range(6))),15,Error,55,None of the above,36,55,55 is correct based on how this feature behaves in Python. -47,What is the value of s=pythonista then print(s[1:6]),ythoni,ython,None of the above,thon,ythonista,ython,ython is correct based on how this feature behaves in Python. -48,What is the value of s=pythonista then print(s[3:7]),honis,None of the above,honi,pythoni,oni,honi,honi is correct based on how this feature behaves in Python. -49,What is the result of print(dict.fromkeys(aba 0)),None of the above,{a: 0 b: 0},{a: 0},{a:0 b:0 a:0},{b:0},{a: 0 b: 0},{a: 0 b: 0} is correct based on how this feature behaves in Python. -50,What is the output of print(sum(i*i for i in range(5))),None of the above,25,10,30,Error,30,Squares 0 1 4 9 16 add up to 30. -51,What is the output of print(sum(i*i for i in range(3))),5,Error,4,None of the above,9,5,5 is correct based on how this feature behaves in Python. -52,What is the output of print(sum(i*i for i in range(3))),5,4,3,9,Error,5,5 is correct based on how this feature behaves in Python. -53,What does print(all([])) return,FALSE,0,None,None of the above,TRUE,TRUE,all of an empty iterable is True by definition vacuously true. -54,What is the output of print(sum(i*i for i in range(7))),21,91,Error,None of the above,36,91,91 is correct based on how this feature behaves in Python. -55,What is the output of print(sum(i*i for i in range(7))),91,None of the above,36,21,49,91,91 is correct based on how this feature behaves in Python. -56,What is the output of print(sum(i*i for i in range(4))),16,Error,14,None of the above,6,14,14 is correct based on how this feature behaves in Python. -57,What is the value of s=pythonista then print(s[0:4]),pyth,yth,None of the above,pythonista,pytho,pyth,pyth is correct based on how this feature behaves in Python. -58,What is the output of print(sum(i*i for i in range(5))),30,25,None of the above,10,16,30,Squares 0 1 4 9 16 add up to 30. -59,What is the value of s=pythonista then print(s[3:8]),honista,None of the above,onis,pythonis,honis,honis,honis is correct based on how this feature behaves in Python. -60,What is the output of print(sum(i*i for i in range(3))),9,5,None of the above,3,4,5,5 is correct based on how this feature behaves in Python. -61,What is the output of print(sum(i*i for i in range(7))),36,Error,21,91,None of the above,91,91 is correct based on how this feature behaves in Python. -62,What is the value of s=pythonista then print(s[3:5]),pytho,ho,None of the above,honista,o,ho,ho is correct based on how this feature behaves in Python. -63,What is the value of s=pythonista then print(s[0:2]),pyt,py,y,pythonista,None of the above,py,py is correct based on how this feature behaves in Python. -64,What is the output of print(sum(i*i for i in range(4))),16,Error,None of the above,9,14,14,14 is correct based on how this feature behaves in Python. -65,What is the output of print(sum(i*i for i in range(7))),49,None of the above,36,21,91,91,91 is correct based on how this feature behaves in Python. -66,What is printed by print(any([])),None,FALSE,None of the above,0,Error,FALSE,any of an empty iterable is False as there is no truthy element. -67,What is the output of print(sum(i*i for i in range(6))),36,55,25,None of the above,Error,55,55 is correct based on how this feature behaves in Python. -68,Which statement about list vs deque is accurate,deque provides faster appends and pops from both ends while list is fast at random access,None of the above,list has O1 inserts at the front,list is always faster than deque for all operations,deque supports O1 random indexing,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. -69,Which statement about decorators is accurate,A decorator always speeds up function execution,A decorator can only be applied to async functions,A decorator wraps a function to modify behavior without changing the function code,A decorator must be a class not a function,A decorator changes the function name at runtime in CPython,A decorator wraps a function to modify behavior without changing the function code,A decorator takes a function and returns a new callable that adds behavior around it. -70,What is the output of print(sum(i*i for i in range(3))),5,4,9,Error,None of the above,5,5 is correct based on how this feature behaves in Python. -71,What is the output of print(sum(i*i for i in range(7))),21,36,91,49,Error,91,91 is correct based on how this feature behaves in Python. -72,What is the output of print(sum(i*i for i in range(5))),25,None of the above,Error,10,30,30,Squares 0 1 4 9 16 add up to 30. -73,What is the value of s=pythonista then print(s[2:6]),hon,None of the above,thoni,python,thon,thon,thon is correct based on how this feature behaves in Python. -74,What is the output of print(sum(i*i for i in range(6))),25,55,15,Error,None of the above,55,55 is correct based on how this feature behaves in Python. -75,What is the output of print(sum(i*i for i in range(6))),36,55,None of the above,15,Error,55,55 is correct based on how this feature behaves in Python. -76,What does functools.lru_cache do,Caches function results keyed by arguments to avoid recomputation,Converts a function into a generator,Parallelizes the function across threads,Stores results only for keyword arguments,Validates argument types at runtime,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. -77,What is the output of print(sum(i*i for i in range(7))),49,Error,21,91,None of the above,91,91 is correct based on how this feature behaves in Python. -78,What is the value of s=pythonista then print(s[2:4]),None of the above,h,tho,pyth,th,th,th is correct based on how this feature behaves in Python. -79,What is the value of s=pythonista then print(s[0:3]),pyt,pythonista,pyth,yt,None of the above,pyt,pyt is correct based on how this feature behaves in Python. -80,What is the output of print(sum(i*i for i in range(4))),None of the above,Error,14,6,9,14,14 is correct based on how this feature behaves in Python. -81,Which statement about float NaN is correct,None of the above,NaN sorts to the beginning in all Python sorts,NaN is equal to 0 0 by default,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN compares greater than all numbers,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. -82,What is the value of s=pythonista then print(s[3:5]),pytho,o,honista,ho,None of the above,ho,ho is correct based on how this feature behaves in Python. -83,What is the output of print(sum(i*i for i in range(6))),36,Error,55,None of the above,25,55,55 is correct based on how this feature behaves in Python. -84,Which statement about float NaN is correct,NaN sorts to the beginning in all Python sorts,NaN compares greater than all numbers,NaN is treated as None by min and max,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is equal to 0 0 by default,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. -85,What is the output of print(sum(i*i for i in range(6))),25,55,Error,None of the above,15,55,55 is correct based on how this feature behaves in Python. -86,What is the output of print(sum(i*i for i in range(3))),None of the above,Error,5,4,3,5,5 is correct based on how this feature behaves in Python. -87,What is the value of s=pythonista then print(s[0:2]),y,None of the above,pythonista,pyt,py,py,py is correct based on how this feature behaves in Python. -88,What is the value of s=pythonista then print(s[1:6]),None of the above,thon,ython,ythonista,python,ython,ython is correct based on how this feature behaves in Python. -89,Which description of asyncio.gather is accurate,Blocks the event loop until all tasks finish via time sleep,Guarantees order of completion equals input order,Starts new processes for each task,Cancels all tasks on the first exception always,Runs multiple awaitables concurrently and aggregates their results,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. -90,What is the value of s=pythonista then print(s[0:4]),pytho,yth,None of the above,pythonista,pyth,pyth,pyth is correct based on how this feature behaves in Python. -91,What is the value of s=pythonista then print(s[0:2]),pyt,pythonista,y,None of the above,py,py,py is correct based on how this feature behaves in Python. -92,What is the output of print(sum(i*i for i in range(3))),Error,None of the above,5,3,9,5,5 is correct based on how this feature behaves in Python. -93,What is the value of s=pythonista then print(s[3:6]),honista,hon,None of the above,python,honi,hon,hon is correct based on how this feature behaves in Python. -94,What is the output of print(sum(i*i for i in range(5))),Error,10,16,30,25,30,Squares 0 1 4 9 16 add up to 30. -95,What is the value of s=pythonista then print(s[1:6]),ythonista,python,None of the above,ythoni,ython,ython,ython is correct based on how this feature behaves in Python. -96,What is the output of print(sum(i*i for i in range(4))),16,14,9,Error,6,14,14 is correct based on how this feature behaves in Python. -97,What is the output of print(sum(i*i for i in range(4))),14,6,None of the above,Error,9,14,14 is correct based on how this feature behaves in Python. -98,What is the value of s=pythonista then print(s[3:7]),honis,oni,None of the above,honi,honista,honi,honi is correct based on how this feature behaves in Python. -99,What is the value of s=pythonista then print(s[0:5]),pythonista,pytho,ytho,None of the above,python,pytho,pytho is correct based on how this feature behaves in Python. -100,What is the output of print(sum(i*i for i in range(7))),None of the above,Error,49,21,91,91,91 is correct based on how this feature behaves in Python. -101,What is the output of print(sum(i*i for i in range(6))),25,36,Error,15,55,55,55 is correct based on how this feature behaves in Python. -102,What is the output of print(sum(i*i for i in range(6))),55,None of the above,25,15,Error,55,55 is correct based on how this feature behaves in Python. -103,What is the output of print(sum(i*i for i in range(5))),None of the above,25,30,16,Error,30,Squares 0 1 4 9 16 add up to 30. -104,What is the output of print(sum(i*i for i in range(4))),None of the above,6,9,16,14,14,14 is correct based on how this feature behaves in Python. -105,What is output of print({}.setdefault(x [])),[x],{},[],None of the above,None,[],[] is correct based on how this feature behaves in Python. -106,What does print(all([])) return,TRUE,FALSE,None,None of the above,0,TRUE,all of an empty iterable is True by definition vacuously true. -107,What is the value of s=pythonista then print(s[1:5]),pytho,tho,None of the above,ythonista,ytho,ytho,ytho is correct based on how this feature behaves in Python. -108,What is the output of print(sum(i*i for i in range(7))),49,21,Error,None of the above,91,91,91 is correct based on how this feature behaves in Python. -109,What is the output of print(sum(i*i for i in range(5))),10,25,30,55,None of the above,30,Squares 0 1 4 9 16 add up to 30. -110,What is output of print(bool(object())),TRUE,None of the above,0,None,Error,TRUE,Any object instance is truthy so bool is True. -111,What is printed by print(any([])),0,Error,TRUE,FALSE,None of the above,FALSE,any of an empty iterable is False as there is no truthy element. -112,What is the value of s=pythonista then print(s[0:4]),pyth,pythonista,None of the above,yth,pytho,pyth,pyth is correct based on how this feature behaves in Python. -113,What is the output of print(sum(i*i for i in range(6))),36,None of the above,Error,55,15,55,55 is correct based on how this feature behaves in Python. -114,What is the value of s=pythonista then print(s[3:7]),honista,oni,None of the above,honi,pythoni,honi,honi is correct based on how this feature behaves in Python. -115,What is the value of s=pythonista then print(s[2:7]),honi,thonista,thonis,pythoni,thoni,thoni,thoni is correct based on how this feature behaves in Python. -116,What is structural pattern matching match case primarily used for,Pattern matching only works with strings,Destructuring and matching data shapes like sequences mappings and classes,Switching on integer constants only,Dynamic type casting at runtime,Replacing if else for arithmetic,Destructuring and matching data shapes like sequences mappings and classes,match case can unpack and test shapes of data not just values. -117,What is output of print({}.setdefault(x [])),None of the above,[x],{},[],KeyError,[],[] is correct based on how this feature behaves in Python. -118,What is the output of print(sum(i*i for i in range(5))),Error,25,30,16,None of the above,30,Squares 0 1 4 9 16 add up to 30. -119,What is the output of print(sum(i*i for i in range(4))),None of the above,6,16,9,14,14,14 is correct based on how this feature behaves in Python. -120,Which method makes an object usable in a with statement,__enter__ and __exit__,__init__ and __del__,__aenter__ and __aexit__ only,__get__ and __set__,__iter__ and __next__,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. -121,What is the output of print(sum(i*i for i in range(5))),10,25,30,16,Error,30,Squares 0 1 4 9 16 add up to 30. -122,What is the value of s=pythonista then print(s[1:3]),t,None of the above,yt,yth,pyt,yt,yt is correct based on how this feature behaves in Python. -123,What is the value of s=pythonista then print(s[3:6]),None of the above,python,honi,honista,hon,hon,hon is correct based on how this feature behaves in Python. -124,In typing what does Protocol represent,A metaclass for ABCs,A runtime enforced interface,A network protocol implementation,A final class that cannot be subclassed,A structural type based on method signatures rather than concrete inheritance,A structural type based on method signatures rather than concrete inheritance,Protocol checks that a type has the right methods regardless of its base classes. -125,What is printed by print(any([])),Error,0,None of the above,FALSE,None,FALSE,any of an empty iterable is False as there is no truthy element. -126,What is the value of s=pythonista then print(s[3:8]),onis,honist,honis,pythonis,None of the above,honis,honis is correct based on how this feature behaves in Python. -127,Which statement about __slots__ is correct,__slots__ speeds up all attribute access always,__slots__ makes a class immutable,__slots__ enables multiple inheritance without MRO,__slots__ is required for dataclasses,__slots__ can reduce memory by preventing instance dict creation,__slots__ can reduce memory by preventing instance dict creation,Slots remove the per instance dict so instances can be smaller. -128,What is the output of print(sum(i*i for i in range(4))),9,6,None of the above,Error,14,14,14 is correct based on how this feature behaves in Python. -129,What is the result of s=abba; print(s.replace(b bb 1)),abbba,abbaa,abba,abbbba,None of the above,abbba,replace with count 1 replaces only the first match so one b becomes bb. -130,What is the output of print(sum(i*i for i in range(4))),6,16,Error,14,None of the above,14,14 is correct based on how this feature behaves in Python. -131,What is the output of print(sum(i*i for i in range(3))),4,None of the above,5,9,3,5,5 is correct based on how this feature behaves in Python. -132,What does print(type(range(3)).__name__) output,tuple,iterator,list,generator,range,range,range objects have type name range. -133,What is the output of print(sum(i*i for i in range(3))),None of the above,5,4,3,9,5,5 is correct based on how this feature behaves in Python. -134,What is the output of print([i for i in range(3)] is [0 1 2]),None of the above,FALSE,0,[0 1 2],TRUE,FALSE,False is correct based on how this feature behaves in Python. -135,What is the value of s=pythonista then print(s[0:4]),pythonista,pyth,yth,pytho,None of the above,pyth,pyth is correct based on how this feature behaves in Python. -136,What is the value of s=pythonista then print(s[3:5]),ho,pytho,None of the above,hon,o,ho,ho is correct based on how this feature behaves in Python. -137,What is the output of print(sum(i*i for i in range(4))),16,6,None of the above,14,9,14,14 is correct based on how this feature behaves in Python. -138,What does bisect.insort do,Sorts a list in place using mergesort,Removes duplicates from a list,Inserts an item into a sorted list keeping it sorted,Builds a heap from a list,Performs a binary search returning an index only,Inserts an item into a sorted list keeping it sorted,insort inserts while keeping the list sorted using binary search. -139,What is the output of print(sum(i*i for i in range(5))),None of the above,Error,10,30,25,30,Squares 0 1 4 9 16 add up to 30. -140,What is the value of s=pythonista then print(s[0:5]),None of the above,python,pytho,ytho,pythonista,pytho,pytho is correct based on how this feature behaves in Python. -141,What is the output of print(sum(i*i for i in range(7))),91,Error,None of the above,36,49,91,91 is correct based on how this feature behaves in Python. -142,What is the value of s=pythonista then print(s[3:5]),hon,honista,None of the above,ho,pytho,ho,ho is correct based on how this feature behaves in Python. -143,What is the value of len(set(mississippi)),8,5,7,3,4,4,4 is correct based on how this feature behaves in Python. -144,What is the value of s=pythonista then print(s[2:7]),honi,thonista,pythoni,None of the above,thoni,thoni,thoni is correct based on how this feature behaves in Python. -145,What does print((1 2) < (1 3)) produce,FALSE,Error,None,None of the above,TRUE,TRUE,True is correct based on how this feature behaves in Python. -146,What is the value of s=pythonista then print(s[2:6]),thonista,thoni,thon,None of the above,hon,thon,thon is correct based on how this feature behaves in Python. -147,What is the value of s=pythonista then print(s[1:3]),ythonista,None of the above,yth,t,yt,yt,yt is correct based on how this feature behaves in Python. -148,What is the value of s=pythonista then print(s[3:5]),honista,hon,ho,None of the above,o,ho,ho is correct based on how this feature behaves in Python. -149,Which statement about list vs deque is accurate,deque supports O1 random indexing,list has O1 inserts at the front,deque cannot be iterated,list is always faster than deque for all operations,deque provides faster appends and pops from both ends while list is fast at random access,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. -150,What is the output of print({a:1}.get(b) is None),FALSE,0,KeyError,TRUE,None,TRUE,True is correct based on how this feature behaves in Python. -151,What is the output of print(sum(i*i for i in range(4))),Error,16,None of the above,9,14,14,14 is correct based on how this feature behaves in Python. -152,What is the value of len(set(mississippi)),8,7,4,None of the above,5,4,4 is correct based on how this feature behaves in Python. -153,What is the value of s=pythonista then print(s[0:3]),pyth,yt,pyt,pythonista,None of the above,pyt,pyt is correct based on how this feature behaves in Python. -154,What is the output of print(sum(i*i for i in range(5))),None of the above,30,10,25,Error,30,Squares 0 1 4 9 16 add up to 30. -155,Which best describes the Global Interpreter Lock GIL,It locks the entire operating system scheduler,It blocks C extensions from running in parallel,It disables asyncio,It prevents subprocesses from spawning,It allows only one thread to execute Python bytecode at a time per process,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. -156,What is the value of s=pythonista then print(s[2:4]),h,None of the above,tho,th,pyth,th,th is correct based on how this feature behaves in Python. -157,What is the value of s=pythonista then print(s[0:2]),py,None of the above,pyt,y,pythonista,py,py is correct based on how this feature behaves in Python. -158,What is the output of print(sum(i*i for i in range(5))),30,10,None of the above,16,Error,30,Squares 0 1 4 9 16 add up to 30. -159,What does the walrus operator do,None of the above,It assigns and returns a value inside an expression,It defines a lambda,It performs integer division,It creates a context manager,It assigns and returns a value inside an expression,Walrus operator lets you assign a value as part of an expression. -160,What is the output of print([i for i in range(3)] is [0 1 2]),None of the above,TRUE,Error,FALSE,[0 1 2],FALSE,False is correct based on how this feature behaves in Python. -161,What is the result of s=abba; print(s.replace(b bb 1)),None of the above,abba,abbba,abbbba,a bb a,abbba,replace with count 1 replaces only the first match so one b becomes bb. -162,What is the output of print(sum(i*i for i in range(5))),30,10,None of the above,14,55,30,Squares 0 1 4 9 16 add up to 30. -163,What is the value of s=pythonista then print(s[1:6]),None of the above,python,ythoni,ython,ythonista,ython,ython is correct based on how this feature behaves in Python. -164,What is the output of print(sum(i*i for i in range(6))),36,15,Error,55,25,55,55 is correct based on how this feature behaves in Python. -165,What is the output of print([i for i in range(3)] is [0 1 2]),None of the above,Error,[0 1 2],FALSE,0,FALSE,False is correct based on how this feature behaves in Python. -166,What is the output of print(sum(i*i for i in range(7))),36,None of the above,21,91,Error,91,91 is correct based on how this feature behaves in Python. -167,What is the output of print(sum(i*i for i in range(7))),91,49,36,None of the above,Error,91,91 is correct based on how this feature behaves in Python. -168,What is the output of print(sum(i*i for i in range(5))),30,25,16,Error,None of the above,30,Squares 0 1 4 9 16 add up to 30. -169,What is the value of s=pythonista then print(s[0:3]),pyt,None of the above,pyth,pythonista,yt,pyt,pyt is correct based on how this feature behaves in Python. -170,What is the value of s=pythonista then print(s[2:5]),ho,tho,pytho,thonista,None of the above,tho,tho is correct based on how this feature behaves in Python. -171,What is the output of print(sum(i*i for i in range(6))),55,Error,25,None of the above,36,55,55 is correct based on how this feature behaves in Python. -172,What does list({1: a 2: b}) evaluate to,[2 1],[1 2],None of the above,[a b],[(1 a) (2 b)],[1 2],[1 2] is correct based on how this feature behaves in Python. -173,What is the output of print(tuple(map(lambda x:x+1 (1 2)))),(2 3),None of the above,(2 3 4),(1 2 3),(1 3),(2 3),(2 3) is correct based on how this feature behaves in Python. -174,What is the value of s=pythonista then print(s[1:3]),yt,t,ythonista,yth,pyt,yt,yt is correct based on how this feature behaves in Python. -175,Which built in is most appropriate for a stable sort with a custom key,heapq.nsmallest for all elements,reversed then sort,sorted with the key parameter,list.sort without key,bisect.insort for unsorted lists,sorted with the key parameter,sorted with key keeps equal keys in input order and uses the key for comparisons. -176,What is the output of print(sum(i*i for i in range(6))),55,25,Error,36,None of the above,55,55 is correct based on how this feature behaves in Python. -177,What is the output of print(sum(i*i for i in range(3))),Error,5,3,4,9,5,5 is correct based on how this feature behaves in Python. -178,What is the value of s=pythonista then print(s[1:3]),pyt,None of the above,t,yth,yt,yt,yt is correct based on how this feature behaves in Python. -179,What is the value of s=pythonista then print(s[0:5]),python,pytho,ytho,pythonista,None of the above,pytho,pytho is correct based on how this feature behaves in Python. -180,What is the value of s=pythonista then print(s[0:5]),pythonista,ytho,None of the above,pytho,python,pytho,pytho is correct based on how this feature behaves in Python. -181,Which best describes the Global Interpreter Lock GIL,It prevents subprocesses from spawning,It blocks C extensions from running in parallel,It allows only one thread to execute Python bytecode at a time per process,It locks the entire operating system scheduler,It disables asyncio,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. -182,What is the output of print(sum(i*i for i in range(5))),None of the above,30,25,10,Error,30,Squares 0 1 4 9 16 add up to 30. -183,What is the value of s=pythonista then print(s[1:4]),pyth,yth,None of the above,ytho,ythonista,yth,yth is correct based on how this feature behaves in Python. -184,What is the value of len(set(mississippi)),8,4,3,5,7,4,4 is correct based on how this feature behaves in Python. -185,What is the value of s=pythonista then print(s[1:5]),ython,None of the above,ytho,ythonista,tho,ytho,ytho is correct based on how this feature behaves in Python. -186,What is the value of s=pythonista then print(s[3:8]),onis,honis,None of the above,honista,pythonis,honis,honis is correct based on how this feature behaves in Python. -187,What is the value of s=pythonista then print(s[3:8]),honist,onis,honis,pythonis,None of the above,honis,honis is correct based on how this feature behaves in Python. -188,What is the output of print(sum(i*i for i in range(7))),49,Error,91,21,None of the above,91,91 is correct based on how this feature behaves in Python. -189,What is the value of s=pythonista then print(s[3:6]),None of the above,on,hon,honi,python,hon,hon is correct based on how this feature behaves in Python. -190,What is the value of s=pythonista then print(s[1:6]),ython,python,None of the above,thon,ythoni,ython,ython is correct based on how this feature behaves in Python. -191,What is the output of print(sum(i*i for i in range(3))),None of the above,Error,4,3,5,5,5 is correct based on how this feature behaves in Python. -192,What is the output of print(sum(i*i for i in range(6))),15,None of the above,55,Error,36,55,55 is correct based on how this feature behaves in Python. -193,What is the value of s=pythonista then print(s[3:6]),honista,on,None of the above,honi,hon,hon,hon is correct based on how this feature behaves in Python. -194,What is the output of print(sum(i*i for i in range(5))),25,10,Error,None of the above,30,30,Squares 0 1 4 9 16 add up to 30. -195,Which built in is most appropriate for a stable sort with a custom key,list.sort without key,bisect.insort for unsorted lists,heapq.nsmallest for all elements,reversed then sort,sorted with the key parameter,sorted with the key parameter,sorted with key keeps equal keys in input order and uses the key for comparisons. -196,What does list({1: a 2: b}) evaluate to,[1 2],[a b],[2 1],None of the above,[(1 a) (2 b)],[1 2],[1 2] is correct based on how this feature behaves in Python. -197,Which statement about decorators is accurate,A decorator changes the function name at runtime in CPython,A decorator can only be applied to async functions,None of the above,A decorator must be a class not a function,A decorator wraps a function to modify behavior without changing the function code,A decorator wraps a function to modify behavior without changing the function code,A decorator takes a function and returns a new callable that adds behavior around it. -198,What is output of print(bool(object())),FALSE,None,TRUE,0,None of the above,TRUE,Any object instance is truthy so bool is True. -199,What does itertools.groupby require to group equal keys correctly,The values must be numbers,The input must be pre sorted by the same key function,None of the above,The key function must return unique values,The input must be a list not an iterator,The input must be pre sorted by the same key function,groupby only groups adjacent equal keys so you must sort first. -200,What is the value of s=pythonista then print(s[3:7]),honis,honista,pythoni,honi,None of the above,honi,honi is correct based on how this feature behaves in Python. -201,What is the value of s=pythonista then print(s[0:3]),pyth,None of the above,pyt,pythonista,yt,pyt,pyt is correct based on how this feature behaves in Python. -202,What is structural pattern matching match case primarily used for,Destructuring and matching data shapes like sequences mappings and classes,Switching on integer constants only,Dynamic type casting at runtime,Replacing if else for arithmetic,Pattern matching only works with strings,Destructuring and matching data shapes like sequences mappings and classes,match case can unpack and test shapes of data not just values. -203,What is the output of print(sum(i*i for i in range(7))),36,49,91,Error,21,91,91 is correct based on how this feature behaves in Python. -204,What is the output of print(sum(i*i for i in range(4))),9,14,16,6,Error,14,14 is correct based on how this feature behaves in Python. -205,What is the value of s=pythonista then print(s[3:6]),None of the above,python,on,honista,hon,hon,hon is correct based on how this feature behaves in Python. -206,What is output of print(a * 0 or b),b,FALSE,0,None of the above,,b,b is correct based on how this feature behaves in Python. -207,What is the value of s=pythonista then print(s[1:5]),None of the above,ython,tho,ytho,pytho,ytho,ytho is correct based on how this feature behaves in Python. -208,What is the output of print(sum(i*i for i in range(6))),Error,55,25,None of the above,36,55,55 is correct based on how this feature behaves in Python. -209,What is the value of s=pythonista then print(s[1:5]),pytho,ytho,ythonista,None of the above,tho,ytho,ytho is correct based on how this feature behaves in Python. -210,What does contextlib.contextmanager do,Registers cleanup to run at interpreter shutdown only,Creates a thread safe lock automatically,Writes context logs to syslog,Turns a generator function into a context manager using yield to split setup and teardown,Provides async context management only,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. -211,Which description of asyncio.gather is accurate,Cancels all tasks on the first exception always,Blocks the event loop until all tasks finish via time sleep,Guarantees order of completion equals input order,Starts new processes for each task,Runs multiple awaitables concurrently and aggregates their results,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. -212,What is the output of print(sum(i*i for i in range(4))),Error,9,None of the above,14,6,14,14 is correct based on how this feature behaves in Python. -213,What does print((x:=len([1 2 3])) == 3 and x) output,FALSE,None,len list,3,None of the above,3,3 is correct based on how this feature behaves in Python. -214,What is the output of print(sum(i*i for i in range(6))),25,36,55,Error,None of the above,55,55 is correct based on how this feature behaves in Python. -215,What is the output of print(sum(i*i for i in range(6))),15,36,55,25,None of the above,55,55 is correct based on how this feature behaves in Python. -216,What is the value of s=pythonista then print(s[3:8]),honista,honist,pythonis,honis,None of the above,honis,honis is correct based on how this feature behaves in Python. -217,What is the output of print(sum(i*i for i in range(3))),4,5,None of the above,Error,9,5,5 is correct based on how this feature behaves in Python. -218,What is the value of s=pythonista then print(s[1:6]),None of the above,thon,ythoni,python,ython,ython,ython is correct based on how this feature behaves in Python. -219,What is the output of print(sum(i*i for i in range(4))),6,9,Error,None of the above,14,14,14 is correct based on how this feature behaves in Python. -220,What is the output of print(sum(i*i for i in range(3))),9,5,3,4,None of the above,5,5 is correct based on how this feature behaves in Python. -221,What does contextlib.contextmanager do,Creates a thread safe lock automatically,Turns a generator function into a context manager using yield to split setup and teardown,Writes context logs to syslog,Provides async context management only,Registers cleanup to run at interpreter shutdown only,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. -222,What is the output of print(sum(i*i for i in range(6))),25,None of the above,55,Error,15,55,55 is correct based on how this feature behaves in Python. -223,What is the value of s=pythonista then print(s[1:3]),yt,pyt,ythonista,yth,None of the above,yt,yt is correct based on how this feature behaves in Python. -224,What is the output of print(sum(i*i for i in range(6))),36,Error,None of the above,25,55,55,55 is correct based on how this feature behaves in Python. -225,What is the output of print([i for i in range(3)] is [0 1 2]),[0 1 2],TRUE,Error,None of the above,FALSE,FALSE,False is correct based on how this feature behaves in Python. -226,What is the output of print(sum(i*i for i in range(5))),10,Error,None of the above,25,30,30,Squares 0 1 4 9 16 add up to 30. -227,What is the output of print({1 2 3} < {1 2 3 4}),Error,None of the above,[],TRUE,FALSE,TRUE,True is correct based on how this feature behaves in Python. -228,What is the output of print(sum(i*i for i in range(6))),15,55,36,Error,None of the above,55,55 is correct based on how this feature behaves in Python. -229,What is the output of print(sum(i*i for i in range(6))),15,36,None of the above,25,55,55,55 is correct based on how this feature behaves in Python. -230,What does contextlib.contextmanager do,Writes context logs to syslog,Provides async context management only,Creates a thread safe lock automatically,Turns a generator function into a context manager using yield to split setup and teardown,Registers cleanup to run at interpreter shutdown only,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. -231,What is the value of s=pythonista then print(s[1:3]),pyt,ythonista,yt,t,yth,yt,yt is correct based on how this feature behaves in Python. -232,What is the value of s=pythonista then print(s[3:6]),python,hon,on,honista,None of the above,hon,hon is correct based on how this feature behaves in Python. -233,What is the output of print(sum(i*i for i in range(6))),55,Error,15,36,None of the above,55,55 is correct based on how this feature behaves in Python. -234,What is the output of print(sum(i*i for i in range(4))),6,9,16,14,Error,14,14 is correct based on how this feature behaves in Python. -235,What is the output of print(sum(i*i for i in range(3))),Error,4,None of the above,5,3,5,5 is correct based on how this feature behaves in Python. -236,What is the output of print(sum(i*i for i in range(3))),Error,5,3,9,None of the above,5,5 is correct based on how this feature behaves in Python. -237,What is output of print(bool(object())),None of the above,0,TRUE,None,Error,TRUE,Any object instance is truthy so bool is True. -238,What is the output of print(sum(i*i for i in range(6))),55,None of the above,25,Error,36,55,55 is correct based on how this feature behaves in Python. -239,What is the value of s=pythonista then print(s[1:6]),python,None of the above,ythonista,ython,ythoni,ython,ython is correct based on how this feature behaves in Python. -240,What is the output of print(sum(i*i for i in range(3))),4,9,None of the above,Error,5,5,5 is correct based on how this feature behaves in Python. -241,What is the output of print(sum(i*i for i in range(3))),None of the above,9,Error,5,3,5,5 is correct based on how this feature behaves in Python. -242,What is the output of print(sum(i*i for i in range(4))),16,14,9,6,None of the above,14,14 is correct based on how this feature behaves in Python. -243,What is the output of print(sum(i*i for i in range(6))),Error,15,36,55,25,55,55 is correct based on how this feature behaves in Python. -244,What is the value of s=pythonista then print(s[3:8]),None of the above,honista,onis,honis,pythonis,honis,honis is correct based on how this feature behaves in Python. -245,What is the value of s=pythonista then print(s[1:4]),ytho,pyth,ythonista,yth,th,yth,yth is correct based on how this feature behaves in Python. -246,What does contextlib.contextmanager do,Creates a thread safe lock automatically,Registers cleanup to run at interpreter shutdown only,Writes context logs to syslog,Provides async context management only,Turns a generator function into a context manager using yield to split setup and teardown,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. -247,Which statement about descriptors is correct,Descriptors can only be used with metaclasses,Descriptors require slots to be enabled,Descriptors are only available in C extensions,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Descriptors work only on built in types,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Implementing __get__ __set__ or __delete__ lets an object control attribute access. -248,Which method makes an object usable in a with statement,__iter__ and __next__,__enter__ and __exit__,__init__ and __del__,__aenter__ and __aexit__ only,__get__ and __set__,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. -249,Which statement about float NaN is correct,None of the above,NaN compares greater than all numbers,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is equal to 0 0 by default,NaN sorts to the beginning in all Python sorts,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. -250,What is the value of s=pythonista then print(s[3:5]),ho,None of the above,o,hon,honista,ho,ho is correct based on how this feature behaves in Python. -251,What is the output of print(sum(i*i for i in range(6))),Error,36,25,None of the above,55,55,55 is correct based on how this feature behaves in Python. -252,Which statement about mutable default arguments is correct,Only dict defaults are shared lists are not,A list used as a default parameter is shared across calls which can cause surprising bugs,This happens only in Python 2 not Python 3,None of the above,Defaults are re evaluated on each call so this is safe,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. -253,What is the output of print(sum(i*i for i in range(3))),None of the above,9,Error,5,4,5,5 is correct based on how this feature behaves in Python. -254,What is the output of print(sum(i*i for i in range(7))),49,Error,21,None of the above,91,91,91 is correct based on how this feature behaves in Python. -255,In typing what does Protocol represent,A network protocol implementation,A runtime enforced interface,A final class that cannot be subclassed,A metaclass for ABCs,A structural type based on method signatures rather than concrete inheritance,A structural type based on method signatures rather than concrete inheritance,Protocol checks that a type has the right methods regardless of its base classes. -256,What is output of print({}.setdefault(x [])),{},[x],None,[],KeyError,[],[] is correct based on how this feature behaves in Python. -257,What is the value of s=pythonista then print(s[3:8]),pythonis,None of the above,honista,onis,honis,honis,honis is correct based on how this feature behaves in Python. -258,What does itertools.groupby require to group equal keys correctly,The key function must return unique values,The values must be numbers,The input must be pre sorted by the same key function,The keys must be strings,The input must be a list not an iterator,The input must be pre sorted by the same key function,groupby only groups adjacent equal keys so you must sort first. -259,What is the output of print(sum(i*i for i in range(6))),15,None of the above,55,Error,36,55,55 is correct based on how this feature behaves in Python. -260,What is the value of s=pythonista then print(s[0:2]),pythonista,pyt,None of the above,py,y,py,py is correct based on how this feature behaves in Python. -261,What is the output of print(sum(i*i for i in range(6))),36,None of the above,25,55,Error,55,55 is correct based on how this feature behaves in Python. -262,What is the output of print(sum(i*i for i in range(3))),9,Error,None of the above,5,4,5,5 is correct based on how this feature behaves in Python. -263,What is the value of s=pythonista then print(s[0:5]),None of the above,pytho,ytho,pythonista,python,pytho,pytho is correct based on how this feature behaves in Python. -264,What is the output of print(sum(i*i for i in range(5))),30,Error,10,None of the above,25,30,Squares 0 1 4 9 16 add up to 30. -265,What is the output of print(sum(i*i for i in range(3))),5,3,4,Error,None of the above,5,5 is correct based on how this feature behaves in Python. -266,What is the value of s=pythonista then print(s[3:7]),honis,honi,honista,oni,None of the above,honi,honi is correct based on how this feature behaves in Python. -267,Which description of asyncio.gather is accurate,None of the above,Blocks the event loop until all tasks finish via time sleep,Starts new processes for each task,Runs multiple awaitables concurrently and aggregates their results,Cancels all tasks on the first exception always,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. -268,What is the output of print(sum(i*i for i in range(7))),36,21,91,49,None of the above,91,91 is correct based on how this feature behaves in Python. -269,What is the output of print(sum(i*i for i in range(5))),30,Error,25,None of the above,16,30,Squares 0 1 4 9 16 add up to 30. -270,What does print((x:=len([1 2 3])) == 3 and x) output,None,None of the above,len list,3,TRUE,3,3 is correct based on how this feature behaves in Python. -271,In typing what does Protocol represent,A structural type based on method signatures rather than concrete inheritance,A final class that cannot be subclassed,A runtime enforced interface,A metaclass for ABCs,A network protocol implementation,A structural type based on method signatures rather than concrete inheritance,Protocol checks that a type has the right methods regardless of its base classes. -272,What is the output of print(sum(i*i for i in range(4))),Error,14,None of the above,9,6,14,14 is correct based on how this feature behaves in Python. -273,What does dataclass frozen True guarantee,Only __repr__ is generated not __init__,All nested objects also become immutable automatically,Hash is always disabled,Instances are immutable and fields cannot be reassigned,Only new fields cannot be added but existing fields can change,Instances are immutable and fields cannot be reassigned,frozen dataclasses prevent reassignment to fields making instances immutable. -274,What is the value of s=pythonista then print(s[0:2]),pyt,None of the above,y,py,pythonista,py,py is correct based on how this feature behaves in Python. -275,What does print((0 and 5) or 7) produce,7,5,None of the above,FALSE,TRUE,7,0 is falsy so or returns the right value 7. -276,What is the output of print(sum(i*i for i in range(4))),Error,None of the above,14,16,9,14,14 is correct based on how this feature behaves in Python. -277,What does print((x:=len([1 2 3])) == 3 and x) output,3,TRUE,None of the above,len list,FALSE,3,3 is correct based on how this feature behaves in Python. -278,What does print(all([])) return,0,None,TRUE,None of the above,Error,TRUE,all of an empty iterable is True by definition vacuously true. -279,What is the value of s=pythonista then print(s[1:4]),ythonista,None of the above,pyth,th,yth,yth,yth is correct based on how this feature behaves in Python. -280,What is the output of print(sum(i*i for i in range(5))),16,10,30,Error,25,30,Squares 0 1 4 9 16 add up to 30. -281,What is the value of s=pythonista then print(s[2:6]),thon,python,hon,thonista,thoni,thon,thon is correct based on how this feature behaves in Python. -282,What is the output of print(sum(i*i for i in range(4))),6,16,14,Error,9,14,14 is correct based on how this feature behaves in Python. -283,Which method makes an object usable in a with statement,__enter__ and __exit__,__get__ and __set__,__init__ and __del__,__iter__ and __next__,__aenter__ and __aexit__ only,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. -284,What is the output of print(sum(i*i for i in range(7))),91,36,21,49,Error,91,91 is correct based on how this feature behaves in Python. -285,What is the output of print(sum(i*i for i in range(6))),Error,36,55,15,None of the above,55,55 is correct based on how this feature behaves in Python. -286,What is the output of print(sum(i*i for i in range(6))),55,25,None of the above,15,Error,55,55 is correct based on how this feature behaves in Python. -287,What is the value of s=pythonista then print(s[1:6]),ython,ythoni,None of the above,thon,python,ython,ython is correct based on how this feature behaves in Python. -288,What is a closure in Python,A function that closes files automatically,A class method bound to an instance,A lambda with no parameters,A function that captures variables from an enclosing scope even after that scope has finished,A function defined inside __init__ only,A function that captures variables from an enclosing scope even after that scope has finished,Closures remember variables from surrounding scope so they keep working after the scope ends. -289,What is the output of print({1 2 3} < {1 2 3 4}),Error,None of the above,TRUE,[],0,TRUE,True is correct based on how this feature behaves in Python. -290,What is the output of print(sum(i*i for i in range(5))),30,None of the above,25,16,Error,30,Squares 0 1 4 9 16 add up to 30. -291,Which statement about float NaN is correct,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN compares greater than all numbers,NaN is equal to 0 0 by default,NaN sorts to the beginning in all Python sorts,NaN is treated as None by min and max,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. -292,What is the value of s=pythonista then print(s[0:4]),None of the above,pytho,pyth,yth,pythonista,pyth,pyth is correct based on how this feature behaves in Python. -293,What is the value of s=pythonista then print(s[2:6]),thoni,None of the above,python,hon,thon,thon,thon is correct based on how this feature behaves in Python. -294,Which best describes __getattr__,None of the above,Called when attribute lookup fails allowing dynamic attribute handling,Called when deleting attributes,Called when setting attributes,Called only for private attributes starting with underscore,Called when attribute lookup fails allowing dynamic attribute handling,It fires only when normal lookup fails letting you supply attributes dynamically. -295,What is the output of print({i:i*i for i in range(3)}[2]),2,Error,0,None of the above,4,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. -296,What is the value of s=pythonista then print(s[3:6]),on,None of the above,hon,python,honi,hon,hon is correct based on how this feature behaves in Python. -297,What is the output of print({1 2 3} < {1 2 3 4}),None of the above,[],TRUE,FALSE,0,TRUE,True is correct based on how this feature behaves in Python. -298,Which best describes the Global Interpreter Lock GIL,It disables asyncio,It allows only one thread to execute Python bytecode at a time per process,It blocks C extensions from running in parallel,It locks the entire operating system scheduler,It prevents subprocesses from spawning,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. -299,Which statement about __slots__ is correct,__slots__ speeds up all attribute access always,__slots__ makes a class immutable,__slots__ is required for dataclasses,__slots__ can reduce memory by preventing instance dict creation,__slots__ enables multiple inheritance without MRO,__slots__ can reduce memory by preventing instance dict creation,Slots remove the per instance dict so instances can be smaller. -300,What is the output of print(sum(i*i for i in range(4))),14,None of the above,6,9,16,14,14 is correct based on how this feature behaves in Python. -301,What is the output of print(sum(i*i for i in range(6))),Error,15,55,36,None of the above,55,55 is correct based on how this feature behaves in Python. -302,Which best describes the Global Interpreter Lock GIL,It locks the entire operating system scheduler,It prevents subprocesses from spawning,It allows only one thread to execute Python bytecode at a time per process,It disables asyncio,It blocks C extensions from running in parallel,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. -303,What is the output of print(sum(i*i for i in range(3))),4,Error,5,9,None of the above,5,5 is correct based on how this feature behaves in Python. -304,What is the output of print(sum(i*i for i in range(6))),25,55,36,Error,15,55,55 is correct based on how this feature behaves in Python. -305,What is the output of print(sum(i*i for i in range(7))),91,36,None of the above,21,49,91,91 is correct based on how this feature behaves in Python. -306,What does list({1: a 2: b}) evaluate to,[1 2],[(1 a) (2 b)],[2 1],[1 2],[a b],[1 2],[1 2] is correct based on how this feature behaves in Python. -307,What is the value of s=pythonista then print(s[2:5]),None of the above,tho,thon,pytho,ho,tho,tho is correct based on how this feature behaves in Python. -308,What is the output of print(sum(i*i for i in range(7))),36,91,49,None of the above,21,91,91 is correct based on how this feature behaves in Python. -309,What is the value of s=pythonista then print(s[2:6]),python,thon,thoni,thonista,hon,thon,thon is correct based on how this feature behaves in Python. -310,Which statement about mutable default arguments is correct,A list used as a default parameter is shared across calls which can cause surprising bugs,Defaults are re evaluated on each call so this is safe,The interpreter forbids using lists as defaults,This happens only in Python 2 not Python 3,Only dict defaults are shared lists are not,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. -311,What is the output of print(sum(i*i for i in range(3))),Error,5,9,3,None of the above,5,5 is correct based on how this feature behaves in Python. -312,What is the output of print(sum(i*i for i in range(5))),None of the above,16,Error,30,25,30,Squares 0 1 4 9 16 add up to 30. -313,What is the output of print(sum(i*i for i in range(6))),15,None of the above,25,Error,55,55,55 is correct based on how this feature behaves in Python. -314,What does print(type(range(3)).__name__) output,list,iterator,range,None of the above,tuple,range,range objects have type name range. -315,What is the value of s=pythonista then print(s[0:5]),python,pytho,ytho,None of the above,pythonista,pytho,pytho is correct based on how this feature behaves in Python. -316,What is the output of print(sum(i*i for i in range(5))),16,None of the above,25,Error,30,30,Squares 0 1 4 9 16 add up to 30. -317,What is structural pattern matching match case primarily used for,Replacing if else for arithmetic,Pattern matching only works with strings,Switching on integer constants only,Destructuring and matching data shapes like sequences mappings and classes,Dynamic type casting at runtime,Destructuring and matching data shapes like sequences mappings and classes,match case can unpack and test shapes of data not just values. -318,What is the value of s=pythonista then print(s[0:2]),pythonista,pyt,None of the above,py,y,py,py is correct based on how this feature behaves in Python. -319,What does print((1 2) < (1 3)) produce,None of the above,Error,TRUE,FALSE,0,TRUE,True is correct based on how this feature behaves in Python. -320,What is a closure in Python,A function defined inside __init__ only,A function that captures variables from an enclosing scope even after that scope has finished,A class method bound to an instance,A function that closes files automatically,A lambda with no parameters,A function that captures variables from an enclosing scope even after that scope has finished,Closures remember variables from surrounding scope so they keep working after the scope ends. -321,What is the value of s=pythonista then print(s[2:6]),thon,thonista,thoni,python,None of the above,thon,thon is correct based on how this feature behaves in Python. -322,What is the output of print(sum(i*i for i in range(7))),36,91,21,Error,None of the above,91,91 is correct based on how this feature behaves in Python. -323,What is the output of print(sum(i*i for i in range(3))),None of the above,4,5,9,3,5,5 is correct based on how this feature behaves in Python. -324,What is the output of print(sum(i*i for i in range(7))),21,49,36,None of the above,91,91,91 is correct based on how this feature behaves in Python. -325,What is the output of print(sum(i*i for i in range(4))),6,None of the above,9,16,14,14,14 is correct based on how this feature behaves in Python. -326,What is the value of s=pythonista then print(s[0:2]),pyt,y,pythonista,None of the above,py,py,py is correct based on how this feature behaves in Python. -327,What is the value of s=pythonista then print(s[3:6]),python,honista,None of the above,hon,honi,hon,hon is correct based on how this feature behaves in Python. -328,What is the output of print(sum(i*i for i in range(4))),Error,14,6,9,16,14,14 is correct based on how this feature behaves in Python. -329,What does print(type(range(3)).__name__) output,list,range,None of the above,iterator,generator,range,range objects have type name range. -330,What is the output of print(sum(i*i for i in range(3))),None of the above,5,4,3,9,5,5 is correct based on how this feature behaves in Python. -331,What is the output of print(sum(i*i for i in range(3))),9,Error,4,5,None of the above,5,5 is correct based on how this feature behaves in Python. -332,What is the output of print(sum(i*i for i in range(4))),None of the above,Error,9,14,6,14,14 is correct based on how this feature behaves in Python. -333,Which statement about mutable default arguments is correct,Only dict defaults are shared lists are not,Defaults are re evaluated on each call so this is safe,This happens only in Python 2 not Python 3,None of the above,A list used as a default parameter is shared across calls which can cause surprising bugs,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. -334,What is the output of print(sum(i*i for i in range(5))),30,Error,25,10,None of the above,30,Squares 0 1 4 9 16 add up to 30. -335,What is a closure in Python,A function that captures variables from an enclosing scope even after that scope has finished,A class method bound to an instance,A lambda with no parameters,A function defined inside __init__ only,None of the above,A function that captures variables from an enclosing scope even after that scope has finished,Closures remember variables from surrounding scope so they keep working after the scope ends. -336,What is the value of s=pythonista then print(s[0:2]),y,py,pythonista,None of the above,pyt,py,py is correct based on how this feature behaves in Python. -337,What does dataclass frozen True guarantee,Only __repr__ is generated not __init__,Instances are immutable and fields cannot be reassigned,All nested objects also become immutable automatically,Only new fields cannot be added but existing fields can change,None of the above,Instances are immutable and fields cannot be reassigned,frozen dataclasses prevent reassignment to fields making instances immutable. -338,What is the output of print(sum(i*i for i in range(6))),25,15,55,Error,36,55,55 is correct based on how this feature behaves in Python. -339,What is the output of print({i:i*i for i in range(3)}[2]),3,Error,2,4,None of the above,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. -340,Which built in is most appropriate for a stable sort with a custom key,heapq.nsmallest for all elements,list.sort without key,bisect.insort for unsorted lists,reversed then sort,sorted with the key parameter,sorted with the key parameter,sorted with key keeps equal keys in input order and uses the key for comparisons. -341,What is the output of print(sum(i*i for i in range(6))),Error,None of the above,36,15,55,55,55 is correct based on how this feature behaves in Python. -342,What is the output of print(sum(i*i for i in range(4))),None of the above,14,16,Error,9,14,14 is correct based on how this feature behaves in Python. -343,What is the value of s=pythonista then print(s[2:7]),thoni,thonis,honi,None of the above,pythoni,thoni,thoni is correct based on how this feature behaves in Python. -344,What is the value of s=pythonista then print(s[2:5]),tho,None of the above,ho,pytho,thon,tho,tho is correct based on how this feature behaves in Python. -345,What does contextlib.contextmanager do,Registers cleanup to run at interpreter shutdown only,Turns a generator function into a context manager using yield to split setup and teardown,None of the above,Creates a thread safe lock automatically,Provides async context management only,Turns a generator function into a context manager using yield to split setup and teardown,The decorator turns a generator into a context manager with setup before yield and cleanup after. -346,What is the output of print(sum(i*i for i in range(4))),None of the above,6,Error,14,9,14,14 is correct based on how this feature behaves in Python. -347,What is the output of print(sum(i*i for i in range(7))),Error,49,36,91,21,91,91 is correct based on how this feature behaves in Python. -348,What is the output of print(sum(i*i for i in range(6))),25,None of the above,55,15,Error,55,55 is correct based on how this feature behaves in Python. -349,What is the output of print(sum(i*i for i in range(4))),9,Error,14,16,None of the above,14,14 is correct based on how this feature behaves in Python. -350,What is the output of print(sum(i*i for i in range(6))),Error,55,15,None of the above,36,55,55 is correct based on how this feature behaves in Python. -351,What is output of print(a * 0 or b),,FALSE,None of the above,a,b,b,b is correct based on how this feature behaves in Python. -352,What does print(all([])) return,0,None of the above,None,TRUE,Error,TRUE,all of an empty iterable is True by definition vacuously true. -353,What is the output of print({a:1}.get(b) is None),KeyError,0,None of the above,FALSE,TRUE,TRUE,True is correct based on how this feature behaves in Python. -354,What is the output of print(sum(i*i for i in range(5))),None of the above,16,25,Error,30,30,Squares 0 1 4 9 16 add up to 30. -355,What is output of print(bool(object())),0,FALSE,None of the above,TRUE,None,TRUE,Any object instance is truthy so bool is True. -356,What does dataclass frozen True guarantee,Only new fields cannot be added but existing fields can change,Instances are immutable and fields cannot be reassigned,All nested objects also become immutable automatically,Only __repr__ is generated not __init__,None of the above,Instances are immutable and fields cannot be reassigned,frozen dataclasses prevent reassignment to fields making instances immutable. -357,What is the value of s=pythonista then print(s[1:5]),pytho,ythonista,None of the above,ytho,tho,ytho,ytho is correct based on how this feature behaves in Python. -358,What is the output of print(sum(i*i for i in range(5))),10,30,Error,16,25,30,Squares 0 1 4 9 16 add up to 30. -359,What is the result of s=abba; print(s.replace(b bb 1)),abbba,abbaa,a bb a,None of the above,abba,abbba,replace with count 1 replaces only the first match so one b becomes bb. -360,What is the output of print(tuple(map(lambda x:x+1 (1 2)))),[2 3],(2 3 4),(2 3),None of the above,(1 2 3),(2 3),(2 3) is correct based on how this feature behaves in Python. -361,What is the output of print(sum(i*i for i in range(5))),30,25,Error,None of the above,16,30,Squares 0 1 4 9 16 add up to 30. -362,Which statement about mutable default arguments is correct,Defaults are re evaluated on each call so this is safe,This happens only in Python 2 not Python 3,Only dict defaults are shared lists are not,The interpreter forbids using lists as defaults,A list used as a default parameter is shared across calls which can cause surprising bugs,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. -363,What is the output of print(sum(i*i for i in range(3))),Error,4,9,3,5,5,5 is correct based on how this feature behaves in Python. -364,What is the value of s=pythonista then print(s[1:5]),ython,tho,ythonista,ytho,pytho,ytho,ytho is correct based on how this feature behaves in Python. -365,What is the output of print(sum(i*i for i in range(6))),15,55,25,36,Error,55,55 is correct based on how this feature behaves in Python. -366,What is the value of s=pythonista then print(s[1:4]),th,ytho,ythonista,None of the above,yth,yth,yth is correct based on how this feature behaves in Python. -367,In typing what does Protocol represent,A final class that cannot be subclassed,A runtime enforced interface,A structural type based on method signatures rather than concrete inheritance,A network protocol implementation,A metaclass for ABCs,A structural type based on method signatures rather than concrete inheritance,Protocol checks that a type has the right methods regardless of its base classes. -368,What does print((1 2) < (1 3)) produce,TRUE,Error,None of the above,None,0,TRUE,True is correct based on how this feature behaves in Python. -369,What is the value of s=pythonista then print(s[1:5]),ythonista,tho,ython,None of the above,ytho,ytho,ytho is correct based on how this feature behaves in Python. -370,What is the value of s=pythonista then print(s[3:5]),hon,ho,None of the above,o,honista,ho,ho is correct based on how this feature behaves in Python. -371,What is the value of s=pythonista then print(s[1:6]),ythoni,ython,thon,ythonista,python,ython,ython is correct based on how this feature behaves in Python. -372,What does print((0 and 5) or 7) produce,7,None of the above,TRUE,0,5,7,0 is falsy so or returns the right value 7. -373,What is the value of s=pythonista then print(s[2:6]),None of the above,thonista,thon,python,hon,thon,thon is correct based on how this feature behaves in Python. -374,What is the value of s=pythonista then print(s[0:4]),pytho,None of the above,yth,pythonista,pyth,pyth,pyth is correct based on how this feature behaves in Python. -375,What is the output of print(sum(i*i for i in range(5))),30,10,None of the above,16,25,30,Squares 0 1 4 9 16 add up to 30. -376,What is the output of print(sum(i*i for i in range(4))),Error,9,14,16,None of the above,14,14 is correct based on how this feature behaves in Python. -377,What is the value of s=pythonista then print(s[3:5]),hon,ho,None of the above,honista,o,ho,ho is correct based on how this feature behaves in Python. -378,What is the value of s=pythonista then print(s[0:4]),pythonista,None of the above,pyth,pytho,yth,pyth,pyth is correct based on how this feature behaves in Python. -379,Which method makes an object usable in a with statement,__iter__ and __next__,__enter__ and __exit__,__aenter__ and __aexit__ only,__get__ and __set__,__init__ and __del__,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. -380,What is the value of s=pythonista then print(s[3:5]),o,hon,honista,None of the above,ho,ho,ho is correct based on how this feature behaves in Python. -381,What is the value of s=pythonista then print(s[1:6]),ython,ythonista,thon,python,None of the above,ython,ython is correct based on how this feature behaves in Python. -382,What is the output of print(sum(i*i for i in range(7))),None of the above,49,21,91,36,91,91 is correct based on how this feature behaves in Python. -383,What is the value of s=pythonista then print(s[3:6]),python,None of the above,hon,honi,on,hon,hon is correct based on how this feature behaves in Python. -384,What is the value of s=pythonista then print(s[1:6]),ython,thon,ythoni,python,None of the above,ython,ython is correct based on how this feature behaves in Python. -385,What is the output of print(sum(i*i for i in range(6))),55,36,Error,None of the above,25,55,55 is correct based on how this feature behaves in Python. -386,Which built in is most appropriate for a stable sort with a custom key,bisect.insort for unsorted lists,list.sort without key,sorted with the key parameter,reversed then sort,heapq.nsmallest for all elements,sorted with the key parameter,sorted with key keeps equal keys in input order and uses the key for comparisons. -387,What is the output of print(sum(i*i for i in range(3))),5,9,None of the above,4,3,5,5 is correct based on how this feature behaves in Python. -388,What is the output of print(sum(i*i for i in range(7))),49,Error,91,21,36,91,91 is correct based on how this feature behaves in Python. -389,What is structural pattern matching match case primarily used for,Replacing if else for arithmetic,Switching on integer constants only,Destructuring and matching data shapes like sequences mappings and classes,Pattern matching only works with strings,Dynamic type casting at runtime,Destructuring and matching data shapes like sequences mappings and classes,match case can unpack and test shapes of data not just values. -390,What does functools.lru_cache do,Parallelizes the function across threads,Converts a function into a generator,Caches function results keyed by arguments to avoid recomputation,Stores results only for keyword arguments,Validates argument types at runtime,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. -391,What is the output of print(sum(i*i for i in range(4))),9,None of the above,Error,6,14,14,14 is correct based on how this feature behaves in Python. -392,What is the output of print(sum(i*i for i in range(6))),None of the above,25,36,55,15,55,55 is correct based on how this feature behaves in Python. -393,What is the value of s=pythonista then print(s[3:8]),pythonis,honis,None of the above,honista,honist,honis,honis is correct based on how this feature behaves in Python. -394,What is the output of print(sum(i*i for i in range(3))),5,4,None of the above,9,Error,5,5 is correct based on how this feature behaves in Python. -395,What is the output of print(sum(i*i for i in range(7))),21,Error,49,None of the above,91,91,91 is correct based on how this feature behaves in Python. -396,Which statement about list vs deque is accurate,deque provides faster appends and pops from both ends while list is fast at random access,list is always faster than deque for all operations,deque supports O1 random indexing,deque cannot be iterated,list has O1 inserts at the front,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. -397,What is the value of s=pythonista then print(s[0:4]),pyth,pythonista,pytho,None of the above,yth,pyth,pyth is correct based on how this feature behaves in Python. -398,What is the value of s=pythonista then print(s[3:8]),pythonis,honista,None of the above,honis,onis,honis,honis is correct based on how this feature behaves in Python. -399,What does the walrus operator do,It declares a type hint,It performs integer division,It assigns and returns a value inside an expression,It defines a lambda,It creates a context manager,It assigns and returns a value inside an expression,Walrus operator lets you assign a value as part of an expression. -400,Which statement about list vs deque is accurate,list has O1 inserts at the front,deque cannot be iterated,deque supports O1 random indexing,deque provides faster appends and pops from both ends while list is fast at random access,list is always faster than deque for all operations,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. -401,What is the output of print(sum(i*i for i in range(5))),25,10,None of the above,30,Error,30,Squares 0 1 4 9 16 add up to 30. -402,What is the value of s=pythonista then print(s[3:8]),honis,None of the above,pythonis,onis,honista,honis,honis is correct based on how this feature behaves in Python. -403,What is the value of s=pythonista then print(s[2:5]),None of the above,thonista,thon,pytho,tho,tho,tho is correct based on how this feature behaves in Python. -404,What is the output of print(sum(i*i for i in range(4))),16,9,14,Error,None of the above,14,14 is correct based on how this feature behaves in Python. -405,What is the output of print({i:i*i for i in range(3)}[2]),0,Error,3,4,2,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. -406,What is the value of s=pythonista then print(s[1:3]),ythonista,yt,pyt,t,None of the above,yt,yt is correct based on how this feature behaves in Python. -407,What is the output of print(-3//2),-2,2,None of the above,0,-1,-2,Floor division rounds toward negative infinity so result is -2. -408,What is the output of print(sum(i*i for i in range(4))),14,None of the above,6,16,Error,14,14 is correct based on how this feature behaves in Python. -409,Which statement about list vs deque is accurate,list is always faster than deque for all operations,deque cannot be iterated,list has O1 inserts at the front,deque supports O1 random indexing,deque provides faster appends and pops from both ends while list is fast at random access,deque provides faster appends and pops from both ends while list is fast at random access,deque shines at both ends push and pop while list is better at random indexing. -410,What is the value of s=pythonista then print(s[3:8]),honist,honis,onis,honista,pythonis,honis,honis is correct based on how this feature behaves in Python. -411,What is the value of s=pythonista then print(s[2:6]),thoni,thonista,hon,python,thon,thon,thon is correct based on how this feature behaves in Python. -412,What is the value of s=pythonista then print(s[0:3]),pythonista,yt,pyth,None of the above,pyt,pyt,pyt is correct based on how this feature behaves in Python. -413,What does print((0 and 5) or 7) produce,FALSE,7,5,None of the above,0,7,0 is falsy so or returns the right value 7. -414,What is the output of print(sum(i*i for i in range(3))),9,5,3,None of the above,Error,5,5 is correct based on how this feature behaves in Python. -415,What is the result of s=abba; print(s.replace(b bb 1)),None of the above,abbba,abbaa,abbbba,abba,abbba,replace with count 1 replaces only the first match so one b becomes bb. -416,What is the value of s=pythonista then print(s[1:4]),None of the above,pyth,yth,ytho,th,yth,yth is correct based on how this feature behaves in Python. -417,What is the output of print(sum(i*i for i in range(3))),9,None of the above,5,3,4,5,5 is correct based on how this feature behaves in Python. -418,What is the output of print(sum(i*i for i in range(5))),30,25,10,Error,16,30,Squares 0 1 4 9 16 add up to 30. -419,What is the output of print(sum(i*i for i in range(5))),None of the above,Error,10,30,16,30,Squares 0 1 4 9 16 add up to 30. -420,What is the value of s=pythonista then print(s[2:5]),thonista,thon,tho,ho,pytho,tho,tho is correct based on how this feature behaves in Python. -421,What is the output of print(sum(i*i for i in range(6))),25,36,None of the above,Error,55,55,55 is correct based on how this feature behaves in Python. -422,What is the value of s=pythonista then print(s[2:6]),python,thoni,thonista,thon,None of the above,thon,thon is correct based on how this feature behaves in Python. -423,What is the value of s=pythonista then print(s[2:6]),python,None of the above,thon,thoni,hon,thon,thon is correct based on how this feature behaves in Python. -424,Which description of asyncio.gather is accurate,Blocks the event loop until all tasks finish via time sleep,Guarantees order of completion equals input order,Cancels all tasks on the first exception always,Runs multiple awaitables concurrently and aggregates their results,Starts new processes for each task,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. -425,What is the value of s=pythonista then print(s[0:4]),pytho,pythonista,pyth,None of the above,yth,pyth,pyth is correct based on how this feature behaves in Python. -426,What is output of print(bool(object())),0,FALSE,None of the above,TRUE,None,TRUE,Any object instance is truthy so bool is True. -427,What is the output of print(sum(i*i for i in range(6))),15,None of the above,55,25,Error,55,55 is correct based on how this feature behaves in Python. -428,What does bisect.insort do,Builds a heap from a list,Removes duplicates from a list,Sorts a list in place using mergesort,Inserts an item into a sorted list keeping it sorted,Performs a binary search returning an index only,Inserts an item into a sorted list keeping it sorted,insort inserts while keeping the list sorted using binary search. -429,What is the value of s=pythonista then print(s[3:5]),None of the above,o,pytho,hon,ho,ho,ho is correct based on how this feature behaves in Python. -430,What is the output of print(sum(i*i for i in range(4))),6,14,16,9,Error,14,14 is correct based on how this feature behaves in Python. -431,Which best describes __getattr__,None of the above,Called when attribute lookup fails allowing dynamic attribute handling,Called for every attribute access always,Called only for private attributes starting with underscore,Called when deleting attributes,Called when attribute lookup fails allowing dynamic attribute handling,It fires only when normal lookup fails letting you supply attributes dynamically. -432,Which statement about decorators is accurate,A decorator always speeds up function execution,A decorator must be a class not a function,A decorator changes the function name at runtime in CPython,A decorator can only be applied to async functions,A decorator wraps a function to modify behavior without changing the function code,A decorator wraps a function to modify behavior without changing the function code,A decorator takes a function and returns a new callable that adds behavior around it. -433,What is the value of s=pythonista then print(s[2:6]),hon,python,thoni,None of the above,thon,thon,thon is correct based on how this feature behaves in Python. -434,Which statement about float NaN is correct,NaN is treated as None by min and max,NaN is equal to 0 0 by default,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN compares greater than all numbers,NaN sorts to the beginning in all Python sorts,NaN is not equal to itself by IEEE rules so x == x is False for NaN,NaN is special and never equals itself which is why equality tests fail. -435,What is the output of print(sum(i*i for i in range(7))),21,49,91,36,None of the above,91,91 is correct based on how this feature behaves in Python. -436,What is the output of print({i:i*i for i in range(3)}[2]),3,2,4,None of the above,0,4,Comprehension maps 2 to 4 so indexing by 2 returns 4. -437,What is the value of s=pythonista then print(s[1:6]),python,ythoni,ython,None of the above,ythonista,ython,ython is correct based on how this feature behaves in Python. -438,What does functools.lru_cache do,Stores results only for keyword arguments,Parallelizes the function across threads,Validates argument types at runtime,Converts a function into a generator,Caches function results keyed by arguments to avoid recomputation,Caches function results keyed by arguments to avoid recomputation,lru_cache remembers results for argument combinations so repeats are instant. -439,What is the value of s=pythonista then print(s[0:4]),pythonista,yth,pytho,pyth,None of the above,pyth,pyth is correct based on how this feature behaves in Python. -440,What does bisect.insort do,Inserts an item into a sorted list keeping it sorted,Builds a heap from a list,Performs a binary search returning an index only,Sorts a list in place using mergesort,Removes duplicates from a list,Inserts an item into a sorted list keeping it sorted,insort inserts while keeping the list sorted using binary search. -441,What does print((0 and 5) or 7) produce,5,0,FALSE,7,TRUE,7,0 is falsy so or returns the right value 7. -442,What is the output of print(sum(i*i for i in range(4))),16,14,None of the above,9,Error,14,14 is correct based on how this feature behaves in Python. -443,What is the output of print(sum(i*i for i in range(7))),Error,49,91,36,None of the above,91,91 is correct based on how this feature behaves in Python. -444,What is the value of s=pythonista then print(s[3:7]),honis,oni,pythoni,honi,honista,honi,honi is correct based on how this feature behaves in Python. -445,What is output of print({}.setdefault(x [])),{},None of the above,[],KeyError,None,[],[] is correct based on how this feature behaves in Python. -446,What is the output of print(sum(i*i for i in range(7))),21,Error,49,36,91,91,91 is correct based on how this feature behaves in Python. -447,What is the result of print(dict.fromkeys(aba 0)),{a: 0 b: 0},None of the above,{a:0 b:0 a:0},{b:0},{a: 0},{a: 0 b: 0},{a: 0 b: 0} is correct based on how this feature behaves in Python. -448,What is the value of s=pythonista then print(s[0:3]),pythonista,None of the above,pyth,pyt,yt,pyt,pyt is correct based on how this feature behaves in Python. -449,What is the output of print(sum(i*i for i in range(4))),14,None of the above,Error,9,16,14,14 is correct based on how this feature behaves in Python. -450,Which statement about __slots__ is correct,__slots__ speeds up all attribute access always,__slots__ can reduce memory by preventing instance dict creation,__slots__ enables multiple inheritance without MRO,__slots__ is required for dataclasses,__slots__ makes a class immutable,__slots__ can reduce memory by preventing instance dict creation,Slots remove the per instance dict so instances can be smaller. -451,What is the output of print(-3//2),None of the above,0,-2,1,-1,-2,Floor division rounds toward negative infinity so result is -2. -452,What is the output of print({a:1}.get(b) is None),None of the above,TRUE,KeyError,FALSE,None,TRUE,True is correct based on how this feature behaves in Python. -453,What is the output of print(sum(i*i for i in range(5))),10,16,25,Error,30,30,Squares 0 1 4 9 16 add up to 30. -454,What does print(type(range(3)).__name__) output,range,None of the above,tuple,iterator,generator,range,range objects have type name range. -455,What is the result of s=abba; print(s.replace(b bb 1)),abba,abbaa,abbba,None of the above,a bb a,abbba,replace with count 1 replaces only the first match so one b becomes bb. -456,What is the value of s=pythonista then print(s[3:8]),honista,pythonis,honist,honis,onis,honis,honis is correct based on how this feature behaves in Python. -457,What is the value of s=pythonista then print(s[2:7]),thonis,honi,thonista,pythoni,thoni,thoni,thoni is correct based on how this feature behaves in Python. -458,What is the output of print(sum(i*i for i in range(6))),Error,25,55,36,15,55,55 is correct based on how this feature behaves in Python. -459,Which description of asyncio.gather is accurate,Cancels all tasks on the first exception always,Blocks the event loop until all tasks finish via time sleep,Runs multiple awaitables concurrently and aggregates their results,Guarantees order of completion equals input order,Starts new processes for each task,Runs multiple awaitables concurrently and aggregates their results,gather runs many coroutines at once and returns all results together. -460,What does the walrus operator do,It creates a context manager,It assigns and returns a value inside an expression,It defines a lambda,It performs integer division,It declares a type hint,It assigns and returns a value inside an expression,Walrus operator lets you assign a value as part of an expression. -461,What is the result of print(dict.fromkeys(aba 0)),{b:0},{a: 0 b: 0},None of the above,{a:0 b:0 c:0},{a:0 b:0 a:0},{a: 0 b: 0},{a: 0 b: 0} is correct based on how this feature behaves in Python. -462,What is the value of s=pythonista then print(s[3:5]),honista,hon,ho,o,None of the above,ho,ho is correct based on how this feature behaves in Python. -463,Which best describes the Global Interpreter Lock GIL,It blocks C extensions from running in parallel,It disables asyncio,It allows only one thread to execute Python bytecode at a time per process,It locks the entire operating system scheduler,It prevents subprocesses from spawning,It allows only one thread to execute Python bytecode at a time per process,The GIL lets only one thread run Python bytecode at once inside a process. -464,What is the value of s=pythonista then print(s[3:8]),honis,onis,honista,None of the above,honist,honis,honis is correct based on how this feature behaves in Python. -465,What is the value of s=pythonista then print(s[3:8]),onis,None of the above,honist,pythonis,honis,honis,honis is correct based on how this feature behaves in Python. -466,What is the value of s=pythonista then print(s[1:3]),None of the above,ythonista,t,yt,pyt,yt,yt is correct based on how this feature behaves in Python. -467,Which statement about __slots__ is correct,__slots__ is required for dataclasses,__slots__ speeds up all attribute access always,__slots__ can reduce memory by preventing instance dict creation,__slots__ enables multiple inheritance without MRO,__slots__ makes a class immutable,__slots__ can reduce memory by preventing instance dict creation,Slots remove the per instance dict so instances can be smaller. -468,What is the value of s=pythonista then print(s[1:6]),python,ython,ythonista,None of the above,ythoni,ython,ython is correct based on how this feature behaves in Python. -469,What is the value of s=pythonista then print(s[2:4]),None of the above,tho,th,h,pyth,th,th is correct based on how this feature behaves in Python. -470,What is the value of s=pythonista then print(s[1:4]),None of the above,yth,pyth,ythonista,ytho,yth,yth is correct based on how this feature behaves in Python. -471,What does print((x:=len([1 2 3])) == 3 and x) output,None of the above,len list,3,None,FALSE,3,3 is correct based on how this feature behaves in Python. -472,What is the value of s=pythonista then print(s[1:4]),ythonista,pyth,th,yth,ytho,yth,yth is correct based on how this feature behaves in Python. -473,What does print(all([])) return,None,Error,TRUE,0,None of the above,TRUE,all of an empty iterable is True by definition vacuously true. -474,What is the output of print(sum(i*i for i in range(7))),Error,21,91,49,36,91,91 is correct based on how this feature behaves in Python. -475,What is the output of print(sum(i*i for i in range(3))),4,None of the above,9,5,Error,5,5 is correct based on how this feature behaves in Python. -476,What is the output of print(tuple(map(lambda x:x+1 (1 2)))),[2 3],(1 2 3),(2 3 4),(1 3),(2 3),(2 3),(2 3) is correct based on how this feature behaves in Python. -477,What does print((x:=len([1 2 3])) == 3 and x) output,None,3,None of the above,FALSE,len list,3,3 is correct based on how this feature behaves in Python. -478,What is the output of print(sum(i*i for i in range(6))),25,Error,None of the above,55,36,55,55 is correct based on how this feature behaves in Python. -479,What is the output of print(sum(i*i for i in range(4))),14,9,Error,16,None of the above,14,14 is correct based on how this feature behaves in Python. -480,Which statement about mutable default arguments is correct,A list used as a default parameter is shared across calls which can cause surprising bugs,The interpreter forbids using lists as defaults,Defaults are re evaluated on each call so this is safe,Only dict defaults are shared lists are not,This happens only in Python 2 not Python 3,A list used as a default parameter is shared across calls which can cause surprising bugs,Default values are evaluated once at function definition so a list is shared across calls. -481,What is the output of print(sum(i*i for i in range(7))),91,21,36,Error,None of the above,91,91 is correct based on how this feature behaves in Python. -482,What is the value of s=pythonista then print(s[0:4]),pythonista,None of the above,pytho,pyth,yth,pyth,pyth is correct based on how this feature behaves in Python. -483,What is the output of print({a:1}.get(b) is None),None,0,TRUE,KeyError,None of the above,TRUE,True is correct based on how this feature behaves in Python. -484,Which statement about descriptors is correct,Descriptors can only be used with metaclasses,Descriptors work only on built in types,Descriptors require slots to be enabled,Descriptors are only available in C extensions,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Implementing __get__ __set__ or __delete__ lets an object control attribute access. -485,Which statement about descriptors is correct,Descriptors are only available in C extensions,Descriptors can only be used with metaclasses,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,None of the above,Descriptors work only on built in types,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Implementing __get__ __set__ or __delete__ lets an object control attribute access. -486,Which statement about descriptors is correct,Descriptors can only be used with metaclasses,Descriptors work only on built in types,Descriptors are only available in C extensions,Descriptors require slots to be enabled,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,A descriptor is an object that defines __get__ __set__ or __delete__ and controls attribute access,Implementing __get__ __set__ or __delete__ lets an object control attribute access. -487,What is the value of s=pythonista then print(s[2:5]),thon,thonista,tho,None of the above,pytho,tho,tho is correct based on how this feature behaves in Python. -488,What does print((0 and 5) or 7) produce,FALSE,0,None of the above,5,7,7,0 is falsy so or returns the right value 7. -489,What is the output of print(sum(i*i for i in range(7))),91,Error,49,21,None of the above,91,91 is correct based on how this feature behaves in Python. -490,What is the output of print(sum(i*i for i in range(5))),30,None of the above,16,Error,25,30,Squares 0 1 4 9 16 add up to 30. -491,Which method makes an object usable in a with statement,None of the above,__init__ and __del__,__enter__ and __exit__,__aenter__ and __aexit__ only,__get__ and __set__,__enter__ and __exit__,with calls __enter__ on enter and __exit__ on exit to handle setup and cleanup. -492,What is the output of print(sum(i*i for i in range(7))),36,91,Error,None of the above,49,91,91 is correct based on how this feature behaves in Python. -493,What is the value of s=pythonista then print(s[3:7]),honis,pythoni,honi,None of the above,oni,honi,honi is correct based on how this feature behaves in Python. -494,What is the output of print(sum(i*i for i in range(4))),None of the above,Error,14,9,16,14,14 is correct based on how this feature behaves in Python. -495,What is the output of print(sum(i*i for i in range(5))),10,16,25,30,None of the above,30,Squares 0 1 4 9 16 add up to 30. -496,What is a closure in Python,A lambda with no parameters,A class method bound to an instance,A function that closes files automatically,A function that captures variables from an enclosing scope even after that scope has finished,A function defined inside __init__ only,A function that captures variables from an enclosing scope even after that scope has finished,Closures remember variables from surrounding scope so they keep working after the scope ends. -497,What is the value of s=pythonista then print(s[0:2]),None of the above,y,pythonista,pyt,py,py,py is correct based on how this feature behaves in Python. -498,What is the value of s=pythonista then print(s[0:4]),yth,pyth,pythonista,pytho,None of the above,pyth,pyth is correct based on how this feature behaves in Python. -499,What is the value of s=pythonista then print(s[1:6]),ython,python,thon,ythoni,ythonista,ython,ython is correct based on how this feature behaves in Python. -500,What does the walrus operator do,It creates a context manager,It performs integer division,It assigns and returns a value inside an expression,It declares a type hint,It defines a lambda,It assigns and returns a value inside an expression,Walrus operator lets you assign a value as part of an expression. diff --git a/quizproject/data/medium.csv b/quizproject/data/medium.csv deleted file mode 100644 index 1d0e530..0000000 --- a/quizproject/data/medium.csv +++ /dev/null @@ -1,501 +0,0 @@ -Question ID,Question,Option A,Option B,Option C,Option D,Answer,Explanation -1,What is 'python'[1:4]?,tho,yth,ytho,pyt,yth,Slicing from index 1 up to 4 takes the middle chunk yth. -2,What is the output of print(0 * -1)?,1,-1,0,Error,0,"Multiplication of 0 and -1 gives 0, so 0 is right." -3,"What is {1,2} | {2,3}?","{2,3}","{1,2}","{1, 2, 3}",{2},"{1, 2, 3}",Set union combines unique elements from both sets. -4,What is the output of print(-4 * -7)?,29,3,28,Error,28,"Multiplication of -4 and -7 gives 28, so 28 is right." -5,What is 'mississippi'.count('ss')?,2,4,0,1,2,2 is correct because it matches how this feature behaves in Python. -6,What is the output of print(3 * 6)?,Error,18,9,-3,18,"Multiplication of 3 and 6 gives 18, so 18 is right." -7,What is the output of print(-7 * 7)?,-49,-14,-50,-48,-49,"Multiplication of -7 and 7 gives -49, so -49 is right." -8,What is the output of print(-3 * 7)?,Error,-21,-10,4,-21,"Multiplication of -3 and 7 gives -21, so -21 is right." -9,"What is sorted([3,1,2])?","[1,3,2]","[1, 2, 3]",[],"[3,2,1]","[1, 2, 3]","sorted creates and returns a new sorted list, leaving the original alone." -10,What is the output of print(-5 * -5)?,26,24,-10,25,25,"Multiplication of -5 and -5 gives 25, so 25 is right." -11,What is the output of print(2 * 0)?,-1,2,0,Error,0,"Multiplication of 2 and 0 gives 0, so 0 is right." -12,What is the output of print(3 * -9)?,-28,Error,-27,-26,-27,"Multiplication of 3 and -9 gives -27, so -27 is right." -13,What is the output of print(type([]).__name__)?,object,list,dict,tuple,list,"Lists use square brackets and are mutable ordered collections, so their type is list." -14,What is the output of print(2 * 9)?,18,17,11,19,18,"Multiplication of 2 and 9 gives 18, so 18 is right." -15,What is the output of print(-6 * -8)?,48,2,47,49,48,"Multiplication of -6 and -8 gives 48, so 48 is right." -16,What does {x for x in 'aab'} produce length of?,3,0,1,2,2,"A set comprehension keeps unique letters only, so only a and b remain, making the length 2." -17,What is the output of print(-5 * 4)?,-20,-1,Error,-21,-20,"Multiplication of -5 and 4 gives -20, so -20 is right." -18,What is the output of print(2 * 5)?,Error,7,-3,10,10,"Multiplication of 2 and 5 gives 10, so 10 is right." -19,What is the output of print(9 * -8)?,17,1,-72,-73,-72,"Multiplication of 9 and -8 gives -72, so -72 is right." -20,What is the output of print(9 * -4)?,Error,13,-37,-36,-36,"Multiplication of 9 and -4 gives -36, so -36 is right." -21,What is 'python'[1:4]?,ytho,tho,yth,pyt,yth,Slicing from index 1 up to 4 takes the middle chunk yth. -22,What is the output of print(-4 * 1)?,-4,-5,-3,Error,-4,"Multiplication of -4 and 1 gives -4, so -4 is right." -23,What is the output of print(8 * -3)?,-24,11,-23,-25,-24,"Multiplication of 8 and -3 gives -24, so -24 is right." -24,What is the output of print(2 * -7)?,9,-5,-15,-14,-14,"Multiplication of 2 and -7 gives -14, so -14 is right." -25,Which built-in type is immutable?,list,tuple,dict,set,tuple,"Tuples are immutable, so once created their contents cannot be changed." -26,What is the output of print(-7 * 3)?,Error,-4,-10,-21,-21,"Multiplication of -7 and 3 gives -21, so -21 is right." -27,What is the output of print(7 * -2)?,-14,9,Error,-15,-14,"Multiplication of 7 and -2 gives -14, so -14 is right." -28,What is the output of print(2 * -4)?,-8,Error,6,-2,-8,"Multiplication of 2 and -4 gives -8, so -8 is right." -29,What is [i for i in range(3)][-1]?,FALSE,1,2,0,2,2 is correct because it matches how this feature behaves in Python. -30,What is the output of print(-7 * -4)?,-3,28,Error,27,28,"Multiplication of -7 and -4 gives 28, so 28 is right." -31,What is the output of print(-8 * 6)?,-49,-2,Error,-48,-48,"Multiplication of -8 and 6 gives -48, so -48 is right." -32,What is the output of print(-6 * -2)?,Error,-4,13,12,12,"Multiplication of -6 and -2 gives 12, so 12 is right." -33,What is ''.strip()?,'' '',None,,' ',,nan is correct because it matches how this feature behaves in Python. -34,What is the output of print(-8 * -7)?,-1,56,-15,Error,56,"Multiplication of -8 and -7 gives 56, so 56 is right." -35,What is the output of print(5 * -3)?,Error,-15,-16,2,-15,"Multiplication of 5 and -3 gives -15, so -15 is right." -36,What is the output of print(-1 * 8)?,Error,-7,7,-8,-8,"Multiplication of -1 and 8 gives -8, so -8 is right." -37,What is the output of print(-1 * -1)?,Error,2,1,-2,1,"Multiplication of -1 and -1 gives 1, so 1 is right." -38,What is the output of print(-9 * -2)?,18,-11,19,-7,18,"Multiplication of -9 and -2 gives 18, so 18 is right." -39,What does bool('') return?,0,None,TRUE,FALSE,FALSE,"Empty strings are falsy in Python, so bool of an empty string is False." -40,What is the output of print(-8 * 4)?,-33,-12,-32,-4,-32,"Multiplication of -8 and 4 gives -32, so -32 is right." -41,What is the output of print(0 * 8)?,0,8,-1,1,0,"Multiplication of 0 and 8 gives 0, so 0 is right." -42,What is tuple('ab')?,('ab'),FALSE,"['a','b']","('a', 'b')","('a', 'b')","('a', 'b') is correct because it matches how this feature behaves in Python." -43,What is the output of print(6 * 0)?,Error,6,0,1,0,"Multiplication of 6 and 0 gives 0, so 0 is right." -44,What is the output of print(-4 * 8)?,Error,-12,4,-32,-32,"Multiplication of -4 and 8 gives -32, so -32 is right." -45,What is the output of print(-5 * 5)?,0,-26,-25,-24,-25,"Multiplication of -5 and 5 gives -25, so -25 is right." -46,What is the output of print(-8 * 7)?,-56,Error,-1,-15,-56,"Multiplication of -8 and 7 gives -56, so -56 is right." -47,Which statement ensures cleanup for context managers?,defer,with,context,using,with,"with ensures files are closed even if errors happen, which is why it is used for cleanup." -48,What is the output of print(-9 * -5)?,44,Error,46,45,45,"Multiplication of -9 and -5 gives 45, so 45 is right." -49,What is the output of print(1 * 0)?,-1,0,1,Error,0,"Multiplication of 1 and 0 gives 0, so 0 is right." -50,Which function converts an ASCII code point to character?,ascii,ord,repr,chr,chr,chr turns a code point into the corresponding character; ord does the reverse. -51,What is the output of print(8 * -4)?,-32,-31,12,Error,-32,"Multiplication of 8 and -4 gives -32, so -32 is right." -52,What is 'python'.find('z')?,FALSE,Error,None,-1,-1,-1 is correct because it matches how this feature behaves in Python. -53,Which module provides a LRU cache decorator?,toolz,operator,itertools,functools,functools,functools has handy function utilities like lru_cache for memoization. -54,What is the output of print(-9 * -6)?,-3,53,54,Error,54,"Multiplication of -9 and -6 gives 54, so 54 is right." -55,What is 'python'.find('z')?,None,-1,FALSE,0,-1,-1 is correct because it matches how this feature behaves in Python. -56,What is the output of print(8 * 4)?,4,32,Error,12,32,"Multiplication of 8 and 4 gives 32, so 32 is right." -57,What does bool('') return?,None,TRUE,0,FALSE,FALSE,"Empty strings are falsy in Python, so bool of an empty string is False." -58,Which function returns the absolute value?,FALSE,abs,mag,len,abs,"abs returns the magnitude of a number, dropping any sign." -59,Which built-in converts bytes to str?,str.encode,bytes.decode,format,ord,bytes.decode,bytes.decode is correct because it matches how this feature behaves in Python. -60,What is [i for i in range(3)][-1]?,1,2,3,0,2,2 is correct because it matches how this feature behaves in Python. -61,What is the output of print(6 * -8)?,Error,14,-48,-2,-48,"Multiplication of 6 and -8 gives -48, so -48 is right." -62,What is the output of print(6 * -6)?,-35,-36,-37,12,-36,"Multiplication of 6 and -6 gives -36, so -36 is right." -63,What is the output of print(-9 * 2)?,-18,Error,-17,-7,-18,"Multiplication of -9 and 2 gives -18, so -18 is right." -64,What is the output of print(7 * -5)?,-36,-34,Error,-35,-35,"Multiplication of 7 and -5 gives -35, so -35 is right." -65,What is the output of print(0 * 4)?,4,-4,0,-1,0,"Multiplication of 0 and 4 gives 0, so 0 is right." -66,What is bool([0])?,0,FALSE,TRUE,Error,TRUE,"Non-empty lists are truthy, even if they contain zero; so this is True." -67,What is the output of print(-6 * -8)?,48,47,Error,49,48,"Multiplication of -6 and -8 gives 48, so 48 is right." -68,What is tuple('ab')?,('a';'b'),"('a', 'b')","('a','b','')",('ab'),"('a', 'b')","('a', 'b') is correct because it matches how this feature behaves in Python." -69,What is the correct file extension for Python source files?,.pt,.python,.py,.pyc,.py,.py is correct because it matches how this feature behaves in Python. -70,What is the output of print(1 * 8)?,-7,9,7,8,8,"Multiplication of 1 and 8 gives 8, so 8 is right." -71,What is bool([0])?,FALSE,Error,TRUE,0,TRUE,"Non-empty lists are truthy, even if they contain zero; so this is True." -72,What is the output of print(6 * -5)?,11,-30,-29,Error,-30,"Multiplication of 6 and -5 gives -30, so -30 is right." -73,"What is {'a':1,'b':2} == {'b':2,'a':1}?",0,FALSE,TypeError,TRUE,TRUE,"Dictionaries compare by key and value pairs, not by insertion order, so these are equal." -74,What is the output of print(7 * -4)?,11,-29,-27,-28,-28,"Multiplication of 7 and -4 gives -28, so -28 is right." -75,What is the output of print(-4 * 6)?,-23,-10,-24,2,-24,"Multiplication of -4 and 6 gives -24, so -24 is right." -76,What is the output of print(5 * -4)?,1,-19,-21,-20,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." -77,What is the output of print(1 * -2)?,-2,-3,-1,Error,-2,"Multiplication of 1 and -2 gives -2, so -2 is right." -78,What is the output of print(6 * 2)?,4,Error,13,12,12,"Multiplication of 6 and 2 gives 12, so 12 is right." -79,What is the correct file extension for Python source files?,.pt,.py,.pyc,.pyt,.py,.py is correct because it matches how this feature behaves in Python. -80,What is the output of print(-7 * 4)?,-27,-28,-29,-11,-28,"Multiplication of -7 and 4 gives -28, so -28 is right." -81,Which keyword is used to import a module?,use,import,module,require,import,import is correct because it matches how this feature behaves in Python. -82,"What is list(filter(None,[0,1,2]))?",[2],[],"[1, 2]","[0,1,2]","[1, 2]","[1, 2] is correct because it matches how this feature behaves in Python." -83,What is the output of print(1 * 3)?,3,-2,Error,4,3,"Multiplication of 1 and 3 gives 3, so 3 is right." -84,What is the output of print(4 * 7)?,29,-3,28,Error,28,"Multiplication of 4 and 7 gives 28, so 28 is right." -85,"What is {1,2,3} - {2}?","{1,2,3}","{2,3}","{1, 3}",{2},"{1, 3}",Set difference removes elements from the left set that appear on the right. -86,What is the output of print(-7 * -8)?,1,56,55,57,56,"Multiplication of -7 and -8 gives 56, so 56 is right." -87,What is the output of print(type([]).__name__)?,set,list,object,dict,list,"Lists use square brackets and are mutable ordered collections, so their type is list." -88,Which keyword is used to import a module?,include,require,import,module,import,import is correct because it matches how this feature behaves in Python. -89,What is the output of print(-3 * -7)?,Error,4,22,21,21,"Multiplication of -3 and -7 gives 21, so 21 is right." -90,What is the output of print(9 * 4)?,37,36,35,13,36,"Multiplication of 9 and 4 gives 36, so 36 is right." -91,Which module implements heaps?,queue,heapq,bisect,array,heapq,"heapq implements a min-heap, letting you efficiently get the smallest item." -92,What does len('hello') return?,1,0,6,5,5,"len counts elements in the sequence, so the result matches the number of items shown." -93,What is the output of print(6 * -9)?,-53,-55,-54,Error,-54,"Multiplication of 6 and -9 gives -54, so -54 is right." -94,What is type({}.keys()).__name__?,dict_items,dict_keys,list,view,dict_keys,"Dictionary view objects like dict_keys are special views, not plain lists." -95,What is the output of print(8 * 7)?,1,Error,56,57,56,"Multiplication of 8 and 7 gives 56, so 56 is right." -96,Which built-in checks if all elements are truthy?,len,bool,any,all,all,all is correct because it matches how this feature behaves in Python. -97,What is the output of print(-2 * -5)?,3,-7,9,10,10,"Multiplication of -2 and -5 gives 10, so 10 is right." -98,What is the output of print(4 * 8)?,32,12,33,-4,32,"Multiplication of 4 and 8 gives 32, so 32 is right." -99,What is the output of print('A' < 'a') in ASCII?,TRUE,FALSE,None,Error,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." -100,What is the output of print(-5 * -3)?,16,-8,-2,15,15,"Multiplication of -5 and -3 gives 15, so 15 is right." -101,"What does round(2.675,2) equal in CPython?",2.7,2.68,2.67,FALSE,2.67,"Binary floating point rounds 2.675 to 2.67 in CPython due to representation, so 2.67 is expected." -102,What is the output of print(5 * -4)?,-19,-20,Error,1,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." -103,What is the output of print(8 * 7)?,57,56,15,Error,56,"Multiplication of 8 and 7 gives 56, so 56 is right." -104,What is the output of print(-2 * -9)?,17,18,19,-11,18,"Multiplication of -2 and -9 gives 18, so 18 is right." -105,What is the result of 2**3?,6,23,16,8,8,The exponent operator ** raises 2 to the power 3 which is 8. -106,What is the output of print(-3 * 2)?,-1,-6,Error,-5,-6,"Multiplication of -3 and 2 gives -6, so -6 is right." -107,What is the output of print(-8 * -9)?,Error,72,73,-17,72,"Multiplication of -8 and -9 gives 72, so 72 is right." -108,Which built-in returns a sequence length?,count,length,len,(),len,len is correct because it matches how this feature behaves in Python. -109,What is the output of print(-7 * 8)?,1,-57,-15,-56,-56,"Multiplication of -7 and 8 gives -56, so -56 is right." -110,Which method removes and returns the last list element?,pop,discard,delete,chop,pop,pop is correct because it matches how this feature behaves in Python. -111,What is the output of print(7 * -3)?,-20,10,-22,-21,-21,"Multiplication of 7 and -3 gives -21, so -21 is right." -112,What is the output of print(7 * -7)?,-50,-48,-49,Error,-49,"Multiplication of 7 and -7 gives -49, so -49 is right." -113,What is the output of print(2 * -5)?,-9,-11,Error,-10,-10,"Multiplication of 2 and -5 gives -10, so -10 is right." -114,What is the output of print(-9 * -4)?,37,Error,36,-13,36,"Multiplication of -9 and -4 gives 36, so 36 is right." -115,What is the output of print(7 * 6)?,41,1,42,Error,42,"Multiplication of 7 and 6 gives 42, so 42 is right." -116,"What is 'a,b,c'.split(',')?","['a', 'b', 'c']","['a','b,c']",['a';'b';'c'],"('a','b','c')","['a', 'b', 'c']","split with a comma cuts the string at commas, returning the pieces in a list." -117,What is the output of print(7 * 3)?,10,21,Error,20,21,"Multiplication of 7 and 3 gives 21, so 21 is right." -118,What is the output of print(7 * 7)?,49,0,48,Error,49,"Multiplication of 7 and 7 gives 49, so 49 is right." -119,What is the output of print(8 * -9)?,-73,-72,Error,-1,-72,"Multiplication of 8 and -9 gives -72, so -72 is right." -120,Which built-in checks if all elements are truthy?,all,bool,len,any,all,all is correct because it matches how this feature behaves in Python. -121,Which keyword is used to define a coroutine function?,async def,def coroutine,await def,co def,async def,async def defines a coroutine function that can be awaited. -122,What is the output of print(-1 * -2)?,-3,Error,1,2,2,"Multiplication of -1 and -2 gives 2, so 2 is right." -123,Which keyword is used to import a module?,require,use,module,import,import,import is correct because it matches how this feature behaves in Python. -124,What is the output of print(1 * -5)?,-6,-5,-4,6,-5,"Multiplication of 1 and -5 gives -5, so -5 is right." -125,What is the output of print(7 * -5)?,2,Error,-35,12,-35,"Multiplication of 7 and -5 gives -35, so -35 is right." -126,What is the output of print(-3 * -2)?,5,Error,6,7,6,"Multiplication of -3 and -2 gives 6, so 6 is right." -127,What is the output of print(6 * -7)?,-41,-1,13,-42,-42,"Multiplication of 6 and -7 gives -42, so -42 is right." -128,"What is 'abc'.replace('b','x')?",abc,axc,xbc,abx,axc,"String methods return new strings without changing the original, and this method does exactly what its name says." -129,Which function returns the absolute value?,mag,abs,norm,fabs,abs,"abs returns the magnitude of a number, dropping any sign." -130,What is the output of print(2 * 1)?,3,2,Error,1,2,"Multiplication of 2 and 1 gives 2, so 2 is right." -131,"What is sorted([3,1,2])?","[3,2,1]","{1,2,3}","[1, 2, 3]","(1,2,3)","[1, 2, 3]","sorted creates and returns a new sorted list, leaving the original alone." -132,What is the output of print(9 * 1)?,8,9,Error,10,9,"Multiplication of 9 and 1 gives 9, so 9 is right." -133,What is the output of print(3 * 1)?,4,2,3,Error,3,"Multiplication of 3 and 1 gives 3, so 3 is right." -134,What is the output of print(-4 * -4)?,16,17,Error,15,16,"Multiplication of -4 and -4 gives 16, so 16 is right." -135,Which keyword is used to create an anonymous function?,inline,func,lambda,def,lambda,lambda is correct because it matches how this feature behaves in Python. -136,What is the output of print(8 * 9)?,-1,71,72,73,72,"Multiplication of 8 and 9 gives 72, so 72 is right." -137,What is the output of print(5 * 1)?,4,Error,5,6,5,"Multiplication of 5 and 1 gives 5, so 5 is right." -138,What is the output of print(0 * -7)?,0,-7,-1,Error,0,"Multiplication of 0 and -7 gives 0, so 0 is right." -139,What is the output of print(-7 * 6)?,-42,-43,-13,-1,-42,"Multiplication of -7 and 6 gives -42, so -42 is right." -140,What is the output of print(1 * -3)?,Error,4,-3,-4,-3,"Multiplication of 1 and -3 gives -3, so -3 is right." -141,Which built-in converts a string to an integer?,ord,int,float,str,int,int is correct because it matches how this feature behaves in Python. -142,What is the output of print(9 * -3)?,Error,12,6,-27,-27,"Multiplication of 9 and -3 gives -27, so -27 is right." -143,Which keyword is used to import a module?,require,use,None,import,import,import is correct because it matches how this feature behaves in Python. -144,What is the output of print(-1 * 1)?,Error,0,-1,-2,-1,"Multiplication of -1 and 1 gives -1, so -1 is right." -145,What is the output of print(-2 * -5)?,10,-7,3,9,10,"Multiplication of -2 and -5 gives 10, so 10 is right." -146,What is the output of print(-8 * -4)?,Error,31,32,-4,32,"Multiplication of -8 and -4 gives 32, so 32 is right." -147,What is the output of print(8 * 2)?,Error,15,6,16,16,"Multiplication of 8 and 2 gives 16, so 16 is right." -148,Which built-in checks if all elements are truthy?,sum,len,all,any,all,all is correct because it matches how this feature behaves in Python. -149,What is the output of print(7 * -6)?,-43,-42,1,13,-42,"Multiplication of 7 and -6 gives -42, so -42 is right." -150,Which decorator creates read-only attributes in dataclasses?,@readonly,@dataclass(frozen=True),@final,@frozen,@dataclass(frozen=True),@dataclass(frozen=True) is correct because it matches how this feature behaves in Python. -151,What is the output of print(8 * 9)?,73,Error,71,72,72,"Multiplication of 8 and 9 gives 72, so 72 is right." -152,What is 'python'[1:4]?,tho,pyt,yon,yth,yth,Slicing from index 1 up to 4 takes the middle chunk yth. -153,Which module offers precise decimal arithmetic?,math,fractions,numbers,decimal,decimal,"decimal handles base-10 decimals precisely, avoiding common binary float surprises." -154,"What is list(map(lambda x:x+1,[1,2]))?","[1,2]","(2,3)","[3,4]","[2, 3]","[2, 3]","[2, 3] is correct because it matches how this feature behaves in Python." -155,What is sum(range(4))?,6,3,10,7,6,6 is correct because it matches how this feature behaves in Python. -156,What is the output of print(8 * 8)?,64,63,16,Error,64,"Multiplication of 8 and 8 gives 64, so 64 is right." -157,What is the output of print(7 * -2)?,-13,5,-14,-15,-14,"Multiplication of 7 and -2 gives -14, so -14 is right." -158,What is {'a':1}.keys().__class__.__name__?,set,dict_keys,list,view,dict_keys,dict_keys is correct because it matches how this feature behaves in Python. -159,What is bool([0])?,TRUE,None,FALSE,Error,TRUE,"Non-empty lists are truthy, even if they contain zero; so this is True." -160,What is 5//2?,2,3,2.5,2,2,"The // operator is floor division, which drops the fractional part toward negative infinity." -161,Which operator tests object identity?,==,is,in,id,is,"is checks whether two names reference the same object, not just equal values." -162,What is the output of print(-4 * -6)?,24,Error,25,2,24,"Multiplication of -4 and -6 gives 24, so 24 is right." -163,What is the output of print(-7 * -6)?,42,Error,-13,-1,42,"Multiplication of -7 and -6 gives 42, so 42 is right." -164,Which decorator creates read-only attributes in dataclasses?,@sealed,@dataclass(frozen=True),@final,@readonly,@dataclass(frozen=True),@dataclass(frozen=True) is correct because it matches how this feature behaves in Python. -165,What is tuple('ab')?,('ab'),('a';'b'),"('a', 'b')","['a','b']","('a', 'b')","('a', 'b') is correct because it matches how this feature behaves in Python." -166,What is the output of print(1 * 6)?,-5,6,7,5,6,"Multiplication of 1 and 6 gives 6, so 6 is right." -167,What is the output of print(1 * -1)?,2,-1,0,Error,-1,"Multiplication of 1 and -1 gives -1, so -1 is right." -168,What is the output of print(5 * -4)?,-20,Error,9,1,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." -169,What is the output of print(4 * 7)?,11,28,27,Error,28,"Multiplication of 4 and 7 gives 28, so 28 is right." -170,What is the output of print(8 * -5)?,3,-40,-41,-39,-40,"Multiplication of 8 and -5 gives -40, so -40 is right." -171,What is the output of print(2 * -2)?,0,-4,4,Error,-4,"Multiplication of 2 and -2 gives -4, so -4 is right." -172,What is 'mississippi'.count('ss')?,TRUE,0,3,2,2,2 is correct because it matches how this feature behaves in Python. -173,What is the output of print(0 * 3)?,-3,3,0,1,0,"Multiplication of 0 and 3 gives 0, so 0 is right." -174,Which module is recommended for cryptographic randomness?,hashlib,random,secrets,uuid,secrets,secrets provides strong random values designed for security sensitive tasks. -175,What is the output of print(-2 * 3)?,-7,Error,-6,-5,-6,"Multiplication of -2 and 3 gives -6, so -6 is right." -176,What is the output of print(-3 * -8)?,-11,5,24,23,24,"Multiplication of -3 and -8 gives 24, so 24 is right." -177,What is the output of print(-8 * 4)?,-32,-4,-12,-31,-32,"Multiplication of -8 and 4 gives -32, so -32 is right." -178,"What is isinstance(True,int)?",None,TRUE,FALSE,TypeError,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." -179,What does PEP stand for?,Python Enhancement Proposal,Proposal for Enhanced Python,Python Engineering Plan,Programming Enhancement Proposal,Python Enhancement Proposal,"PEP means Python Enhancement Proposal, which documents ideas and changes to the language." -180,What is the output of print(9 * 5)?,Error,44,14,45,45,"Multiplication of 9 and 5 gives 45, so 45 is right." -181,What is type(range(3)).__name__?,iterator,list,range,TRUE,range,range objects have their own type in Python and generate sequences lazily. -182,What is the output of print(2 * -6)?,8,-11,Error,-12,-12,"Multiplication of 2 and -6 gives -12, so -12 is right." -183,What does [0]*3 produce?,"[0, 0, 0]","(0,0,0)","[0,3]","[0,0,0,0]","[0, 0, 0]","Multiplying a list by 3 repeats its elements three times, giving three zeros." -184,What is 'python'[::-1]?,py,pnohty,nohtyp,python,nohtyp,"Slicing with step -1 reverses the sequence, so you get the string backwards." -185,Which exception is raised for an out-of-range list index?,ValueError,LookupError,TypeError,IndexError,IndexError,Accessing a list with an invalid index raises IndexError. -186,What is the output of print(-4 * 0)?,-4,-1,Error,0,0,"Multiplication of -4 and 0 gives 0, so 0 is right." -187,"What is {1,2,3} - {2}?",{2},"{1,2}","{1, 3}","{2,3}","{1, 3}",Set difference removes elements from the left set that appear on the right. -188,Which keyword is used to define a coroutine function?,async def,def coroutine,def async,await def,async def,async def defines a coroutine function that can be awaited. -189,What is the output of print(-8 * 5)?,-3,-13,-39,-40,-40,"Multiplication of -8 and 5 gives -40, so -40 is right." -190,Which method adds a single element to a list?,append,push,extend,add,append,append is correct because it matches how this feature behaves in Python. -191,What is the output of print(2 * -7)?,-13,-14,Error,9,-14,"Multiplication of 2 and -7 gives -14, so -14 is right." -192,What is the output of print(3 * -6)?,-18,-19,-3,Error,-18,"Multiplication of 3 and -6 gives -18, so -18 is right." -193,What is the output of print(-2 * 4)?,-6,-8,Error,2,-8,"Multiplication of -2 and 4 gives -8, so -8 is right." -194,What is the output of print(0 * -1)?,-1,Error,0,1,0,"Multiplication of 0 and -1 gives 0, so 0 is right." -195,What is the output of print(-7 * 5)?,Error,-2,-35,-34,-35,"Multiplication of -7 and 5 gives -35, so -35 is right." -196,What is the output of print(-5 * -6)?,Error,1,30,31,30,"Multiplication of -5 and -6 gives 30, so 30 is right." -197,What is the output of print(7 * -5)?,-35,Error,2,12,-35,"Multiplication of 7 and -5 gives -35, so -35 is right." -198,What is the output of print(-1 * 2)?,1,-1,-3,-2,-2,"Multiplication of -1 and 2 gives -2, so -2 is right." -199,What is the output of print(-1 * 6)?,5,-6,-7,-5,-6,"Multiplication of -1 and 6 gives -6, so -6 is right." -200,What is the output of print(1 * -9)?,Error,-9,-8,-10,-9,"Multiplication of 1 and -9 gives -9, so -9 is right." -201,Which keyword annotates variables with types?,as,:,type,{},:,: is correct because it matches how this feature behaves in Python. -202,What is sum(i*i for i in range(4))?,13,16,12,14,14,14 is correct because it matches how this feature behaves in Python. -203,What is the output of print(-8 * 2)?,-6,-16,-15,-17,-16,"Multiplication of -8 and 2 gives -16, so -16 is right." -204,What is the output of print(-8 * 7)?,Error,-1,-56,-55,-56,"Multiplication of -8 and 7 gives -56, so -56 is right." -205,Which module helps parse command-line arguments?,argparse,shlex,getopt,click,argparse,argparse parses command-line arguments and automatically builds help messages. -206,What is the output of print(-2 * 3)?,-5,1,-6,Error,-6,"Multiplication of -2 and 3 gives -6, so -6 is right." -207,What is the output of print(6 * -1)?,-6,7,Error,-7,-6,"Multiplication of 6 and -1 gives -6, so -6 is right." -208,What is the output of print(8 * 2)?,16,15,17,6,16,"Multiplication of 8 and 2 gives 16, so 16 is right." -209,What is the output of print(-6 * -4)?,-10,Error,24,-2,24,"Multiplication of -6 and -4 gives 24, so 24 is right." -210,What is the output of print(6 * -7)?,-41,-42,-1,13,-42,"Multiplication of 6 and -7 gives -42, so -42 is right." -211,What is the output of print(8 * 6)?,49,14,48,47,48,"Multiplication of 8 and 6 gives 48, so 48 is right." -212,What is the output of print(-5 * -5)?,25,26,-10,0,25,"Multiplication of -5 and -5 gives 25, so 25 is right." -213,"What is list(zip([1,2,3],[4,5])) length?",0,5,2,3,2,"zip stops at the shortest input, so the length matches the smaller list." -214,What does bool('') return?,FALSE,(),TRUE,None,FALSE,"Empty strings are falsy in Python, so bool of an empty string is False." -215,What is the output of print(-4 * 7)?,-29,3,-28,-27,-28,"Multiplication of -4 and 7 gives -28, so -28 is right." -216,What is the output of print(2 * 3)?,Error,6,7,5,6,"Multiplication of 2 and 3 gives 6, so 6 is right." -217,Which operator performs floor division?,^^,/,//,**,//,// is correct because it matches how this feature behaves in Python. -218,Which keyword declares a class method?,@overload,@classmethod,@abstractmethod,@staticmethod,@classmethod,@classmethod is correct because it matches how this feature behaves in Python. -219,What is the output of print(1 * -9)?,-8,Error,-10,-9,-9,"Multiplication of 1 and -9 gives -9, so -9 is right." -220,What is the output of print(5 * 4)?,21,Error,20,19,20,"Multiplication of 5 and 4 gives 20, so 20 is right." -221,What is the output of print(-1 * -7)?,Error,-8,7,6,7,"Multiplication of -1 and -7 gives 7, so 7 is right." -222,What is the output of print(-1 * -5)?,-6,Error,5,6,5,"Multiplication of -1 and -5 gives 5, so 5 is right." -223,What is the output of print(-7 * 2)?,-14,-13,-15,-9,-14,"Multiplication of -7 and 2 gives -14, so -14 is right." -224,What is the output of print(-5 * -7)?,34,35,2,-12,35,"Multiplication of -5 and -7 gives 35, so 35 is right." -225,"What is {1,2} | {2,3}?","{1,2}","{2,3}","{1, 2, 3}",{2},"{1, 2, 3}",Set union combines unique elements from both sets. -226,Which collection does not allow duplicate elements?,set,deque,tuple,dict,set,"Sets keep unique elements only, so duplicates collapse to one." -227,What is the output of print(-6 * 8)?,-14,-48,-47,2,-48,"Multiplication of -6 and 8 gives -48, so -48 is right." -228,Which exception is raised for an out-of-range list index?,IndexError,TypeError,LookupError,KeyError,IndexError,Accessing a list with an invalid index raises IndexError. -229,What is the output of print(1 * -7)?,8,-7,-8,-6,-7,"Multiplication of 1 and -7 gives -7, so -7 is right." -230,What is the output of print(7 * 0)?,1,Error,7,0,0,"Multiplication of 7 and 0 gives 0, so 0 is right." -231,"What is {1,2,3} - {2}?","{1,2,3}","{1,2}",{2},"{1, 3}","{1, 3}",Set difference removes elements from the left set that appear on the right. -232,Which statement ensures cleanup for context managers?,0,with,using,context,with,"with ensures files are closed even if errors happen, which is why it is used for cleanup." -233,What is the output of print(-8 * -5)?,39,40,-13,Error,40,"Multiplication of -8 and -5 gives 40, so 40 is right." -234,What is the output of print(5 * -7)?,-2,-34,-35,12,-35,"Multiplication of 5 and -7 gives -35, so -35 is right." -235,"What is 'abc'.replace('b','x')?",axc,abc,xbc,ac,axc,"String methods return new strings without changing the original, and this method does exactly what its name says." -236,"What is sorted([3,1,2])?","[1, 2, 3]","[3,2,1]",Error,"[1,3,2]","[1, 2, 3]","sorted creates and returns a new sorted list, leaving the original alone." -237,What is the output of print(-6 * 5)?,-11,-30,-1,-31,-30,"Multiplication of -6 and 5 gives -30, so -30 is right." -238,What is ''.strip()?,'' '',' ',,None,,nan is correct because it matches how this feature behaves in Python. -239,What is the output of print(5 * 3)?,2,15,14,16,15,"Multiplication of 5 and 3 gives 15, so 15 is right." -240,What is the output of print(-2 * -3)?,-5,1,7,6,6,"Multiplication of -2 and -3 gives 6, so 6 is right." -241,What is the output of print(8 * 2)?,17,Error,6,16,16,"Multiplication of 8 and 2 gives 16, so 16 is right." -242,What is the output of print(-4 * 9)?,-13,-36,-35,-37,-36,"Multiplication of -4 and 9 gives -36, so -36 is right." -243,What is the output of print(-9 * 5)?,-44,-14,-4,-45,-45,"Multiplication of -9 and 5 gives -45, so -45 is right." -244,What is the output of print(-1 * 7)?,Error,-7,-8,6,-7,"Multiplication of -1 and 7 gives -7, so -7 is right." -245,What is the output of print(3 * 5)?,Error,16,15,8,15,"Multiplication of 3 and 5 gives 15, so 15 is right." -246,What is the output of print(-5 * -7)?,36,34,35,2,35,"Multiplication of -5 and -7 gives 35, so 35 is right." -247,What is the output of print(8 * -5)?,3,-39,-41,-40,-40,"Multiplication of 8 and -5 gives -40, so -40 is right." -248,"What is [1,2,3].append(4) return value?",None,"[1,2,3]",{},"[1,2,3,4]",None,"append changes the list in place and returns None, which is why the value is None." -249,What is the output of print(-2 * 4)?,Error,2,-7,-8,-8,"Multiplication of -2 and 4 gives -8, so -8 is right." -250,What is the output of print(0 * 9)?,9,0,1,-9,0,"Multiplication of 0 and 9 gives 0, so 0 is right." -251,What is the output of print(3 * 8)?,24,-5,Error,25,24,"Multiplication of 3 and 8 gives 24, so 24 is right." -252,What is the output of print(3 * -7)?,-21,Error,-4,10,-21,"Multiplication of 3 and -7 gives -21, so -21 is right." -253,"What does round(2.675,2) equal in CPython?",2.7,2.68,2.67,2.6,2.67,"Binary floating point rounds 2.675 to 2.67 in CPython due to representation, so 2.67 is expected." -254,Which operator tests object identity?,id,==,equals,is,is,"is checks whether two names reference the same object, not just equal values." -255,What is the output of print(-1 * -6)?,5,Error,7,6,6,"Multiplication of -1 and -6 gives 6, so 6 is right." -256,What is the output of print(-8 * 5)?,-41,-40,-13,-39,-40,"Multiplication of -8 and 5 gives -40, so -40 is right." -257,What is the output of print(5 * -8)?,-39,Error,13,-40,-40,"Multiplication of 5 and -8 gives -40, so -40 is right." -258,What is the output of print(7 * 1)?,7,8,6,Error,7,"Multiplication of 7 and 1 gives 7, so 7 is right." -259,What is the output of print(-3 * 5)?,-16,Error,-15,2,-15,"Multiplication of -3 and 5 gives -15, so -15 is right." -260,What does {x for x in 'aab'} produce length of?,1,0,4,2,2,"A set comprehension keeps unique letters only, so only a and b remain, making the length 2." -261,What is the output of print(-8 * -5)?,-3,40,41,-13,40,"Multiplication of -8 and -5 gives 40, so 40 is right." -262,Which method joins a list of strings with a separator?,concat,join,combine,append,join,join is correct because it matches how this feature behaves in Python. -263,What is the output of print(-5 * -1)?,6,5,-6,Error,5,"Multiplication of -5 and -1 gives 5, so 5 is right." -264,What is the output of print(5 * -2)?,-9,Error,7,-10,-10,"Multiplication of 5 and -2 gives -10, so -10 is right." -265,"What does {'a':1}.get('b',99) return?",99,KeyError,0,1,99,"get returns the default you pass when the key is missing, so you see 99." -266,What is the output of print(-7 * -6)?,42,Error,-13,41,42,"Multiplication of -7 and -6 gives 42, so 42 is right." -267,What is the output of print(3 * 2)?,Error,7,6,5,6,"Multiplication of 3 and 2 gives 6, so 6 is right." -268,What is the output of print(4 * 6)?,24,10,Error,-2,24,"Multiplication of 4 and 6 gives 24, so 24 is right." -269,Which module is recommended for cryptographic randomness?,hashlib,uuid,secrets,[],secrets,secrets provides strong random values designed for security sensitive tasks. -270,What is the output of print(4 * -8)?,-32,-33,-31,-4,-32,"Multiplication of 4 and -8 gives -32, so -32 is right." -271,What is the output of print(5 * 0)?,0,5,Error,-1,0,"Multiplication of 5 and 0 gives 0, so 0 is right." -272,What is the output of print(3 * -5)?,-16,-2,-15,8,-15,"Multiplication of 3 and -5 gives -15, so -15 is right." -273,What is the output of print(6 * 9)?,15,-3,Error,54,54,"Multiplication of 6 and 9 gives 54, so 54 is right." -274,What is the output of print(-5 * -9)?,45,Error,46,44,45,"Multiplication of -5 and -9 gives 45, so 45 is right." -275,Which module offers precise decimal arithmetic?,statistics,fractions,decimal,math,decimal,"decimal handles base-10 decimals precisely, avoiding common binary float surprises." -276,Which built-in converts a string to an integer?,ord,int,float,str,int,int is correct because it matches how this feature behaves in Python. -277,What is the output of print(-5 * -4)?,-1,20,19,21,20,"Multiplication of -5 and -4 gives 20, so 20 is right." -278,"What is list(zip([1,2,3],[4,5])) length?",1,3,5,2,2,"zip stops at the shortest input, so the length matches the smaller list." -279,What is the output of print(0 * -6)?,-6,0,Error,-1,0,"Multiplication of 0 and -6 gives 0, so 0 is right." -280,What is the output of print(7 * 1)?,8,6,7,Error,7,"Multiplication of 7 and 1 gives 7, so 7 is right." -281,"What is ''.join(['a','b'])?","a,b",ab,"['a','b']",a b,ab,join glues the strings together using the given separator; an empty separator just concatenates them. -282,What is the output of print(8 * 2)?,16,10,17,Error,16,"Multiplication of 8 and 2 gives 16, so 16 is right." -283,What is the output of print(5 * -8)?,-3,-40,13,-41,-40,"Multiplication of 5 and -8 gives -40, so -40 is right." -284,What is 'Python'.lower()?,pYTHON,PYTHON,python,py-thon,python,"String methods return new strings without changing the original, and this method does exactly what its name says." -285,"What is {'a':1,'b':2} == {'b':2,'a':1}?",0,None,TypeError,TRUE,TRUE,"Dictionaries compare by key and value pairs, not by insertion order, so these are equal." -286,Which module offers precise decimal arithmetic?,decimal,fractions,statistics,numbers,decimal,"decimal handles base-10 decimals precisely, avoiding common binary float surprises." -287,Which keyword declares a class method?,@property,@classmethod,@staticmethod,@abstractmethod,@classmethod,@classmethod is correct because it matches how this feature behaves in Python. -288,What does PEP stand for?,Python Enhancement Proposal,Python Extended Plan,Proposal for Enhanced Python,FALSE,Python Enhancement Proposal,"PEP means Python Enhancement Proposal, which documents ideas and changes to the language." -289,What is the output of print(2 * -4)?,-7,-2,-8,-9,-8,"Multiplication of 2 and -4 gives -8, so -8 is right." -290,What is the output of print(1 * 0)?,1,Error,-1,0,0,"Multiplication of 1 and 0 gives 0, so 0 is right." -291,Which keyword annotates variables with types?,:,::,->,type,:,: is correct because it matches how this feature behaves in Python. -292,Which built-in converts a string to an integer?,int,float,0,bool,int,int is correct because it matches how this feature behaves in Python. -293,"What is (2,)*3?","(2, 2, 2)","(2,3)","(2,2,2,)","[2,2,2]","(2, 2, 2)","(2, 2, 2) is correct because it matches how this feature behaves in Python." -294,What is the output of print(2 * -3)?,-6,5,Error,-5,-6,"Multiplication of 2 and -3 gives -6, so -6 is right." -295,What is the output of print(9 * -1)?,Error,-9,8,-10,-9,"Multiplication of 9 and -1 gives -9, so -9 is right." -296,What is the output of print(-3 * 5)?,Error,-15,-8,-14,-15,"Multiplication of -3 and 5 gives -15, so -15 is right." -297,Which statement is used to handle exceptions?,try ... except,guard ... catch,trap ... recover,handle ... except,try ... except,try ... except is correct because it matches how this feature behaves in Python. -298,Which module provides a LRU cache decorator?,functools,itertools,0,operator,functools,functools has handy function utilities like lru_cache for memoization. -299,What is the output of print(8 * -3)?,-24,-25,-23,5,-24,"Multiplication of 8 and -3 gives -24, so -24 is right." -300,What is the output of print(-9 * 4)?,Error,-35,-37,-36,-36,"Multiplication of -9 and 4 gives -36, so -36 is right." -301,What is the output of print(5 * -1)?,Error,4,-6,-5,-5,"Multiplication of 5 and -1 gives -5, so -5 is right." -302,What is the output of print(2 * 1)?,3,2,1,Error,2,"Multiplication of 2 and 1 gives 2, so 2 is right." -303,What is the output of print('A' < 'a') in ASCII?,TRUE,FALSE,Error,None,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." -304,What is the output of print(5 * -4)?,Error,-19,-20,-21,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." -305,What is the output of print(-7 * -7)?,49,0,48,-14,49,"Multiplication of -7 and -7 gives 49, so 49 is right." -306,What is the output of print(-7 * -2)?,14,Error,13,15,14,"Multiplication of -7 and -2 gives 14, so 14 is right." -307,What is the output of print(8 * -7)?,-56,-57,1,-55,-56,"Multiplication of 8 and -7 gives -56, so -56 is right." -308,What is the output of print(7 * -9)?,-63,-2,16,-64,-63,"Multiplication of 7 and -9 gives -63, so -63 is right." -309,What is the output of print(7 * 5)?,36,34,35,Error,35,"Multiplication of 7 and 5 gives 35, so 35 is right." -310,What is the output of print(0 * 6)?,-1,6,0,-6,0,"Multiplication of 0 and 6 gives 0, so 0 is right." -311,What is the output of print(2 * -2)?,-4,Error,0,4,-4,"Multiplication of 2 and -2 gives -4, so -4 is right." -312,What is the output of print(6 * 9)?,Error,15,-3,54,54,"Multiplication of 6 and 9 gives 54, so 54 is right." -313,What is the output of print(-6 * 7)?,-43,-41,Error,-42,-42,"Multiplication of -6 and 7 gives -42, so -42 is right." -314,What is the output of print(1 * -5)?,-6,Error,-5,-4,-5,"Multiplication of 1 and -5 gives -5, so -5 is right." -315,What is the output of print(8 * -7)?,1,-56,15,-55,-56,"Multiplication of 8 and -7 gives -56, so -56 is right." -316,Which keyword is used to create an anonymous function?,func,def,anon,lambda,lambda,lambda is correct because it matches how this feature behaves in Python. -317,Which built-in returns a sequence length?,len,count,cardinality,size,len,len is correct because it matches how this feature behaves in Python. -318,What is the output of print(-3 * -9)?,-12,28,6,27,27,"Multiplication of -3 and -9 gives 27, so 27 is right." -319,What is the output of print(type([]).__name__)?,tuple,object,list,dict,list,"Lists use square brackets and are mutable ordered collections, so their type is list." -320,What is the output of print(-5 * -4)?,-9,-1,21,20,20,"Multiplication of -5 and -4 gives 20, so 20 is right." -321,"What is [1,2,3] + [4]?","[4,1,2,3]","[1,2,3,4,]","[1,2,3]","[1, 2, 3, 4]","[1, 2, 3, 4]","[1, 2, 3, 4] is correct because it matches how this feature behaves in Python." -322,What is the output of print(-5 * 8)?,-40,-13,Error,-39,-40,"Multiplication of -5 and 8 gives -40, so -40 is right." -323,Which data structure is best for FIFO operations in collections?,tuple,array.array,list,collections.deque,collections.deque,"collections.deque is built for fast appends and pops from both ends, perfect for FIFO queues." -324,Which function converts an ASCII code point to character?,chr,hex,'',ord,chr,chr turns a code point into the corresponding character; ord does the reverse. -325,Which statement is used to handle exceptions?,try ... except,[],trap ... recover,guard ... catch,try ... except,try ... except is correct because it matches how this feature behaves in Python. -326,What is the output of print(-6 * -7)?,Error,41,43,42,42,"Multiplication of -6 and -7 gives 42, so 42 is right." -327,What is the output of print(-8 * -5)?,39,40,41,-3,40,"Multiplication of -8 and -5 gives 40, so 40 is right." -328,Which keyword declares a class method?,@abstractmethod,@classmethod,@overload,@property,@classmethod,@classmethod is correct because it matches how this feature behaves in Python. -329,What is the output of print(4 * -5)?,9,Error,-19,-20,-20,"Multiplication of 4 and -5 gives -20, so -20 is right." -330,What is 5//2?,2.5,2,Error,2,2,"The // operator is floor division, which drops the fractional part toward negative infinity." -331,What is the output of print(-5 * 5)?,-25,-10,-24,Error,-25,"Multiplication of -5 and 5 gives -25, so -25 is right." -332,What is the output of print(-2 * -8)?,-10,15,16,6,16,"Multiplication of -2 and -8 gives 16, so 16 is right." -333,Which built-in type is immutable?,set,bytearray,list,tuple,tuple,"Tuples are immutable, so once created their contents cannot be changed." -334,What is the output of print(1 * 9)?,9,10,Error,8,9,"Multiplication of 1 and 9 gives 9, so 9 is right." -335,What is the output of print(-1 * 1)?,-2,-1,Error,0,-1,"Multiplication of -1 and 1 gives -1, so -1 is right." -336,What is the output of print(7 * 2)?,15,Error,14,9,14,"Multiplication of 7 and 2 gives 14, so 14 is right." -337,What is the output of print(1 * 3)?,2,4,-2,3,3,"Multiplication of 1 and 3 gives 3, so 3 is right." -338,Which statement re-raises the current exception?,throw,raise,except,None,raise,raise is correct because it matches how this feature behaves in Python. -339,What is 'python'[1:4]?,tho,pyt,yth,ytho,yth,Slicing from index 1 up to 4 takes the middle chunk yth. -340,What is the output of print(-9 * -6)?,55,Error,53,54,54,"Multiplication of -9 and -6 gives 54, so 54 is right." -341,"What is list(filter(None,[0,1,2]))?","[1, 2]",[],[2],"[0,1,2]","[1, 2]","[1, 2] is correct because it matches how this feature behaves in Python." -342,What is the output of print(5 * 3)?,Error,15,16,2,15,"Multiplication of 5 and 3 gives 15, so 15 is right." -343,What is the output of print(-6 * 9)?,-54,Error,3,-53,-54,"Multiplication of -6 and 9 gives -54, so -54 is right." -344,What is 'mississippi'.count('ss')?,1,4,2,3,2,2 is correct because it matches how this feature behaves in Python. -345,What is the output of print(-4 * 5)?,-9,-20,1,Error,-20,"Multiplication of -4 and 5 gives -20, so -20 is right." -346,What is the output of print(-5 * -6)?,30,31,1,-11,30,"Multiplication of -5 and -6 gives 30, so 30 is right." -347,What is the output of print(-3 * -8)?,Error,23,25,24,24,"Multiplication of -3 and -8 gives 24, so 24 is right." -348,What is the output of print(-3 * -5)?,14,15,-8,2,15,"Multiplication of -3 and -5 gives 15, so 15 is right." -349,What is the output of print(-9 * -9)?,81,Error,82,-18,81,"Multiplication of -9 and -9 gives 81, so 81 is right." -350,What is the output of print(6 * -4)?,-24,10,-25,Error,-24,"Multiplication of 6 and -4 gives -24, so -24 is right." -351,What is the output of print(-2 * 9)?,7,-11,-19,-18,-18,"Multiplication of -2 and 9 gives -18, so -18 is right." -352,What is the output of print(-4 * 2)?,-7,-9,-2,-8,-8,"Multiplication of -4 and 2 gives -8, so -8 is right." -353,"What is isinstance(True,int)?",TRUE,FALSE,None,0,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." -354,Which module provides regular expressions?,re,match,regex,pattern,re,re is correct because it matches how this feature behaves in Python. -355,What is the output of print(-2 * 8)?,-16,-10,-15,Error,-16,"Multiplication of -2 and 8 gives -16, so -16 is right." -356,What is the output of print(3 * -2)?,5,-5,-6,1,-6,"Multiplication of 3 and -2 gives -6, so -6 is right." -357,What is the output of print(2 * -6)?,-4,-12,-13,Error,-12,"Multiplication of 2 and -6 gives -12, so -12 is right." -358,What is type({}.keys()).__name__?,dict_keys,set,dict_items,view,dict_keys,"Dictionary view objects like dict_keys are special views, not plain lists." -359,What is the output of print(0 * -5)?,1,0,5,-1,0,"Multiplication of 0 and -5 gives 0, so 0 is right." -360,What is the output of print(-8 * -2)?,16,-6,-10,17,16,"Multiplication of -8 and -2 gives 16, so 16 is right." -361,What is the output of print(-1 * -6)?,Error,6,5,-7,6,"Multiplication of -1 and -6 gives 6, so 6 is right." -362,What is the output of print(-4 * -8)?,32,-12,Error,4,32,"Multiplication of -4 and -8 gives 32, so 32 is right." -363,"What is isinstance(True,int)?",'',FALSE,0,TRUE,TRUE,"This follows Pythonโ€™s rules for that operation, so this truth value is the expected outcome." -364,What is the output of print(8 * -4)?,-33,4,-31,-32,-32,"Multiplication of 8 and -4 gives -32, so -32 is right." -365,What is the output of print(0 * -5)?,-1,1,Error,0,0,"Multiplication of 0 and -5 gives 0, so 0 is right." -366,What is the output of print(0 * 3)?,-1,3,1,0,0,"Multiplication of 0 and 3 gives 0, so 0 is right." -367,What is the output of print(6 * -3)?,3,-17,-18,-19,-18,"Multiplication of 6 and -3 gives -18, so -18 is right." -368,What is the output of print(-2 * 9)?,Error,-18,-11,7,-18,"Multiplication of -2 and 9 gives -18, so -18 is right." -369,What is the output of print(-8 * 0)?,Error,1,0,-1,0,"Multiplication of -8 and 0 gives 0, so 0 is right." -370,What is the file mode to read text (default)?,rb,r,w,rw,r,r opens a file for reading text by default. -371,What is the result of 2**3?,8,6,23,9,8,The exponent operator ** raises 2 to the power 3 which is 8. -372,What is the output of print(5 * -4)?,-19,Error,-20,9,-20,"Multiplication of 5 and -4 gives -20, so -20 is right." -373,"What is sorted([3,1,2])?","(1,2,3)","[1, 2, 3]","[1,3,2]","[3,2,1]","[1, 2, 3]","sorted creates and returns a new sorted list, leaving the original alone." -374,What is the output of print(8 * 7)?,15,55,Error,56,56,"Multiplication of 8 and 7 gives 56, so 56 is right." -375,Which module helps parse command-line arguments?,click,sys,shlex,argparse,argparse,argparse parses command-line arguments and automatically builds help messages. -376,What is 'python'.find('z')?,None,FALSE,0,-1,-1,-1 is correct because it matches how this feature behaves in Python. -377,Which statement re-raises the current exception?,[],raise,retry,except,raise,raise is correct because it matches how this feature behaves in Python. -378,Which function schedules multiple coroutines to run concurrently?,asyncio.sleep,asyncio.gather,asyncio.run,asyncio.wait_for,asyncio.gather,asyncio.gather schedules multiple coroutines to run concurrently and waits for them. -379,What is the output of print(-3 * -1)?,-2,2,3,4,3,"Multiplication of -3 and -1 gives 3, so 3 is right." -380,Which method joins a list of strings with a separator?,join,combine,concat,append,join,join is correct because it matches how this feature behaves in Python. -381,Which module provides tools for working with iterators like permutations?,itertools,collections,random,typing,itertools,itertools houses fast iterator building blocks like permutations and combinations. -382,What is the output of print(4 * -6)?,-25,Error,-24,-2,-24,"Multiplication of 4 and -6 gives -24, so -24 is right." -383,What is the output of print(-7 * 8)?,Error,-56,-57,-15,-56,"Multiplication of -7 and 8 gives -56, so -56 is right." -384,What is the output of print(-3 * 9)?,-12,-26,-27,6,-27,"Multiplication of -3 and 9 gives -27, so -27 is right." -385,What is the output of print(-3 * 8)?,-24,-11,Error,5,-24,"Multiplication of -3 and 8 gives -24, so -24 is right." -386,Which function schedules multiple coroutines to run concurrently?,asyncio.sleep,asyncio.run,asyncio.gather,(),asyncio.gather,asyncio.gather schedules multiple coroutines to run concurrently and waits for them. -387,What is the output of print(-6 * 0)?,0,Error,-6,1,0,"Multiplication of -6 and 0 gives 0, so 0 is right." -388,What is the output of print(4 * -4)?,-16,8,-15,Error,-16,"Multiplication of 4 and -4 gives -16, so -16 is right." -389,What is the output of print(5 * 6)?,Error,31,-1,30,30,"Multiplication of 5 and 6 gives 30, so 30 is right." -390,What is the output of print(-1 * -9)?,Error,8,9,10,9,"Multiplication of -1 and -9 gives 9, so 9 is right." -391,What is the output of print(-4 * 6)?,Error,-25,-24,-23,-24,"Multiplication of -4 and 6 gives -24, so -24 is right." -392,What is the output of print(-9 * -3)?,-12,Error,26,27,27,"Multiplication of -9 and -3 gives 27, so 27 is right." -393,What is the output of print(-5 * 2)?,-11,-7,-10,-9,-10,"Multiplication of -5 and 2 gives -10, so -10 is right." -394,What is the output of print(4 * 1)?,4,3,5,Error,4,"Multiplication of 4 and 1 gives 4, so 4 is right." -395,What is the correct file extension for Python source files?,.pyc,.py,.pt,.pyt,.py,.py is correct because it matches how this feature behaves in Python. -396,What is the output of print(2 * -6)?,8,-4,-12,-11,-12,"Multiplication of 2 and -6 gives -12, so -12 is right." -397,What is the output of print(1 * -9)?,-10,-8,Error,-9,-9,"Multiplication of 1 and -9 gives -9, so -9 is right." -398,Which operator tests object identity?,is,id,in,(),is,"is checks whether two names reference the same object, not just equal values." -399,What is the output of print(-1 * -4)?,5,-5,4,Error,4,"Multiplication of -1 and -4 gives 4, so 4 is right." -400,What is the output of print(2 * 7)?,14,15,-5,9,14,"Multiplication of 2 and 7 gives 14, so 14 is right." -401,What is the output of print(9 * 8)?,1,Error,72,71,72,"Multiplication of 9 and 8 gives 72, so 72 is right." -402,What is the output of print(type([]).__name__)?,list,set,dict,object,list,"Lists use square brackets and are mutable ordered collections, so their type is list." -403,What is the output of print(8 * 0)?,8,0,1,-1,0,"Multiplication of 8 and 0 gives 0, so 0 is right." -404,What is the output of print(2 * -7)?,9,Error,-13,-14,-14,"Multiplication of 2 and -7 gives -14, so -14 is right." -405,What is the output of print(4 * 8)?,-4,33,32,Error,32,"Multiplication of 4 and 8 gives 32, so 32 is right." -406,What is 'Python'.lower()?,python,Python,PYTHON,pYTHON,python,"String methods return new strings without changing the original, and this method does exactly what its name says." -407,What is the output of print(5 * 4)?,20,21,Error,19,20,"Multiplication of 5 and 4 gives 20, so 20 is right." -408,What is the output of print(-5 * -2)?,11,Error,10,-3,10,"Multiplication of -5 and -2 gives 10, so 10 is right." -409,What is the output of print(0 * 5)?,5,0,1,-5,0,"Multiplication of 0 and 5 gives 0, so 0 is right." -410,"What does {'a':1}.get('b',99) return?",KeyError,99,None,0,99,"get returns the default you pass when the key is missing, so you see 99." -411,What is the output of print(-8 * 5)?,-40,-13,-3,-41,-40,"Multiplication of -8 and 5 gives -40, so -40 is right." -412,What is the output of print(-9 * -1)?,9,Error,8,-8,9,"Multiplication of -9 and -1 gives 9, so 9 is right." -413,Which method joins a list of strings with a separator?,merge,join,combine,concat,join,join is correct because it matches how this feature behaves in Python. -414,What is the output of print(6 * 0)?,1,6,-1,0,0,"Multiplication of 6 and 0 gives 0, so 0 is right." -415,What is the output of print(4 * -5)?,-21,-20,-19,9,-20,"Multiplication of 4 and -5 gives -20, so -20 is right." -416,"What is len(set([1,1,2]))?",1,0,2,3,2,"len counts elements in the sequence, so the result matches the number of items shown." -417,"What does {'a':1}.get('b',99) return?",1,0,None,99,99,"get returns the default you pass when the key is missing, so you see 99." -418,What is the output of print(-4 * 9)?,-36,-37,5,-35,-36,"Multiplication of -4 and 9 gives -36, so -36 is right." -419,What is ''.strip()?,' ',,None,[],,nan is correct because it matches how this feature behaves in Python. -420,What is the output of print(3 * -7)?,-4,-20,-21,-22,-21,"Multiplication of 3 and -7 gives -21, so -21 is right." -421,"What is [1,2,3] + [4]?","[4,1,2,3]","[1,2,3]+[4]","[1,2,3]","[1, 2, 3, 4]","[1, 2, 3, 4]","[1, 2, 3, 4] is correct because it matches how this feature behaves in Python." -422,What is the output of print(-5 * 1)?,-6,Error,-4,-5,-5,"Multiplication of -5 and 1 gives -5, so -5 is right." -423,"What is {1,2,3} == {3,2,1}?",0,Error,TRUE,None,TRUE,Set equality ignores order; same elements mean True. -424,What is the output of print(9 * 7)?,Error,63,62,2,63,"Multiplication of 9 and 7 gives 63, so 63 is right." -425,What is the output of print(4 * -1)?,-3,-4,-5,Error,-4,"Multiplication of 4 and -1 gives -4, so -4 is right." -426,Which keyword creates a generator inside a function?,yield,generate,produce,'',yield,yield turns a function into a generator that produces values lazily. -427,What is the output of print(8 * 4)?,32,12,31,4,32,"Multiplication of 8 and 4 gives 32, so 32 is right." -428,What is the output of print(-1 * -9)?,-10,10,8,9,9,"Multiplication of -1 and -9 gives 9, so 9 is right." -429,Which library path object uses the / operator to join?,os.path,sys.path,pathlib.Path,shutil,pathlib.Path,pathlib.Path overloads the division operator to join path parts neatly. -430,What is the output of print(-9 * 4)?,-35,-5,-36,-13,-36,"Multiplication of -9 and 4 gives -36, so -36 is right." -431,Which collection does not allow duplicate elements?,list,set,deque,tuple,set,"Sets keep unique elements only, so duplicates collapse to one." -432,Which module helps parse command-line arguments?,shlex,getopt,click,argparse,argparse,argparse parses command-line arguments and automatically builds help messages. -433,What is the output of print(0 * 5)?,0,-1,-5,1,0,"Multiplication of 0 and 5 gives 0, so 0 is right." -434,What is the output of print(0 * -2)?,2,0,-1,1,0,"Multiplication of 0 and -2 gives 0, so 0 is right." -435,What is the output of print(9 * 9)?,18,82,Error,81,81,"Multiplication of 9 and 9 gives 81, so 81 is right." -436,What is the output of print(9 * 4)?,36,37,5,Error,36,"Multiplication of 9 and 4 gives 36, so 36 is right." -437,What is the output of print(6 * -2)?,4,-12,Error,8,-12,"Multiplication of 6 and -2 gives -12, so -12 is right." -438,What is the output of print(0 * 9)?,0,1,9,-9,0,"Multiplication of 0 and 9 gives 0, so 0 is right." -439,What is the output of print(-1 * -6)?,5,-7,6,7,6,"Multiplication of -1 and -6 gives 6, so 6 is right." -440,What is the output of print(1 * -9)?,-10,-8,-9,10,-9,"Multiplication of 1 and -9 gives -9, so -9 is right." -441,What is the output of print(8 * 5)?,41,Error,40,39,40,"Multiplication of 8 and 5 gives 40, so 40 is right." -442,What is bool([0])?,FALSE,TRUE,None,FALSE,TRUE,"Non-empty lists are truthy, even if they contain zero; so this is True." -443,What is the output of print(5 * 0)?,1,5,0,-1,0,"Multiplication of 5 and 0 gives 0, so 0 is right." -444,What is the output of print(1 * 0)?,Error,-1,0,1,0,"Multiplication of 1 and 0 gives 0, so 0 is right." -445,What is the output of print(3 * 2)?,6,Error,1,7,6,"Multiplication of 3 and 2 gives 6, so 6 is right." -446,What is 'Python'.lower()?,python,pYTHON,PYTHON,Python,python,"String methods return new strings without changing the original, and this method does exactly what its name says." -447,What is the output of print(5 * 6)?,-1,31,Error,30,30,"Multiplication of 5 and 6 gives 30, so 30 is right." -448,What is the output of print(5 * -3)?,-16,8,-15,2,-15,"Multiplication of 5 and -3 gives -15, so -15 is right." -449,Which keyword creates a generator inside a function?,generate,return,yield,produce,yield,yield turns a function into a generator that produces values lazily. -450,What is the output of print(-9 * -4)?,-13,-5,36,37,36,"Multiplication of -9 and -4 gives 36, so 36 is right." -451,What is type(range(3)).__name__?,generator,range,iterator,tuple,range,range objects have their own type in Python and generate sequences lazily. -452,What is the output of print(-4 * -4)?,-8,0,Error,16,16,"Multiplication of -4 and -4 gives 16, so 16 is right." -453,"What is len(set([1,1,2]))?",1,3,0,2,2,"len counts elements in the sequence, so the result matches the number of items shown." -454,What is the output of print(4 * -3)?,7,Error,-11,-12,-12,"Multiplication of 4 and -3 gives -12, so -12 is right." -455,What is the output of print(4 * -3)?,Error,-11,7,-12,-12,"Multiplication of 4 and -3 gives -12, so -12 is right." -456,What does len('hello') return?,6,0,5,4,5,"len counts elements in the sequence, so the result matches the number of items shown." -457,What is the output of print(3 * -2)?,Error,1,-5,-6,-6,"Multiplication of 3 and -2 gives -6, so -6 is right." -458,What is the file mode to read text (default)?,r,rt,rb,(),r,r opens a file for reading text by default. -459,What is the output of print(2 * -6)?,-13,Error,-12,-11,-12,"Multiplication of 2 and -6 gives -12, so -12 is right." -460,Which keyword is used to define a coroutine function?,TRUE,await def,def coroutine,async def,async def,async def defines a coroutine function that can be awaited. -461,What is the output of print(-3 * 2)?,Error,-6,-7,-1,-6,"Multiplication of -3 and 2 gives -6, so -6 is right." -462,What is the output of print(7 * 3)?,Error,21,22,4,21,"Multiplication of 7 and 3 gives 21, so 21 is right." -463,What is the output of print(-5 * 8)?,-41,-13,-39,-40,-40,"Multiplication of -5 and 8 gives -40, so -40 is right." -464,What is the output of print(3 * -6)?,-3,-18,-19,9,-18,"Multiplication of 3 and -6 gives -18, so -18 is right." -465,What is the output of print(-2 * 5)?,-7,3,-11,-10,-10,"Multiplication of -2 and 5 gives -10, so -10 is right." -466,"What is len(set([1,1,2]))?",1,2,0,Error,2,"len counts elements in the sequence, so the result matches the number of items shown." -467,What is the output of print(9 * 7)?,Error,2,16,63,63,"Multiplication of 9 and 7 gives 63, so 63 is right." -468,What is the output of print(-3 * 8)?,Error,-24,-23,5,-24,"Multiplication of -3 and 8 gives -24, so -24 is right." -469,What is -3 % 2?,-1,3,1,2,1,1 is correct because it matches how this feature behaves in Python. -470,Which statement is used to handle exceptions?,handle ... except,try ... except,if ... else,trap ... recover,try ... except,try ... except is correct because it matches how this feature behaves in Python. -471,Which keyword defines a function in Python?,0,func,lambda,def,def,def is correct because it matches how this feature behaves in Python. -472,What is the output of print(5 * 0)?,5,0,Error,1,0,"Multiplication of 5 and 0 gives 0, so 0 is right." -473,What is the output of print(-4 * 0)?,Error,-4,-1,0,0,"Multiplication of -4 and 0 gives 0, so 0 is right." -474,What is the output of print(-5 * 8)?,-39,-40,-13,-41,-40,"Multiplication of -5 and 8 gives -40, so -40 is right." -475,What is the output of print(-3 * -8)?,Error,5,24,25,24,"Multiplication of -3 and -8 gives 24, so 24 is right." -476,What is the output of print(-4 * 6)?,-24,2,Error,-10,-24,"Multiplication of -4 and 6 gives -24, so -24 is right." -477,What is the output of print(3 * 1)?,3,Error,2,4,3,"Multiplication of 3 and 1 gives 3, so 3 is right." -478,What is the output of print(1 * -2)?,-3,Error,-2,-1,-2,"Multiplication of 1 and -2 gives -2, so -2 is right." -479,What is the output of print(-9 * -3)?,-6,27,Error,26,27,"Multiplication of -9 and -3 gives 27, so 27 is right." -480,What is the output of print(7 * 3)?,22,20,21,Error,21,"Multiplication of 7 and 3 gives 21, so 21 is right." -481,"Which function returns an iterator of (index, value) pairs?",enumerate,zip,map,TRUE,enumerate,enumerate gives you index and value for each item as you iterate. -482,Which keyword prevents a dataclass from being mutable?,static=True,final=True,frozen=True,sealed=True,frozen=True,frozen=True is correct because it matches how this feature behaves in Python. -483,What is the output of print(4 * -8)?,-32,-4,-31,-33,-32,"Multiplication of 4 and -8 gives -32, so -32 is right." -484,What is the output of print(5 * 3)?,16,14,8,15,15,"Multiplication of 5 and 3 gives 15, so 15 is right." -485,What is the output of print(-1 * 1)?,-2,0,-1,Error,-1,"Multiplication of -1 and 1 gives -1, so -1 is right." -486,What is the output of print(-7 * 4)?,-29,-3,-28,-27,-28,"Multiplication of -7 and 4 gives -28, so -28 is right." -487,What is the output of print(-5 * 8)?,3,-40,-41,-13,-40,"Multiplication of -5 and 8 gives -40, so -40 is right." -488,Which built-in converts bytes to str?,bytes.decode,format,str.encode,repr,bytes.decode,bytes.decode is correct because it matches how this feature behaves in Python. -489,What is the output of print(-2 * 6)?,-12,Error,-13,4,-12,"Multiplication of -2 and 6 gives -12, so -12 is right." -490,"What is list(map(lambda x:x+1,[1,2]))?","[2,3,4]","[1,2]","[2, 3]","[3,4]","[2, 3]","[2, 3] is correct because it matches how this feature behaves in Python." -491,What is the output of print(5 * -3)?,2,-15,-16,-14,-15,"Multiplication of 5 and -3 gives -15, so -15 is right." -492,What is the output of print(8 * 1)?,9,7,8,Error,8,"Multiplication of 8 and 1 gives 8, so 8 is right." -493,"What is ''.join(['a','b'])?","['a','b']",ab,"a,b",a b,ab,join glues the strings together using the given separator; an empty separator just concatenates them. -494,What is the output of print(5 * 9)?,-4,44,45,14,45,"Multiplication of 5 and 9 gives 45, so 45 is right." -495,Which method returns a new sorted list without modifying the original?,order,sort,arrange,sorted,sorted,sorted is correct because it matches how this feature behaves in Python. -496,What does PEP stand for?,Python Extended Plan,Python Enhancement Proposal,TRUE,Python Engineering Plan,Python Enhancement Proposal,"PEP means Python Enhancement Proposal, which documents ideas and changes to the language." -497,What is the output of print(-8 * 9)?,-71,-73,-72,-17,-72,"Multiplication of -8 and 9 gives -72, so -72 is right." -498,What is the output of print(7 * 8)?,56,55,15,-1,56,"Multiplication of 7 and 8 gives 56, so 56 is right." -499,Which data structure is best for FIFO operations in collections?,list,tuple,collections.deque,set,collections.deque,"collections.deque is built for fast appends and pops from both ends, perfect for FIFO queues." -500,Which operator tests object identity?,in,equals,==,is,is,"is checks whether two names reference the same object, not just equal values." From 5edf11e1d785f003a825aa93aefd8ede347ddcd4 Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:11:52 -0500 Subject: [PATCH 15/28] tests for random emojis --- tests/test_data.py | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/tests/test_data.py b/tests/test_data.py index e1d865d..68546cc 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -33,7 +33,7 @@ def test_sanity_check(self, example_fixture): actual = True # the value we see in reality assert actual == expected, "Expected True to be equal to True!" - def test_random_emojis(self): + def test_random_emojis_default(self): """ Verify random_emojis() function and make sure it returns the correct number of emojis. """ @@ -43,11 +43,48 @@ def test_random_emojis(self): len(actual) == 3 ), f"Expected random_emojis() to return 3 emojis by default. Instead, it returned {len(actual)} emojis." - # test with counts 1-10 - for i in range(10): + # test with counts for food + default_len_actual = len(data._EMOJI_BANK["food"]) + for i in range(default_len_actual): actual = data.random_emojis(i) assert ( len(actual) == i ), f"Expected random_emojis({i}) to return {i} emojis. Instead, it returned {len(actual)} emojis." + def test_random_emojis_all(self): + """ + Verify random_emojis() function when theme is invalid and it returns all emojis + """ + # test with invalid theme + all_emoji = [e for v in data._EMOJI_BANK.values() for (e, _) in v] + all_len_actual = len(all_emoji) + for i in range(all_len_actual): + actual = data.random_emojis(i, theme="invalid_theme") + assert ( + len(actual) == i + ), f"Expected random_emojis({i}, theme='invalid_theme') to return {i} emojis. Instead, it returned {len(actual)} emojis." + def test_random_emojis_animals(self): + """ + Verify random_emojis() function for animals theme + """ + # test with counts for animals + animals_len_actual = len(data._EMOJI_BANK["animals"]) + for i in range(animals_len_actual): + actual = data.random_emojis(i, theme="animals") + assert ( + len(actual) == i + ), f"Expected random_emojis({i}, theme='animals') to return {i} emojis. Instead, it returned {len(actual)} emojis." + + def test_random_emojis_themes(self): + """ + Verify random_emojis() function works for all themes + """ + + for theme in data._EMOJI_BANK.keys(): + theme_len_actual = len(data._EMOJI_BANK[theme]) + for i in range(theme_len_actual): + actual = data.random_emojis(i, theme=theme) + assert ( + len(actual) == i + ), f"Expected random_emojis({i}, theme='{theme}') to return {i} emojis. Instead, it returned {len(actual)} emojis." \ No newline at end of file From cd590f96fe9d69deec349dd4f3a6e55319c468e4 Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:20:57 -0500 Subject: [PATCH 16/28] get_theme_item() tests --- tests/test_data.py | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/tests/test_data.py b/tests/test_data.py index 68546cc..d6c3a00 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -87,4 +87,42 @@ def test_random_emojis_themes(self): actual = data.random_emojis(i, theme=theme) assert ( len(actual) == i - ), f"Expected random_emojis({i}, theme='{theme}') to return {i} emojis. Instead, it returned {len(actual)} emojis." \ No newline at end of file + ), f"Expected random_emojis({i}, theme='{theme}') to return {i} emojis. Instead, it returned {len(actual)} emojis." + + + + + + def test_get_theme_item_default(self): + """ + Verify get_theme_item() function with default parameters + """ + + food_actual = data._EMOJI_BANK["food"] + actual = data.get_theme_item() + assert ( + actual in food_actual + ), f"Expected get_theme_item() to return an item from the food theme. Instead, it returned {actual}." + + def test_get_theme_item_invalid(self): + """ + Verify get_theme_item() function with invalid theme + """ + + food_actual = data._EMOJI_BANK["food"] + actual = data.get_theme_item("invalid") + assert ( + actual in food_actual + ), f"Expected get_theme_item() to return an item from the food theme. Instead, it returned {actual}." + + def test_get_theme_item_all(self): + """ + Verify get_theme_item() function works for all themes + """ + + for theme in data._EMOJI_BANK: + theme_actual = data._EMOJI_BANK[theme] + actual = data.get_theme_item(theme) + assert ( + actual in theme_actual + ) , f"Expected get_theme_item('{theme}') to return an item from the {theme} theme. Instead, it returned {actual}." \ No newline at end of file From 42db0572f946db75af7069f2bbe626fe6ee0f271 Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:26:29 -0500 Subject: [PATCH 17/28] coverage --- Pipfile | 5 +++-- Pipfile.lock | 31 +++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Pipfile b/Pipfile index bba80c8..22e049e 100644 --- a/Pipfile +++ b/Pipfile @@ -9,11 +9,12 @@ verify_ssl = true name = "testpypi" [packages] -coverage = "*" twine = "*" build = "*" pytest = "*" -emojiguessr = {version = "==0.0.1", index = "testpypi"} +coverage = "*" +pytest-cov = "*" +emojiguessr = {file = ".", editable = true} [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 6938beb..f33de0c 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "7dd36bddba3fac1f94a3df09c3fa5a5754ab7c78286538f2a0a62c8aaeff1b5c" + "sha256": "4c8d105fd84acc34a8ebb7267db41ea3cbdfcd6ec3fc31dde49243a1c1eaf330" }, "pipfile-spec": 6, "requires": { @@ -157,7 +157,18 @@ "markers": "python_version >= '3.7'", "version": "==3.4.4" }, + "colorama": { + "hashes": [ + "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", + "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'", + "version": "==0.4.6" + }, "coverage": { + "extras": [ + "toml" + ], "hashes": [ "sha256:037b2d064c2f8cc8716fe4d39cb705779af3fbf1ba318dc96a1af858888c7bb5", "sha256:05791e528a18f7072bf5998ba772fe29db4da1234c45c2087866b5ba4dea710e", @@ -265,13 +276,8 @@ "version": "==0.22.2" }, "emojiguessr": { - "hashes": [ - "sha256:12f28a5cf04d91b1eb9727a97a71eb9b38b9d5d23af19f8fa7bbcb90dc0769e1", - "sha256:ed6f411982b4e6fc7ddb7593d57a091f244c54932686380a34462dcbc5d10f71" - ], - "index": "testpypi", - "markers": "python_version >= '3.9'", - "version": "==0.0.1" + "editable": true, + "file": "." }, "id": { "hashes": [ @@ -426,6 +432,15 @@ "markers": "python_version >= '3.9'", "version": "==8.4.2" }, + "pytest-cov": { + "hashes": [ + "sha256:33c97eda2e049a0c5298e91f519302a1334c26ac65c1a483d6206fd458361af1", + "sha256:3b8e9558b16cc1479da72058bdecf8073661c7f57f7d3c5f22a1c23507f2d861" + ], + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==7.0.0" + }, "readme-renderer": { "hashes": [ "sha256:2fbca89b81a08526aadf1357a8c2ae889ec05fb03f5da67f9769c9a592166151", From 0e5546e018e5c43b574891776a64179a53969e4f Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:41:37 -0500 Subject: [PATCH 18/28] bumpver --- Pipfile | 1 + Pipfile.lock | 35 ++++++++++++++++++++++++++++++++++- pyproject.toml | 14 ++++++++++++-- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/Pipfile b/Pipfile index 22e049e..c93a64c 100644 --- a/Pipfile +++ b/Pipfile @@ -15,6 +15,7 @@ pytest = "*" coverage = "*" pytest-cov = "*" emojiguessr = {file = ".", editable = true} +bumpver = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index f33de0c..20ebe8a 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "4c8d105fd84acc34a8ebb7267db41ea3cbdfcd6ec3fc31dde49243a1c1eaf330" + "sha256": "5887ae81f28eb165ed0eed1712a48fe41582cabd99dc09dbdacc3a6575083249" }, "pipfile-spec": 6, "requires": { @@ -30,6 +30,15 @@ "markers": "python_version >= '3.9'", "version": "==1.3.0" }, + "bumpver": { + "hashes": [ + "sha256:a35fd2d43a5f65f014035c094866bd3bd6c739606f29fd41246d6ec6e839d3f9", + "sha256:c02527f6ed7887afbc06c07630047b24a9f9d02d544a65639e99bf8b92aaa674" + ], + "index": "pypi", + "markers": "python_version >= '2.7'", + "version": "==2025.1131" + }, "certifi": { "hashes": [ "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de", @@ -157,6 +166,14 @@ "markers": "python_version >= '3.7'", "version": "==3.4.4" }, + "click": { + "hashes": [ + "sha256:9b9f285302c6e3064f4330c05f05b81945b2a39544279343e6e7c5f27a9baddc", + "sha256:e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4" + ], + "markers": "python_version >= '3.10'", + "version": "==8.3.0" + }, "colorama": { "hashes": [ "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", @@ -335,6 +352,14 @@ "markers": "python_version >= '3.9'", "version": "==25.6.0" }, + "lexid": { + "hashes": [ + "sha256:509a3a4cc926d3dbf22b203b18a4c66c25e6473fb7c0e0d30374533ac28bafe5", + "sha256:5526bb5606fd74c7add23320da5f02805bddd7c77916f2dc1943e6bada8605ed" + ], + "markers": "python_version >= '2.7'", + "version": "==2021.1006" + }, "markdown-it-py": { "hashes": [ "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", @@ -481,6 +506,14 @@ "markers": "python_full_version >= '3.8.0'", "version": "==14.2.0" }, + "toml": { + "hashes": [ + "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", + "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", + "version": "==0.10.2" + }, "twine": { "hashes": [ "sha256:418ebf08ccda9a8caaebe414433b0ba5e25eb5e4a927667122fbe8f829f985d8", diff --git a/pyproject.toml b/pyproject.toml index 603a60b..89fb4cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,16 +2,26 @@ requires = ["setuptools>=68", "wheel"] build-backend = "setuptools.build_meta" +[bumpver] +current_version = "0.1.0" +version_pattern = "MAJOR.MINOR.PATCH" + + +[bumpver.file_patterns] +"pyproject.toml" = [ + 'version = "{version}"', +] + [project] name = "emojiguessr" -version = "0.0.1" +version = "0.1.0" description = "A tiny emoji guessing game" readme = "README.md" requires-python = ">=3.9" authors = [ { name = "Team Saffron"} ] -license = { text = "MIT" } +license = { text = "GNU GENERAL PUBLIC LICENSE" } dependencies = [] [project.urls] From 0556c0cac031d00938866caef4a18e6f50f0f997 Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:45:39 -0500 Subject: [PATCH 19/28] updated CI / CD workflows --- .github/workflows/build.yaml | 21 ++------------------- .github/workflows/deliver.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/deliver.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 04f3b7a..cf4f6eb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -name: CI / CD +name: CI on: [pull_request] jobs: build: @@ -20,21 +20,4 @@ jobs: run: | pipenv install pytest pipenv --venv - pipenv run python -m pytest - # deliver: - # needs: [build] - # runs-on: ubuntu-latest - # timeout-minutes: 5 - # steps: - # - uses: actions/checkout@v4 - # - name: Install Python, pipenv and Pipfile packages - # uses: kojoru/prepare-pipenv@v1 - # - name: Build package - # run: | - # pipenv install build - # pipenv run python -m build . - # - name: Publish to PyPI test server - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # password: ${{ secrets.TEST_PYPI_API_TOKEN }} - # repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + pipenv run python -m pytest \ No newline at end of file diff --git a/.github/workflows/deliver.yaml b/.github/workflows/deliver.yaml new file mode 100644 index 0000000..18d3476 --- /dev/null +++ b/.github/workflows/deliver.yaml @@ -0,0 +1,27 @@ +name: CD +on: + push: + branches: + - main +jobs: + deliver: + # needs: [build] + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + - name: Install Python, pipenv and Pipfile packages + uses: kojoru/prepare-pipenv@v1 + - name: Install bumpver and bump + run: | + pipenv install bumpver + bumpver update -p + - name: Build package + run: | + pipenv install build + pipenv run python -m build . + - name: Publish to PyPI test server + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file From 2eae4b108f226d5022afc307e67cddff779c8b66 Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:51:08 -0500 Subject: [PATCH 20/28] deliver workflow fix --- .github/workflows/deliver.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deliver.yaml b/.github/workflows/deliver.yaml index 18d3476..8aa3b7c 100644 --- a/.github/workflows/deliver.yaml +++ b/.github/workflows/deliver.yaml @@ -15,7 +15,7 @@ jobs: - name: Install bumpver and bump run: | pipenv install bumpver - bumpver update -p + pipenv run bumpver update -p - name: Build package run: | pipenv install build From 101a8cddcc27bd1753dbc22f8cc91215fddb8d4e Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:52:40 -0500 Subject: [PATCH 21/28] update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7ebc4af..725bb94 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ [![](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/build.yaml/badge.svg)](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/build.yaml) +[![](https://gitlab.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/deliver.yaml/badge.svg)](https://gitlab.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/deliver.yaml) + Link to PyPI: []() EmojiGuessr is a Python package that turns emoji strings into quick guessing games. Pick a theme, get an emoji clue and guess the name! From 8baa0baec0deab98acb57be8dfcdcc8cfa8d9af9 Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:53:09 -0500 Subject: [PATCH 22/28] again., --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 725bb94..ab980e2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/build.yaml/badge.svg)](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/build.yaml) -[![](https://gitlab.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/deliver.yaml/badge.svg)](https://gitlab.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/deliver.yaml) +[![](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/deliver.yaml/badge.svg)](https://github.com/swe-students-fall2025/3-python-package-team_saffron/actions/workflows/deliver.yaml) Link to PyPI: []() From 9530d7ea59b26fb3015d8a64f53c94a0a38774ed Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 22:55:11 -0500 Subject: [PATCH 23/28] maybe fix upload? --- .github/workflows/deliver.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deliver.yaml b/.github/workflows/deliver.yaml index 8aa3b7c..8e0bf47 100644 --- a/.github/workflows/deliver.yaml +++ b/.github/workflows/deliver.yaml @@ -24,4 +24,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + repository-url: https://test.pypi.org/simple/ \ No newline at end of file From d9564814be9c2eefaf9d6660723f5633b37894fc Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 23:08:40 -0500 Subject: [PATCH 24/28] it works on my machine.. --- .github/workflows/deliver.yaml | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deliver.yaml b/.github/workflows/deliver.yaml index 8e0bf47..8aa3b7c 100644 --- a/.github/workflows/deliver.yaml +++ b/.github/workflows/deliver.yaml @@ -24,4 +24,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository-url: https://test.pypi.org/simple/ \ No newline at end of file + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 89fb4cd..36f54ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=68", "wheel"] build-backend = "setuptools.build_meta" [bumpver] -current_version = "0.1.0" +current_version = "0.3.0" version_pattern = "MAJOR.MINOR.PATCH" @@ -14,7 +14,7 @@ version_pattern = "MAJOR.MINOR.PATCH" [project] name = "emojiguessr" -version = "0.1.0" +version = "0.3.0" description = "A tiny emoji guessing game" readme = "README.md" requires-python = ">=3.9" From d6622fe36f8b1ee7fd193b8b02e324888e7c75fb Mon Sep 17 00:00:00 2001 From: SnazzyBeatle115 Date: Tue, 4 Nov 2025 23:13:47 -0500 Subject: [PATCH 25/28] no more autobump --- .github/workflows/deliver.yaml | 9 +++++---- pyproject.toml | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deliver.yaml b/.github/workflows/deliver.yaml index 8aa3b7c..ed6b5c9 100644 --- a/.github/workflows/deliver.yaml +++ b/.github/workflows/deliver.yaml @@ -12,10 +12,11 @@ jobs: - uses: actions/checkout@v4 - name: Install Python, pipenv and Pipfile packages uses: kojoru/prepare-pipenv@v1 - - name: Install bumpver and bump - run: | - pipenv install bumpver - pipenv run bumpver update -p + # you gotta do it manually bud, im not making it commit the new version number + # - name: Install bumpver and bump + # run: | + # pipenv install bumpver + # pipenv run bumpver update -p - name: Build package run: | pipenv install build diff --git a/pyproject.toml b/pyproject.toml index 36f54ce..3b07c48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=68", "wheel"] build-backend = "setuptools.build_meta" [bumpver] -current_version = "0.3.0" +current_version = "0.3.2" version_pattern = "MAJOR.MINOR.PATCH" @@ -14,7 +14,7 @@ version_pattern = "MAJOR.MINOR.PATCH" [project] name = "emojiguessr" -version = "0.3.0" +version = "0.3.2" description = "A tiny emoji guessing game" readme = "README.md" requires-python = ">=3.9" From 8de3e3998a457a97011cd54cb1d6106ffc901431 Mon Sep 17 00:00:00 2001 From: ll5373128 Date: Wed, 5 Nov 2025 06:20:41 +0100 Subject: [PATCH 26/28] Create test_main.py --- tests/test_main.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/test_main.py diff --git a/tests/test_main.py b/tests/test_main.py new file mode 100644 index 0000000..5871ed8 --- /dev/null +++ b/tests/test_main.py @@ -0,0 +1 @@ +import pytest From c45e3a94ca1aadbd57a15dff34b8f00f78dd0297 Mon Sep 17 00:00:00 2001 From: ll5373128 Date: Wed, 5 Nov 2025 07:58:26 +0100 Subject: [PATCH 27/28] Update __main__.py --- src/emojiguessr/__main__.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/emojiguessr/__main__.py b/src/emojiguessr/__main__.py index 7058863..c9a813e 100644 --- a/src/emojiguessr/__main__.py +++ b/src/emojiguessr/__main__.py @@ -3,20 +3,20 @@ from emojiguessr.data import _EMOJI_BANK -def run_quiz(num_questions, theme, case_sensitive, allow_partial, max_attempts): +def run_quiz(num_questions, theme, case_sensitive, allow_partial, max_attempts, input_fn = input, output_fn = print): s = 0 for i in range(1, num_questions + 1): item = make_quiz_item(theme=theme) clue = item["clue"] answer = item["answer"] - print(f"\nQuestion {i}/{num_questions}") - print(f"Theme: {item['theme']}") - print(f"Emoji: {clue}") + output_fn(f"\nQuestion {i}/{num_questions}") + output_fn(f"Theme: {item['theme']}") + output_fn(f"Emoji: {clue}") attempts_left = max_attempts while attempts_left > 0: - guess = input("Your guess: ") + guess = input_fn("Your guess: ") is_right = check_answer( correct=answer, @@ -28,25 +28,25 @@ def run_quiz(num_questions, theme, case_sensitive, allow_partial, max_attempts): s = score(s, correct=is_right) if is_right: - print("โœ… Correct!") + output_fn("โœ… Correct!") break else: attempts_left -= 1 if attempts_left > 0: - print(f"โŒ Wrong! {attempts_left} attempts left.") + output_fn(f"โŒ Wrong! {attempts_left} attempts left.") else: - print(f"โŒ Nope โ€” it was: {answer}") + output_fn(f"โŒ Nope โ€” it was: {answer}") - print(f"\nFinal score: {s}/{num_questions}") + output_fn(f"\nFinal score: {s}/{num_questions}") -def list_themes(): - print("Available themes:") +def list_themes(output_fn = print): + output_fn("Available themes:") for theme in sorted(_EMOJI_BANK.keys()): - print(f" - {theme}") + output_fn(f" - {theme}") -def list_commands(): +def list_commands(output_fn = print): print("Available commands:") print(" --num-questions, -n : Number of questions to ask (default: 3)") print(" --theme, -t : Emoji theme to use (default: food)") From 6d4cea727471e12574259c70e9ed7be5121d3c0b Mon Sep 17 00:00:00 2001 From: ll5373128 Date: Wed, 5 Nov 2025 08:01:55 +0100 Subject: [PATCH 28/28] Update __main__.py --- src/emojiguessr/__main__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/emojiguessr/__main__.py b/src/emojiguessr/__main__.py index c9a813e..7565c7c 100644 --- a/src/emojiguessr/__main__.py +++ b/src/emojiguessr/__main__.py @@ -47,16 +47,16 @@ def list_themes(output_fn = print): def list_commands(output_fn = print): - print("Available commands:") - print(" --num-questions, -n : Number of questions to ask (default: 3)") - print(" --theme, -t : Emoji theme to use (default: food)") - print(" --case-sensitive : Make answers case-sensitive (default: off)") - print(" --no-partial : Disable partial matches") - print( + output_fn("Available commands:") + output_fn(" --num-questions, -n : Number of questions to ask (default: 3)") + output_fn(" --theme, -t : Emoji theme to use (default: food)") + output_fn(" --case-sensitive : Make answers case-sensitive (default: off)") + output_fn(" --no-partial : Disable partial matches") + output_fn( " --max-attempts, -a : Maximum number of attempts per question (default: 1)" ) - print(" --list-themes, -lt : List available themes and exit") - print(" --list-commands, -lc : List available commands and exit") + output_fn(" --list-themes, -lt : List available themes and exit") + output_fn(" --list-commands, -lc : List available commands and exit") def main():