Python Foundations
Output, input, variables, types and your first functions.
Start from zero and write working Python in your first session. You will print output and shape it with sep and end, read and fix the errors Python gives you, store values in variables, convert text into numbers, ask the user for input, build strings with f-strings, write functions that return results, and read binary, octal and hex. You finish by building small real tools: a receipt line formatter, a unit converter, a tip calculator, a greeting card builder and a self-checkout.
What you will learn
- print()
- input()
- Variables
- Data types
- Type conversion
- f-strings
- Functions
- Reading errors
- Number systems
Lessons
- 1
Your First Program
Print output, shape it with sep= and end=, and read the errors Python gives you.
11 exercises
- 2
Variables and Types
Store and update values, name them well, and learn how types change what operators do.
12 exercises
- 3
Reading Input
Ask the user for values with input(), convert them to numbers, and print results they can read.
8 exercises
- 4
Functions
Package code into reusable functions, indent their bodies, and learn why return beats print.
11 exercises
- 5
Literals, Number Systems and Bits
Write every kind of literal, read binary, octal and hex, and use the bitwise operators on permission flags.
10 exercises
- 6
Putting It Together
Combine variables, conversion, input, f-strings and functions into small tools: a receipt line, a unit converter, a tip calculator, a greeting card and a self-checkout.
7 exercises
How you practice
You practice in the browser and every exercise gives you feedback right away. This course uses these formats:
- Code exercise: 19
- Fix the bug: 13
- Predict the output: 8
- Type the answer: 7
- Fill in the blank: 3
- Multiple choice: 2
- Spot the bug: 2
- Select all that apply: 2
- Match the pairs: 2
- Reorder lines: 1
Aligned to
- Computer Programming and Python Fundamentals
- 1.1Understand fundamental terms and definitions
- 1.2Understand Python's logic and structure
- 1.3Introduce literals and variables into code and use different numeral systems
- 1.4Choose operators and data types adequate to the problem
- 1.5Perform Input/Output console operations
- Software Development Fundamentals
- SDF-FundamentalsFundamental Programming Concepts and Practices
Proto Node Labs is not affiliated with or endorsed by Python Institute and ACM / IEEE-CS / AAAI. Exam names are trademarks of their owners.