# imports
from datetime import datetime
from random import randint
# variables
world = '🌍🌎🌏'
python = 'Python 🐍'
fire = '🔥'
# Function definitions
def roll_dice():
max = input('How many sides on your dice?:')
print(f'That is a D {max}')
roll = randint(1, int(max))
print(f'You rolled a {roll} {fire * roll}')
# Put code to run under here
print(f'Hello {world}')
print(f'Welcome to {python}')
print(f'{python} is good at maths!')
print(f'{111111111 * 111111111}')
print(f'The date and time is {datetime.now()}')
roll_dice()
print(f'I ❤️ pizza')
print(f'Coding makes me 😃')
print(f'I would like to make games with {python}')
Project 1 — Step 16 of 16
⭐ Step 16 — Over to you
➡️ Add your own print lines and make the program yours.
✏️ What to type
At the very bottom, after roll_dice(), add a few print lines
with your own words and emojis. Here are some ideas:
print(f'I ❤️ pizza')
print(f'Coding makes me 😃')
print(f'I would like to make games with {python}')
# imports
from datetime import datetime
from random import randint
# variables
world = '🌍🌎🌏'
python = 'Python 🐍'
fire = '🔥'
# Function definitions
def roll_dice():
max = input('How many sides on your dice?:')
print(f'That is a D {max}')
roll = randint(1, int(max))
print(f'You rolled a {roll} {fire * roll}')
# Put code to run under here
print(f'Hello {world}')
print(f'Welcome to {python}')
print(f'{python} is good at maths!')
print(f'{111111111 * 111111111}')
print(f'The date and time is {datetime.now()}')
roll_dice()
🔍 Some emojis you can copy and paste
🎊 🙃 🤣 😎 😍 🔥 🌈 🌟 💫 🎁 🎂 🎉 🦄 🚀 👾 ⚽ 🏀 🏓 📚 ❤️ 💛 💚 💙 💜 🔵 🌻 ✨ 🍭 🍕 🍔
Adapted from Raspberry Pi Foundation — Hello World under CC BY-SA 4.0.