Challenge: Declaring & Using Constants
Swipe to start coding
You're building a subscription management system for a new streaming service. The program calculates the totalCost of the subscription based on the number of devices the user has (userDevice) and a fixed monthly price:
Declare a constant called MONTHLY_PRICE which stores the value 9.99.
Note
In most programming languages, constants are typically written in all uppercase letters, with words separated by underscores (
_). This naming convention helps differentiate constants from regular variables and makes them easily recognizable in the code.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 1.33
Challenge: Declaring & Using Constants
Свайпніть щоб показати меню
Swipe to start coding
You're building a subscription management system for a new streaming service. The program calculates the totalCost of the subscription based on the number of devices the user has (userDevice) and a fixed monthly price:
Declare a constant called MONTHLY_PRICE which stores the value 9.99.
Note
In most programming languages, constants are typically written in all uppercase letters, with words separated by underscores (
_). This naming convention helps differentiate constants from regular variables and makes them easily recognizable in the code.
Рішення
Дякуємо за ваш відгук!
single