diff --git a/lib/tasks/project_components/hello_world_example/emoji.py b/lib/tasks/project_components/hello_world_example/emoji.py deleted file mode 100644 index 13dae5d09..000000000 --- a/lib/tasks/project_components/hello_world_example/emoji.py +++ /dev/null @@ -1,27 +0,0 @@ -# Emoji variables to use in your project - -world = '🌍🌎🌏' -python = '🐍⌨️' -sums = '✖️➗➖➕' -calendar = '📅' -clock = '🕒' -projects = '🎨🎮🔬' -fun = '🎉🕶️' -dice = '🎲' -unicorn = '🦄' -space = '🚀' -happy = '😃' -silly = '😜' -heart = '❤️' -games = '🎮' -books = '📚' -sports = '⚽🎾👟' -green = '♻️' -nature = '🌳' -fire = '🔥' -sparkles = '✨' -plead = '🥺' -hundred = '💯' -star = '⭐' -yellow_heart = '💛' -rainbow = '🌈' \ No newline at end of file diff --git a/lib/tasks/project_components/hello_world_example/main.py b/lib/tasks/project_components/hello_world_example/main.py index f89e0563d..84bd46a4b 100644 --- a/lib/tasks/project_components/hello_world_example/main.py +++ b/lib/tasks/project_components/hello_world_example/main.py @@ -1,45 +1,32 @@ -#!/bin/python3 - -from emoji import * -from datetime import * +from datetime import datetime from random import randint -# Put function definitions under here - -def roll_dice(): - print(python, 'can make a', dice) - max = input('How many sides?') # get input from the user - print('That is a D', max) # use the number the user entered - roll = randint(1, int(max)) # generate a random number - print('You rolled a', roll) # print the value of the roll variable - print(fire * roll) # repeat the fire text roll times +# Emoji variables to use in your project +world = '🌍🌎🌏' +python = 'Python 🐍' -def hobbies(): - hobby = input('What do you like?') - print('That sounds', fun) - print('You could make a', python, 'project about', hobby) +# Emojis to copy and paste into your code +# 📅🕒🎨🎮🔬🎉🕶️🎲🦄🚀💯⭐💛 +# 😃😜❤️📚⚽🎾👟♻️🌳🔥✨🥺🌈 -# Put code to run under here # Useful characters :',()*_/.# -print('Hello', world) -print('Welcome to', python) - -input() # wait for the user to tap Enter - -print(python, 'is very good at', sums) -print(230 * 5782 ** 2 / 23781) - -input() - -now = datetime.now() # get the current date and time -print('The', calendar, clock, 'is', now) # print with emoji - -input() - -roll_dice() # Call the roll_dice function - -input() - -hobbies() # Call the hobbies function - +# Function definitions +def roll_dice(): + max = input('How many sides?: ') # Wait for input from the user + print('Rolling a', max, 'sided dice ...') # Use the number the user entered + roll = randint(1, int(max)) # Generate a random number between 1 and 6 + print('You rolled a', roll) # Print the value of the roll variable + print('🔥' * roll) # Repeat the fire emoji to match the dice roll + +# Put code to run under here +print('Hello', world) +print('Welcome to', python) +print(python, 'is very good at maths!') +print(230 * 5782 ** 2 / 23781) # Print the result of the sum +print('The 📅 🕒 is', datetime.now()) # Print with emojis + +roll_dice() # Call the roll dice function +print('I ❤️ ...') +print('... makes me 😃') +print('I\'d like to make ... with', python) diff --git a/lib/tasks/project_components/hello_world_example/noemoji.py b/lib/tasks/project_components/hello_world_example/noemoji.py deleted file mode 100644 index 67b400e05..000000000 --- a/lib/tasks/project_components/hello_world_example/noemoji.py +++ /dev/null @@ -1,19 +0,0 @@ -# Add ASCII art alternatives -# Before emoji we used emoticons made from characters - -world = 'o' -python = '~~~-<' -happy = ':-)' -heart = '♡' # or '<3' -star = '☆' -sparkles = '✺' -silly = ';)' -sums = '+-*/' -hundred = '100!' -plead = '◔◔' -fire = '/\\' -books = '≣' -rainbow = '⌒' -dice = '⊡' -clock = '◷' -calendar = '▦' diff --git a/lib/tasks/project_components/hello_world_example/project_config.yml b/lib/tasks/project_components/hello_world_example/project_config.yml index 0fa21cbad..e90ee2658 100644 --- a/lib/tasks/project_components/hello_world_example/project_config.yml +++ b/lib/tasks/project_components/hello_world_example/project_config.yml @@ -1,18 +1,8 @@ -NAME: "Hello 🌍🌎🌏 Example" -IDENTIFIER: "python-emoji-example" +NAME: "Hello 🌍🌎🌏 Solution" +IDENTIFIER: "hello-world-solution" COMPONENTS: - name: "main" extension: "py" location: "main.py" index: 0 default: true - - name: "emoji" - extension: "py" - location: "emoji.py" - index: 1 - default: false - - name: "noemoji" - extension: "py" - location: "noemoji.py" - index: 2 - default: false diff --git a/lib/tasks/project_components/hello_world_starter/emoji.py b/lib/tasks/project_components/hello_world_starter/emoji.py deleted file mode 100644 index 13dae5d09..000000000 --- a/lib/tasks/project_components/hello_world_starter/emoji.py +++ /dev/null @@ -1,27 +0,0 @@ -# Emoji variables to use in your project - -world = '🌍🌎🌏' -python = '🐍⌨️' -sums = '✖️➗➖➕' -calendar = '📅' -clock = '🕒' -projects = '🎨🎮🔬' -fun = '🎉🕶️' -dice = '🎲' -unicorn = '🦄' -space = '🚀' -happy = '😃' -silly = '😜' -heart = '❤️' -games = '🎮' -books = '📚' -sports = '⚽🎾👟' -green = '♻️' -nature = '🌳' -fire = '🔥' -sparkles = '✨' -plead = '🥺' -hundred = '💯' -star = '⭐' -yellow_heart = '💛' -rainbow = '🌈' \ No newline at end of file diff --git a/lib/tasks/project_components/hello_world_starter/main.py b/lib/tasks/project_components/hello_world_starter/main.py index 6d1570650..4a5b83ef2 100644 --- a/lib/tasks/project_components/hello_world_starter/main.py +++ b/lib/tasks/project_components/hello_world_starter/main.py @@ -1,12 +1,17 @@ -#!/bin/python3 - -from emoji import * -from datetime import * +from datetime import datetime from random import randint -# Put function definitions under here +# Emoji variables to use in your project +world = '🌍🌎🌏' +python = 'Python 🐍' + +# Emojis to copy and paste into your code +# 📅🕒🎨🎮🔬🎉🕶️🎲🦄🚀💯⭐💛 +# 😃😜❤️📚⚽🎾👟♻️🌳🔥✨🥺🌈 # Useful characters :',()*_/.# +# Function definitions + # Put code to run under here diff --git a/lib/tasks/project_components/hello_world_starter/noemoji.py b/lib/tasks/project_components/hello_world_starter/noemoji.py deleted file mode 100644 index 67b400e05..000000000 --- a/lib/tasks/project_components/hello_world_starter/noemoji.py +++ /dev/null @@ -1,19 +0,0 @@ -# Add ASCII art alternatives -# Before emoji we used emoticons made from characters - -world = 'o' -python = '~~~-<' -happy = ':-)' -heart = '♡' # or '<3' -star = '☆' -sparkles = '✺' -silly = ';)' -sums = '+-*/' -hundred = '100!' -plead = '◔◔' -fire = '/\\' -books = '≣' -rainbow = '⌒' -dice = '⊡' -clock = '◷' -calendar = '▦' diff --git a/lib/tasks/project_components/hello_world_starter/project_config.yml b/lib/tasks/project_components/hello_world_starter/project_config.yml index ae1bd5a8d..606cbd5a1 100644 --- a/lib/tasks/project_components/hello_world_starter/project_config.yml +++ b/lib/tasks/project_components/hello_world_starter/project_config.yml @@ -1,18 +1,9 @@ NAME: "Hello 🌍🌎🌏" -IDENTIFIER: "python-hello-starter" +IDENTIFIER: "hello-world-starter" COMPONENTS: - name: "main" extension: "py" location: "main.py" index: 0 default: true - - name: "emoji" - extension: "py" - location: "emoji.py" - index: 1 - default: false - - name: "noemoji" - extension: "py" - location: "noemoji.py" - index: 2 - default: false +