-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask_2.py
More file actions
30 lines (25 loc) · 912 Bytes
/
Task_2.py
File metadata and controls
30 lines (25 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 1. Declare some descriptive variables
cable_count = 5 # number of Ethernet cables
tutorial_rating = 4.20 # score out of 5
reviewer_name = "John"
is_admin_user = True # True means this user is an admin
# 2. Show the original values
print("Original values:")
print("Cables:", cable_count)
print("Rating:", tutorial_rating)
print("Name:", reviewer_name)
print("Admin user:", is_admin_user)
# 3. Change a couple of them
cable_count = cable_count + 3 # bought three more cables
tutorial_rating = 4.50 # updated the rating
# 4. Show the new values
print("\nAfter update:") # '\n' is a line break
print("Cables:", cable_count)
print("Rating:", tutorial_rating)
# 5. A multi-line string using triple quotes
detailed_review = """
Python basics are so easy!
Variables can hold numbers, text, or True/False values.
"""
print("\nDetailed review:")
print(detailed_review)