[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-418997-105":59,"doc-detail-418997-en":134,"doc-similar-418997":166},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":127,"head_meta":129,"extra_data":131,"updated_unix":133},105,"en","translating-short-form-python-exercises-to-other-programming-languages-using-diverse-prompting-strategies","Translating short-form Python exercises to other programming languages using diverse prompting strategies","","Life scientists increasingly use programming to automate analyses, improve reproducibility, and enable collaboration, with Python favored for its simplicity and flexibility while compiled languages such as C++ and Rust provide higher efficiency. This study evaluates large language models for semi-automated code translation by converting 559 short-form Python exercises into C++, Rust, Julia, and JavaScript using three prompting strategies and comparing outputs to Python results.",{"@graph":69,"@context":126},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/translating-short-form-python-exercises-to-other-programming-languages-using-diverse-prompting-strategies/418997/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/translating-short-form-python-exercises-to-other-programming-languages-using-diverse-prompting-strategies/418997.png","ImageObject",300,407,{"name":92,"@type":93},"Melati","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-30","2026-09-28",true,{"@type":102,"interactionType":103,"userInteractionCount":34},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118,122],{"name":109,"@type":110,"acceptedAnswer":111},"Why translate short-form Python exercises to other programming languages?","Question",{"text":112,"@type":113},"The study targets scenarios where education or research needs code implemented in a specific language, and it notes that manual translation is effort-intensive.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which large language model and prompting strategies were used?",{"text":117,"@type":113},"GPT-4 was used to translate 559 Python exercises, comparing three strategies: instructions only, code only, and a combination of both.",{"name":119,"@type":110,"acceptedAnswer":120},"How successful was the translation for different target languages?",{"text":121,"@type":113},"Success rates differed by prompting strategy, with the highest overall rates reported for Rust (99.5%), followed by JavaScript (98.9%), C++ (97.9%), and Julia (95.0%).",{"name":123,"@type":110,"acceptedAnswer":124},"What do the study’s conclusions and contributions focus on?",{"text":125,"@type":113},"LLMs can effectively translate small-scale programming exercises, reducing manual rewriting, and the authors manually translated any exercises not translated successfully and made translations freely available.","https://schema.org",{"og:url":83,"og:type":128,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":130,"canonical":83},"index,follow",{"doc_id":132,"site_id":62},418997,1790849168,{"code":4,"msg":5,"data":135},{"doc_id":132,"user_id":136,"nickname":92,"user_avatar":137,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":138,"file_id":139,"file_url":140,"file_type":141,"file_size":142,"view_count":34,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":52,"language":143,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":144,"faqs":145,"seo_title":146,"seo_description":67,"update_tm":147,"read_time":148,"preview_page_count":19,"preview_urls":149},962085570644,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","GigaScience, 2025, 14, 1–10  \nDOI: 10.1093/gigascience/giaf149  \nAdvance access publication date: 8 December 2025 Research  \nTranslating short-form Python exercises to other programming languages using diverse prompting strategies  \nStephen R. Piccolo 1 , * and Harlan P. Stevens 1,2  \n1 Department of Biology, Brigham Young University, Provo, UT 84602, USA  \n2 Harvard Medical School, Harvard University, Boston, MA 02115, USA  \n∗ Correspondence address. Stephen R. Piccolo, Department of Biology, Brigham Young University, Provo, UT 84602, USA. E-mail: [stephen_piccolo@byu.edu](stephen_piccolo@byu.edu)  \nAbstract  \nBackground: With the increasing complexity and quantity of experimental and observational data, life scientists rely on programming to automate analyses, enhance reproducibility, and facilitate collaboration. Scripting languages like Python are often favored for their simplicity and flexibility, enabling researchers to focus primarily on high-level tasks. Compiled languages such as C++ and Rust offer greater efficiency, making them preferable for intensive or repeated computations. In educational settings, instructors may wish to teach both types of languages and thus translate content from one programming language to another. In research contexts, researchers may wish to implement their ideas in one language before translating the code to another. However, translating between programming languages requires significant effort, prompting our interest in using large language models (LLMs) for semi-automated code translation.  \nResults: This study explores the use of an LLM (GPT-4) to translate 559 short-form programming exercises from Python into C++, Rust, Julia, and JavaScript. We used 3 prompting strategies—instructions only, code only, or both combined—and compared the translated code’s output against the Python code’s output. Translation success differed considerably by prompting strategy, and at least one of the strategies tested was effective for nearly every exercise. The highest overall success rate occurred for Rust (99.5%), followed by JavaScript (98.9%), C++ (97.9%), and Julia (95.0%) .  \nConclusions: Our findings demonstrate that LLMs can effectively translate small-scale programming exercises between languages, reducing the need for manual rewriting. To support education and research, we have manually translated all exercises that were not translated successfully through automation, and we have made our translations freely available.  \nKeywords: bioinformatics education, translating programming languages, large language models, Python programming language, Rust programming language, automated code translation  \nIntroduction  \nDue to the growing scale and complexity of biological data, computer-programming skills have become essential for modern life scientists [1] . Researchers use programming to automate tasks such as processing genomic datasets, running simulations, and creating visualizations. Writing code to carry out these tasks promotes reproducibility, enabling other scientists to scrutinize, validate, and extend computational workflows [2] . In turn, reproducibility fosters collaboration and accelerates scientific discovery.  \nWhen choosing a programming language, life scientists often consider both their own expertise and the demands ofthe task [3] . For high-level data analyses, scripting languages like Python and R are widely used [3–5] . These languages make it relatively easy to perform tasks such as importing and exporting data, performing statistical analyses, training machine learning models, and generating graphics [6 , 7] . Because such analyses may be specific to a particular study and run only once, speed and resource efficiency are not always priorities. In contrast, tasks that are repeated many times, are computationally intensive, or require fine-grained control over memory often benefit from implementation in compiled languages like C++ or Rust [8] . For example, Burrows-Wheeler  \nAli","cbCaighJ9PtclbEo","https://ap.wps.com/l/cbCaighJ9PtclbEo","pdf",1177893,"English","# Abstract\n# Background\n# Results\n## Translation success by prompting strategy\n# Conclusions\n# Introduction\n## Need for programming in life science\n## Choosing scripting versus compiled languages\n## Educational implications","[{\"question\":\"Why translate short-form Python exercises to other programming languages?\",\"answer\":\"The study targets scenarios where education or research needs code implemented in a specific language, and it notes that manual translation is effort-intensive.\"},{\"question\":\"Which large language model and prompting strategies were used?\",\"answer\":\"GPT-4 was used to translate 559 Python exercises, comparing three strategies: instructions only, code only, and a combination of both.\"},{\"question\":\"How successful was the translation for different target languages?\",\"answer\":\"Success rates differed by prompting strategy, with the highest overall rates reported for Rust (99.5%), followed by JavaScript (98.9%), C++ (97.9%), and Julia (95.0%).\"},{\"question\":\"What do the study’s conclusions and contributions focus on?\",\"answer\":\"LLMs can effectively translate small-scale programming exercises, reducing manual rewriting, and the authors manually translated any exercises not translated successfully and made translations freely available.\"}]","Translating short-form Python exercises to other programming languages using diverse prompting strategies | PDF",1790615219,25,[150,154,158,162],{"page_no":8,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/1ec0d027dd4a190c5c3ac5fce008de62.webp",983,1291,{"page_no":14,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/a1aaf7432ec69bff809c02df6c17d492.webp",982,1290,{"page_no":81,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/17d12619b79748806dce2454a7051f77.webp",981,1289,{"page_no":19,"url":163,"width":164,"height":165},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/75ef63cbf1fd849134241e8b1a3f36fb.webp",980,1287,{"list":167,"token":66},[168,174,180,186,193,200,207,214,221,228],{"doc_id":169,"doc_title":170,"file_type":141,"home_preview_img_url":171,"slug":172,"view_count":24,"category_name":30,"create_tm":173},685639,"Programming Languages and Applications - Course Topic - May 2022","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999084333/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=sECblNCC6ObjCGKxgOuHlnfvNjE%3D","programming-languages-and-applications-course-topic-may-2022",1794016118,{"doc_id":175,"doc_title":176,"file_type":141,"home_preview_img_url":177,"slug":178,"view_count":19,"category_name":30,"create_tm":179},685638,"Programming Languages and C++ - Bloomberg Frankfurt March 19, 2019","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999084245/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=1wRdg%2B9XyPxEbnH5Cdl%2FjwJho9A%3D","programming-languages-and-c-bloomberg-frankfurt-march-19-2019",1794016112,{"doc_id":181,"doc_title":182,"file_type":141,"home_preview_img_url":183,"slug":184,"view_count":39,"category_name":30,"create_tm":185},646220,"Programming Reference Manuals - Quick Access Resource","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229971804219/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=tiF%2Fk%2FA%2BRLTjg7xamkzx2P5VT5s%3D","programming-reference-manuals-quick-access-resource",1792753732,{"doc_id":187,"doc_title":188,"file_type":141,"home_preview_img_url":189,"slug":190,"view_count":191,"category_name":30,"create_tm":192},115355,"Claude AI Bible - The Complete Guide to Mastering Claude, Claude Code, Claude Cowork, MCP, AI Agents, Automation & Advanced Prompting","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229831893665/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=oFPva%2B398W9X6VWKEYa0Kk3uFXw%3D","claude-ai-bible-the-complete-guide-to-mastering-claude-claude-code-claude-cowork-mcp-ai-agents-automation-advanced-prompting",913,1785472614,{"doc_id":194,"doc_title":195,"file_type":141,"home_preview_img_url":196,"slug":197,"view_count":198,"category_name":30,"create_tm":199},185,"XNX Universal Transmitter Installation Manual (Complete Guide) [Honeywell Official]","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693710157/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=fx9WGq8CNSC6kpiHkWxpUKPscJc%3D","xnx-universal-transmitter-installation-manual",855,1776135954,{"doc_id":201,"doc_title":202,"file_type":141,"home_preview_img_url":203,"slug":204,"view_count":205,"category_name":30,"create_tm":206},299143,"THE CANDLESTICK TRADING BIBLE - Trading Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229905832418/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=rFImvW%2FZXPvOHQiB4wi%2F8wLHxrg%3D","the-candlestick-trading-bible-trading-guide",804,1789767270,{"doc_id":208,"doc_title":209,"file_type":141,"home_preview_img_url":210,"slug":211,"view_count":212,"category_name":30,"create_tm":213},176,"Free Fire Proxy Server","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693709822/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=4NRZXslJXl39lV5Mx7AiaP7IqHI%3D","free-fire-proxy-server",565,1776135932,{"doc_id":215,"doc_title":216,"file_type":141,"home_preview_img_url":217,"slug":218,"view_count":219,"category_name":30,"create_tm":220},129220,"Operations and Supply Chain Management - Eleventh Edition - Dedicated to students and faculty","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229840674154/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=0hEmfceMoZFVQn30CE3AEsNinnU%3D","operations-and-supply-chain-management-eleventh-edition-dedicated-to-students-and-faculty",498,1786012506,{"doc_id":222,"doc_title":223,"file_type":141,"home_preview_img_url":224,"slug":225,"view_count":226,"category_name":30,"create_tm":227},8566,"Trik Ngonten TikTok dari 0 Sampai FYP","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229696842324/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=HEwghYhE5cz5MyiSFsP2YodGgHA%3D","tiktok-content-tricks-from-0-to-fyp",489,1776338393,{"doc_id":229,"doc_title":230,"file_type":141,"home_preview_img_url":231,"slug":232,"view_count":233,"category_name":30,"create_tm":234},387603,"Building Applications with AI Agents - Multiagent Systems - Designing and Implementing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229916172328/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111879&Signature=PqTBzib%2BZD9g%2BloVL7Ab%2FSksTZ0%3D","building-applications-with-ai-agents-multiagent-systems-designing-and-implementing",454,1790287169]