-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add STEAMforVietNam 2022-2023-VEX-IQ-Intro-Course Python-Prep Lesson-…
…1 programs
- Loading branch information
1 parent
c738036
commit d44c33f
Showing
11 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/00.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name = "Autopilot" | ||
age = 12 | ||
print("Hello Robot") | ||
print("Hello " + name) | ||
print(age) | ||
print(name, age) |
4 changes: 4 additions & 0 deletions
4
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/01.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name = "Autopilot" | ||
age = 12 | ||
weight = 2.5 | ||
is_robot = True |
6 changes: 6 additions & 0 deletions
6
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/02.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
position_A = 12 | ||
name = 'motor A' | ||
info = name + ' = ' + str(position_A) | ||
print(info) | ||
print('A= ' + str(position_A)) | ||
print(len(name)) |
5 changes: 5 additions & 0 deletions
5
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/03.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
position_A = 12 | ||
name = 'motor A' | ||
info = name + str(position_A) | ||
print(info) | ||
print('A= ' + str(position_A)) |
12 changes: 12 additions & 0 deletions
12
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/04.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name = 'motor A' | ||
info = """ | ||
Free speed: 120rpm | ||
Output power: 1.4W | ||
""" | ||
print(name) | ||
print(info) | ||
|
||
print(""" | ||
I like | ||
your drawing | ||
""" + 'because it is nice') |
9 changes: 9 additions & 0 deletions
9
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/05.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
a = 18 | ||
b = 6 | ||
print(a + b) | ||
print(a - b) | ||
print(a * b) | ||
print(a / b) | ||
print(a % b) | ||
print(a // b) | ||
print(a ** b) |
8 changes: 8 additions & 0 deletions
8
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/06.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
a = 17 | ||
b = 6 | ||
print(a == b) | ||
print(a != b) | ||
print(a > b) | ||
print(a < b) | ||
print(a >= b) | ||
print(a <= b) |
5 changes: 5 additions & 0 deletions
5
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/07.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distance = 30 | ||
if distance < 20: | ||
print('Obstacle ahead!!!') | ||
else: | ||
print('Safe') |
11 changes: 11 additions & 0 deletions
11
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/08.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
distance = 10 | ||
speed = 10 | ||
if distance < 10: | ||
speed = 5 | ||
print('Move slowly') | ||
elif distance < 20: | ||
speed = 10 | ||
print('Move at right speed') | ||
else: | ||
speed = 20 | ||
print('Move fast') |
6 changes: 6 additions & 0 deletions
6
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/09.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
distance = 10 | ||
speed = 10 | ||
if (distance < 10) and (speed > 20): | ||
print('Robot will crash huhu') | ||
else: | ||
print('Robot is still safe') |
4 changes: 4 additions & 0 deletions
4
...ity/orgs/STEAMforVietNam/courses/2022-2023-VEX-IQ-Intro-Course/Python-Prep/Lesson-1/10.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
number_list = [0.2, 0.6, 0.3] | ||
print(number_list) | ||
print(number_list[1]) | ||
print(number_list[-1]) |