191k views
2 votes
how to tell python to store the number 7 in a variable called quantity and how to tell python to store the number 14.99 in a variable called price

User Taglius
by
7.7k points

1 Answer

2 votes

Answer: In Python, you can store values in variables using the assignment operator "=" followed by the value you want to store. Here's how you can store the number 7 in a variable called "quantity" and the number 14.99 in a variable called "price":

# Storing the number 7 in a variable called "quantity"

quantity = 7

# Storing the number 14.99 in a variable called "price"

price = 14.99

Now, the value 7 is stored in the variable "quantity," and the value 14.99 is stored in the variable "price." You can use these variables throughout your code to perform calculations, display information, or manipulate the values as needed.

User Alexcasalboni
by
7.9k points

No related questions found