From 2bc28d92e2a413007f2f5c237e963029e1f84b4f Mon Sep 17 00:00:00 2001 From: beckyfranks <49150572+beckyfranks@users.noreply.github.com> Date: Mon, 10 Oct 2022 15:50:22 +0100 Subject: [PATCH 01/11] Update main.py --- .../hello_world_starter/main.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 From ee3691a39c892d16a9ca23c2d8e2b963ea44224b Mon Sep 17 00:00:00 2001 From: Dr Tracy Gardner Date: Mon, 10 Oct 2022 15:51:26 +0100 Subject: [PATCH 02/11] Update project_config.yml Removed additional files --- .../hello_world_starter/project_config.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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..d0095b35d 100644 --- a/lib/tasks/project_components/hello_world_starter/project_config.yml +++ b/lib/tasks/project_components/hello_world_starter/project_config.yml @@ -6,13 +6,4 @@ COMPONENTS: 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 + From 0290ee03c4b7156d3784e58db3d29ee85eec71d0 Mon Sep 17 00:00:00 2001 From: beckyfranks <49150572+beckyfranks@users.noreply.github.com> Date: Mon, 10 Oct 2022 15:51:42 +0100 Subject: [PATCH 03/11] Delete emoji.py --- .../hello_world_example/emoji.py | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 lib/tasks/project_components/hello_world_example/emoji.py 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 From d9de11ed65b30ae2a9c1f35640cd6ad6ee96ad0c Mon Sep 17 00:00:00 2001 From: beckyfranks <49150572+beckyfranks@users.noreply.github.com> Date: Mon, 10 Oct 2022 15:51:53 +0100 Subject: [PATCH 04/11] Delete noemoji.py --- .../hello_world_example/noemoji.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 lib/tasks/project_components/hello_world_example/noemoji.py 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 = '▦' From affa1e0dfacfba712261421a75ffe842c4aad97d Mon Sep 17 00:00:00 2001 From: Dr Tracy Gardner Date: Mon, 10 Oct 2022 15:52:01 +0100 Subject: [PATCH 05/11] Delete emoji.py Not needed for new editor --- .../hello_world_starter/emoji.py | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 lib/tasks/project_components/hello_world_starter/emoji.py 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 From 816c1733401b05fe23ac1a6936520a9ba1943647 Mon Sep 17 00:00:00 2001 From: Dr Tracy Gardner Date: Mon, 10 Oct 2022 15:52:12 +0100 Subject: [PATCH 06/11] Delete noemoji.py Not needed for new editor --- .../hello_world_starter/noemoji.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 lib/tasks/project_components/hello_world_starter/noemoji.py 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 = '▦' From b3c12d47eb8257261dfa9d57c13721122298c1f3 Mon Sep 17 00:00:00 2001 From: beckyfranks <49150572+beckyfranks@users.noreply.github.com> Date: Mon, 10 Oct 2022 15:52:15 +0100 Subject: [PATCH 07/11] Update project_config.yml --- .../hello_world_example/project_config.yml | 10 ---------- 1 file changed, 10 deletions(-) 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..7abaf9929 100644 --- a/lib/tasks/project_components/hello_world_example/project_config.yml +++ b/lib/tasks/project_components/hello_world_example/project_config.yml @@ -6,13 +6,3 @@ COMPONENTS: 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 From 165dd41f4df212a3a37a1caa7db564db8ee595fe Mon Sep 17 00:00:00 2001 From: Liz Smart Date: Mon, 10 Oct 2022 15:55:21 +0100 Subject: [PATCH 08/11] Update main.py Updating completed project to match Hello world steps --- .../hello_world_example/main.py | 65 ++++++++----------- 1 file changed, 26 insertions(+), 39 deletions(-) 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) From c6f256b05e3d579b3d9d31e062b0384348e9c6d1 Mon Sep 17 00:00:00 2001 From: Dr Tracy Gardner Date: Mon, 10 Oct 2022 16:01:34 +0100 Subject: [PATCH 09/11] Update project_config.yml --- .../project_components/hello_world_example/project_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7abaf9929..95f05e0dc 100644 --- a/lib/tasks/project_components/hello_world_example/project_config.yml +++ b/lib/tasks/project_components/hello_world_example/project_config.yml @@ -1,5 +1,5 @@ NAME: "Hello 🌍🌎🌏 Example" -IDENTIFIER: "python-emoji-example" +IDENTIFIER: "hello-world-solution" COMPONENTS: - name: "main" extension: "py" From a2e9874b563cd79607e110fd30c8099c92fadfbe Mon Sep 17 00:00:00 2001 From: Dr Tracy Gardner Date: Mon, 10 Oct 2022 16:02:20 +0100 Subject: [PATCH 10/11] Update project_config.yml --- .../project_components/hello_world_starter/project_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d0095b35d..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,5 +1,5 @@ NAME: "Hello 🌍🌎🌏" -IDENTIFIER: "python-hello-starter" +IDENTIFIER: "hello-world-starter" COMPONENTS: - name: "main" extension: "py" From ca47742db0080c2e9da3e1833148b82a4fefc5a3 Mon Sep 17 00:00:00 2001 From: Liz Smart Date: Mon, 10 Oct 2022 16:03:02 +0100 Subject: [PATCH 11/11] Update project_config.yml --- .../project_components/hello_world_example/project_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 95f05e0dc..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,4 +1,4 @@ -NAME: "Hello 🌍🌎🌏 Example" +NAME: "Hello 🌍🌎🌏 Solution" IDENTIFIER: "hello-world-solution" COMPONENTS: - name: "main"