From 5133a90bea64a2b6e14cb9db02e571170e9adb13 Mon Sep 17 00:00:00 2001 From: Dr Tracy Gardner Date: Sat, 28 Jan 2023 12:40:27 +0000 Subject: [PATCH 1/2] Update main.py Added blank lines at the end of the file in the hope that they stay because it's really hard to add new code after a long line and when the run button gets in the way. --- .../project_components/hello_world_starter/main.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/tasks/project_components/hello_world_starter/main.py b/lib/tasks/project_components/hello_world_starter/main.py index 4a5b83ef2..3d85548fc 100644 --- a/lib/tasks/project_components/hello_world_starter/main.py +++ b/lib/tasks/project_components/hello_world_starter/main.py @@ -15,3 +15,17 @@ # Put code to run under here + + + + + + + + + + + + + + From 06aed16cb168d7fad037b9115f5eadbe0aa5134b Mon Sep 17 00:00:00 2001 From: Dr Tracy Gardner Date: Sat, 28 Jan 2023 12:57:21 +0000 Subject: [PATCH 2/2] Update main.py Minor updates. --- .../project_components/hello_world_example/main.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/tasks/project_components/hello_world_example/main.py b/lib/tasks/project_components/hello_world_example/main.py index 16bde3d5a..d84bb32bd 100644 --- a/lib/tasks/project_components/hello_world_example/main.py +++ b/lib/tasks/project_components/hello_world_example/main.py @@ -13,11 +13,10 @@ # Function definitions def roll_dice(): - max = input('How many sides?: ') # Wait for input from the user + max = input('How many sides for a 🎲?: ') # 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 + print(roll, '🔥' * roll) # Repeat the fire emoji to match the dice roll # Put code to run under here print('Hello', world) @@ -27,6 +26,6 @@ def roll_dice(): 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) +print('I ❤️ rainbows 🌈') +print('Unicorns 🦄 make me 😃') +print('I\'d like to make a story 📖 with', python)