We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 517ca9e commit ef743d9Copy full SHA for ef743d9
"if" statements/main.py
@@ -0,0 +1,53 @@
1
+##
2
+# "If" Statements Lecture
3
4
+
5
+# -*- coding: utf-8 -*-
6
7
8
+# if condition:
9
+# Action
10
11
+click = False
12
13
+Like = 0
14
15
+click = True
16
17
+if click == True:
18
+ Like = Like + 1
19
+ click = False
20
21
+# print(Like)
22
23
+Temperature = 20
24
+Thermo = 15
25
+# print(Thermo)
26
+if Temperature <= 15:
27
+ Thermo = Thermo + 5
28
29
30
31
+if Temperature >= 20:
32
+ Thermo = Thermo - 3
33
34
35
36
+Time = "Day"
37
+Sleepy = False
38
+Pajamas = "Unknown"
39
+InBed = True
40
41
+print(Pajamas)
42
43
+if Time == "Night" or Sleepy == True:
44
+ Pajamas = "On"
45
46
+elif Time == "Morning":
47
48
49
+else:
50
+ Pajamas = "Off"
51
52
53
0 commit comments