Learn Backend Development Part-Time, Online
Lead AI Strategy with UCSB's Agentic AI Program — Microsoft Certified
Overview
Google, IBM & Meta Certificates – 40% Off
One plan covers every Professional Certificate on Coursera.
Unlock All Certificates
Learn how to pass arguments to Python programs from the command line and utilize them within your code in this beginner-friendly tutorial video. Explore the argparse module, create practical examples, and apply command line arguments to personalize a Rock Paper Scissors game. Discover how to refactor code for customized output and gain hands-on experience with f-strings. Follow along as the instructor guides you through the process of implementing and playing the game with your newly acquired command line argument skills.
Syllabus
Intro
Welcome
Getting Started
argparse module
Example 1
Passing an argument at the command line
Example 2
Personalizing Rock Paper Scissors
Quick f-String update
Applying command line arguments to RPS
Refactoring to personalize output
Playing the game
Taught by
Dave Gray