{"id":24021202,"url":"https://github.com/zipcodecore/python3ex","last_synced_at":"2026-02-10T03:01:54.610Z","repository":{"id":147838217,"uuid":"469777148","full_name":"ZipCodeCore/Python3Ex","owner":"ZipCodeCore","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-14T14:48:14.000Z","size":3163,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T23:03:12.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZipCodeCore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-14T14:48:12.000Z","updated_at":"2022-03-14T14:48:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"fad8e06a-0e32-443a-9cac-48c2df88b5b4","html_url":"https://github.com/ZipCodeCore/Python3Ex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZipCodeCore/Python3Ex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2FPython3Ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2FPython3Ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2FPython3Ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2FPython3Ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZipCodeCore","download_url":"https://codeload.github.com/ZipCodeCore/Python3Ex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2FPython3Ex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270385013,"owners_count":24574537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-08T12:39:55.740Z","updated_at":"2026-02-10T03:01:54.544Z","avatar_url":"https://github.com/ZipCodeCore.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Part 3\n\n## Accompanying resources\n* Slide deck:  https://zipcoder.github.io/curriculum-assets/lectures/python/conditional-operators/\n\n## Exercise 1\n\nFor this exercise we will be importing some existing functionality from the standard library. \nThe [random module](https://docs.python.org/3.8/library/random.html#module-random) gives us the ability to generate pseudo-random numbers.\n\nTry the code below in the Python interpreter.\n```python\nfrom random import randrange\nprint(randrange(10))\n# 7 \nprint(randrange(10))\n# 1\nprint(randrange(10))\n# 5\nprint(randrange(10))\n# 6\nprint(randrange(10))\n# 5\n```\n\n## Exercise 2\n\nCreate a program called *higher_or_lower.py*\n\nThe program must meet the following criteria.\n\n* A function that asks the user to provide a number between 0 and 10.\n* A function that returns a random number between 1 and 10.\n* A function that evaluates the randomly generated number against the user's guess.\n* At the end, the program must output the following:\n    * The random number that was generated.\n    * The user's guess.\n    * An indication if the user guess correctly or if the user's guess was too high/too low.\n\n![higher_or_lower_demo](higher_or_lower_demo.gif)\n\n## Exercise 3 \n\nCopy the *greet.py* program from part 2 and name it *multilingual_greeter.py*\n\nExtend the program so that it meets the following requirements.\n\n* Add a function called *language_input* that gives the user an option to choose 1 of at least 3 languages.\n* Ask the user for his name in the chosen language.\n* Greet the user in the chosen language.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzipcodecore%2Fpython3ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzipcodecore%2Fpython3ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzipcodecore%2Fpython3ex/lists"}