-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomeworkday1.py
More file actions
50 lines (41 loc) · 970 Bytes
/
Copy pathhomeworkday1.py
File metadata and controls
50 lines (41 loc) · 970 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
weather = "sunny"
if weather == "sunny":
print("Wear sunglasses!")
else:
print("Take an umbrella!")
user_mood = input("How are you feeling today?")
if user_mood == "happy":
print("That's great to hear!")
elif user_mood == "sad":
print("I hope your day gets better!")
pi_value = 3.14
user_age = 25
user_location = "New York"
max_limit = 1000
variable_a = ("Hello, World!") #string datatype
print(variable_a)
print(type("variable_a"))
variable_b = 23 #integers
print(variable_b)
print(type("variable_b"))
variable_c = 3.14 #floats
print(variable_c)
print(type("variable_c"))
variable_d = True #boolean variable
print(variable_d)
print(type("variable_d"))
# units are in dollars
ice_cream = 3
chocolate_cake = 12
apple_pie = 5
total_cost = ice_cream + chocolate_cake + apple_pie
print(total_cost)
savings = 10000.00
interests = 0.07
expected_outcome = (savings*interests) + savings
print(expected_outcome)
a = 5
b = 3
a, b = b, a
print(a)
print(b)