Skip to content

Commit

Permalink
Added files for 2nd course
Browse files Browse the repository at this point in the history
  • Loading branch information
mytechnotalent committed Jun 15, 2021
1 parent 824f921 commit 54e2cde
Show file tree
Hide file tree
Showing 101 changed files with 473 additions and 461 deletions.
1 change: 0 additions & 1 deletion Part_12_Hello_World/main.py

This file was deleted.

2 changes: 0 additions & 2 deletions Part_13_Debugging_Hello_World/main.py

This file was deleted.

2 changes: 0 additions & 2 deletions Part_14_IO/main.py

This file was deleted.

3 changes: 0 additions & 3 deletions Part_15_Debugging_IO/main.py

This file was deleted.

1 change: 1 addition & 0 deletions Part_1_Basic_IO/0001_hello_world_repl.py
@@ -0,0 +1 @@
print('Hello World!')
3 changes: 3 additions & 0 deletions Part_1_Basic_IO/0002_hello_world.py
@@ -0,0 +1,3 @@
from microbit import display

display.scroll('Hello World!')
8 changes: 8 additions & 0 deletions Part_1_Basic_IO/0003_hello_world_talk.py
@@ -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)
14 changes: 14 additions & 0 deletions Part_1_Basic_IO/0004_basic_io_repl.py
@@ -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))
4 changes: 4 additions & 0 deletions Part_1_Basic_IO/p_0001_candy_name_generator.py
@@ -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))
12 changes: 12 additions & 0 deletions Part_1_Basic_IO/p_0001_candy_name_generator_ec.py
@@ -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)
4 changes: 0 additions & 4 deletions Part_21_Integer_Primitive_Data_Type/main.py

This file was deleted.

4 changes: 0 additions & 4 deletions Part_22_Float_Primitive_Data_Type/main.py

This file was deleted.

3 changes: 0 additions & 3 deletions Part_23_String_Primitive_Data_Type/main.py

This file was deleted.

14 changes: 0 additions & 14 deletions Part_24_Bool_Primitive_Data_Type/main.py

This file was deleted.

5 changes: 0 additions & 5 deletions Part_25_Bytes_Primitive_Data_Type/main.py

This file was deleted.

35 changes: 0 additions & 35 deletions Part_26_Bytearray_Primitive_Data_Type/main.py

This file was deleted.

25 changes: 0 additions & 25 deletions Part_27_Variables/main.py

This file was deleted.

13 changes: 0 additions & 13 deletions Part_29_Conditional_Logic/0002_heads_or_tails_game.py

This file was deleted.

@@ -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))

9 changes: 9 additions & 0 deletions Part_2_DataTypes_+_Numbers/0006_square_footage_repl.py
@@ -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))
15 changes: 15 additions & 0 deletions Part_2_DataTypes_+_Numbers/0007_final_score_talk_repl.py
@@ -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)
15 changes: 15 additions & 0 deletions Part_2_DataTypes_+_Numbers/p_0002_talking_madlibs.py
@@ -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)
70 changes: 0 additions & 70 deletions Part_32_Classes/0007_escape_room/main.py

This file was deleted.

0 comments on commit 54e2cde

Please sign in to comment.