Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/tasks/project_components/hello_world_example/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
# Useful characters :',()*_/.#

# Function definitions
def roll_dice():
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
def roll_dice():
max = input('How many sides?:') # Wait for input from the user
print('That\'s a D', max) # Use the number the user entered
roll = randint(1, int(max)) # Use max to determine the number of sides the dice has
print('You rolled a', roll, fire * 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
print('The date and time is', datetime.now()) # Print the current date and time

roll_dice() # Call the roll dice function
print('I ❤️ rainbows 🌈')
Expand Down
3 changes: 2 additions & 1 deletion lib/tasks/project_components/hello_world_starter/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
# Emoji variables to use in your project
world = '🌍🌎🌏'
python = 'Python 🐍'
fire = '🔥'

# Emojis to copy and paste into your code
# 📅🕒🎨🎮🔬🎉🕶️🎲🦄🚀💯⭐💛
# 😃😜❤️📚⚽🎾👟♻️🌳🔥✨🥺🌈
# 😃😜❤️📚⚽🎾👟♻️🌳✨🥺🌈

# Useful characters :',()*_/.#

Expand Down