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
27 changes: 0 additions & 27 deletions lib/tasks/project_components/hello_world_example/emoji.py

This file was deleted.

65 changes: 26 additions & 39 deletions lib/tasks/project_components/hello_world_example/main.py
Original file line number Diff line number Diff line change
@@ -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)
19 changes: 0 additions & 19 deletions lib/tasks/project_components/hello_world_example/noemoji.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
27 changes: 0 additions & 27 deletions lib/tasks/project_components/hello_world_starter/emoji.py

This file was deleted.

15 changes: 10 additions & 5 deletions lib/tasks/project_components/hello_world_starter/main.py
Original file line number Diff line number Diff line change
@@ -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

19 changes: 0 additions & 19 deletions lib/tasks/project_components/hello_world_starter/noemoji.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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