Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
824f921
commit 54e2cde
Showing
101 changed files
with
473 additions
and
461 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
print('Hello World!') |
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,3 @@ | ||
from microbit import display | ||
|
||
display.scroll('Hello World!') |
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 @@ | ||
from microbit import display, Image | ||
from speech import say | ||
|
||
SPEED = 95 | ||
|
||
display.show(Image.SURPRISED) | ||
say('Hello World!', speed=SPEED) | ||
display.show(Image.HAPPY) |
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,14 @@ | ||
# We introduce the concept of a variable to which | ||
# we reserve a little box in our computer's memory | ||
# to hold the string which we are going to type | ||
# when prompted to provide our favorite food and | ||
# favorite drink | ||
favorite_food = input('What is your favorite food? ') | ||
favorite_drink = input('What is your favorite drink? ') | ||
|
||
# Here we use MicroPython's built-in format method | ||
# which is part of the string module's Formatter | ||
# class as the following line of code will provide | ||
# a response back based to the console based on | ||
# our two variables which we inputted above | ||
print('I love {0} and {1} as well!'.format(favorite_food, favorite_drink)) |
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 @@ | ||
candy_title = input('What is the candy title? ') | ||
candy_flavor = input('What is the candy flavor? ') | ||
|
||
print('It shall be called {0} {1}!'.format(candy_title, candy_flavor)) |
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 @@ | ||
from microbit import display, Image | ||
from speech import say | ||
|
||
SPEED = 95 | ||
|
||
candy_title = input('What is the candy title? ') | ||
candy_flavor = input('What is the candy flavor? ') | ||
|
||
display.show(Image.SURPRISED) | ||
print('It shall be called {0} {1}!'.format(candy_title, candy_flavor)) | ||
say('It shall be called {0} {1}!'.format(candy_title, candy_flavor)) | ||
display.show(Image.HAPPY) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
11 changes: 2 additions & 9 deletions
11
Part_28_Mathematical_Operations/main.py → ...taTypes_+_Numbers/0005_calculator_repl.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 |
---|---|---|
@@ -1,22 +1,15 @@ | ||
print(5 * (9 + 5) / 3 - 3) | ||
|
||
# First: (9 + 5) = 14 | ||
# Second: 5 * 14 = 70 | ||
# Third: 70 / 3 = 23.33334 | ||
# Fourth: 23.33334 - 3 = 20.33334 | ||
|
||
|
||
first_number = int(input('Enter First Number: ')) | ||
second_number = int(input('Enter Second Number: ')) | ||
|
||
|
||
my_addition = first_number + second_number | ||
my_subtraction = first_number - second_number | ||
my_multiplication = first_number * second_number | ||
my_division = first_number / second_number | ||
|
||
|
||
print('Addition = {0}'.format(my_addition)) | ||
print('Subtraction = {0}'.format(my_subtraction)) | ||
print('Multiplication = {0}'.format(my_multiplication)) | ||
print('Division = {0}'.format(my_division)) | ||
print(type(my_division)) | ||
|
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 @@ | ||
from microbit import display | ||
|
||
length = float(input('Enter length: ')) | ||
width = float(input('Enter width: ')) | ||
|
||
square_footage = length * width | ||
|
||
print('Your room size is {0} square feet.'.format(square_footage)) | ||
display.scroll('Your room size is {0} square feet.'.format(square_footage)) |
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,15 @@ | ||
from microbit import display, Image | ||
from speech import say | ||
|
||
SPEED = 95 | ||
|
||
player_score = int(input('Enter Player Score: ')) | ||
player_score_bonus = int(input('Enter Player Score Bonus: ')) | ||
player_has_golden_ticket = True | ||
|
||
player_final_score = player_score + player_score_bonus | ||
|
||
display.show(Image.SURPRISED) | ||
print('Player final score is {0} and has golden ticket is {1}.'.format(player_final_score, player_has_golden_ticket)) | ||
say('Player final score is {0} and has golden ticket is {1}.'.format(player_final_score, player_has_golden_ticket)) | ||
display.show(Image.HAPPY) |
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,15 @@ | ||
from microbit import display, Image | ||
from speech import say | ||
|
||
SPEED = 95 | ||
|
||
noun = input('Enter Noun: ') | ||
verb = input('Enter Verb: ') | ||
miles = int(input('Enter Miles: ')) | ||
|
||
display.show(Image.SURPRISED) | ||
print('My {0} are {1}!'.format(noun, verb)) | ||
say('My {0} are {1}!'.format(noun, verb)) | ||
print('It traveled {0} miles!'.format(miles)) | ||
say('It traveled {0} miles!'.format(miles)) | ||
display.show(Image.HAPPY) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.