Skip to content

Commit 2ee402b

Browse files
Add files via upload
1 parent 32c3a0c commit 2ee402b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pyhton_study_1/page15/script.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Assign 2 to the apple_price variable
2+
apple_price = 2
3+
4+
# Assign 5 to the count variable
5+
count = 5
6+
7+
# Assign the result of apple_price * the count variable to the total_price variable
8+
9+
total_price = apple_price * count
10+
# By using the count variable, print 'You will buy .. apples'
11+
print("You will buy " + str(count) + " apples")
12+
13+
# By using the total_price variable, print 'The total price is .. dollars'
14+
print("The total price is " + str(total_price) + " dollars")
15+

0 commit comments

Comments
 (0)