Python Basics Python practice

0 / 45 solved
Question 1 of 45 Easy Compute a value

Daily revenue

A store tracks how many units it sold today and the price of each unit.

The variables units_sold and price_per_unit are already defined for you.
Create a variable named revenue that holds the total money earned today (units sold multiplied by the price per unit).

Python 3.13 Python loads when you start

Press Run to see what your code prints, or Submit to check it against every test.

Section 1 of 16

Python Basics

Values, variables, numbers, arithmetic, type conversion, print and f-strings, reading input.

variables and assignmentint, float, str, boolarithmetic operators, //, %, **operator precedencetype() and conversions (int(), float(), str(), round())print() with sep/endf-strings and number formattinginput() and converting input
FAQ

Values, variables, numbers, arithmetic, type conversion, print and f-strings, reading input. Topics: variables and assignment, int, float, str, bool, arithmetic operators, //, %, **, operator precedence, type() and conversions (int(), float(), str(), round()), print() with sep/end, f-strings and number formatting, input() and converting input.

Run shows your output and the example tests. Submit runs every test, including hidden ones, so a hard-coded answer will not pass. Decimals are compared to 6 places and printed output ignores trailing spaces.

Yes, for 5 easy, 2 medium and 1 hard question across the Python Playground. A free account unlocks every question and saves your progress and code.