Post: Boredum made this.[Python]
01-11-2013, 05:11 AM #1
Complete Speed
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({});
    
import random
Meat = ['Ham','Turkey','Bologna','Meatball','Chicken','Steak','Tuna']
Bread = ['Wheat','White','Honey Oat','Italian']
Veggie = ['Tomato', 'Onion', 'Spinach', 'Lettuce','Jalapeno','Avocado','Banana Peppers']
Cheese = ['Pepper Jack','American','Swiss','Cheddar']
Sauce = ['Mayonaisse','Ranch','Buffalo Sauce', 'Honey Mustard', 'Mustard']
Drink = ['Coca-Cola','Pepsi','Awesome faceiet Pepsi','Awesome faceiet Coca-Cola','Cherry Limeade','Lemonade','Water','Powerade','Awesome facer. Pepper','Root Beer','Fanta']
Dessert = ['White Chip Macadamia Nut Cookie', 'Chocolate Chip Cookie', 'Awesome faceouble Chocolate Cookie', 'M&M Cookie','Ice Cream', 'Apple', 'Banana','Peanut Butter Cookie','Sugar Cookie']
Chip = ['Lays', 'Baked Lays', 'Cool Ranch', 'Nacho Cheese', 'Sun Chips']

x = random.randint(0,6)
y = random.randint(0,3)
b = random.randint(0,6)
d = random.randint(0,3)
v = random.randint(0,4)
n = random.randint(0,10)
m = random.randint(0,Cool Man (aka Tustin)
g = random.randint(0,4)

print (Meat[x] + ' - Meat'Winky Winky
print (Bread[y] + ' - Bread'Winky Winky
print (Veggie[b] + ' - Vegetable'Winky Winky
print (Cheese[d] + ' - Cheese'Winky Winky
print (Sauce[v] + ' - Sauce'Winky Winky
print (Drink[n]+ ' - Drink'Winky Winky
print (Dessert[m]+ ' - Dessert'Winky Winky
print (Chip[g]+ '- Chips'Winky Winky
stop = raw_input()



maybe the php on here messes up the code either way just view raw or whatever and copy it from here:
You must login or register to view this content.
made this quick little program when i was bored. took like 10 minutes.

boring. maybe someone could use this as a base. it's a subway program essentially. lol

what it does is take each item out of an array and puts it together in a nice meal planner.
maybe i can add pricing or add another type of restaurant.

to use this go to [url]www.python.org/download[/url] and download python 2.7 or 3.3 not sure if it works on 3.3 it should but go!

tell me what you think of it?
live demo via php
You must login or register to view this content.

credits to lovol for converting to php.

version 2.0:
You must login or register to view this content.

made it to where it fills the arrays from text files. only bug is it reads the \n on the newline so it makes the text after the items go down a line.

the reason for this is functionality. you can make it read whatever you want from the text files
or take out and add your own stuff.

if anyone can help please do.

screen shots:
You must login or register to view this content.
You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users say thank you to Complete Speed for this useful post:

Fer, Hazey, Mr.Picklemixel
01-11-2013, 06:00 AM #2
Pichu
RIP PICHU.
I only learned Python up to 2.7 but if you want to run it in command line, add the follow:

stop = raw_input()

That way you can read it when executing.

Made it loop for yea:

    import randomMeat = ['Ham','Turkey','Bologna','Meatball','Chicken','Steak','Tuna']
Bread = ['Wheat','White','Honey Oat','Italian']
Veggie = ['Tomato', 'Onion', 'Spinach', 'Lettuce','Jalapeno','Avocado','Banana Peppers']
Cheese = ['Pepper Jack','American','Swiss','Cheddar']
Sauce = ['Mayonaisse','Ranch','Buffalo Sauce', 'Honey Mustard', 'Mustard']
Drink = ['Coca-Cola','Pepsi','Awesome faceiet Pepsi','Awesome faceiet Coca-Cola','Cherry Limeade','Lemonade','Water','Powerade','Awesome facer. Pepper','Root Beer','Fanta']
Dessert = ['White Chip Macadamia Nut Cookie', 'Chocolate Chip Cookie', 'Awesome faceouble Chocolate Cookie', 'M&M Cookie','Ice Cream', 'Apple', 'Banana','Peanut Butter Cookie','Sugar Cookie']
Chip = ['Lays', 'Baked Lays', 'Cool Ranch', 'Nacho Cheese', 'Sun Chips']


Stop = False
while Stop == False:
x = random.randint(0,6)
y = random.randint(0,3)
b = random.randint(0,6)
d = random.randint(0,3)
v = random.randint(0,4)
n = random.randint(0,10)
m = random.randint(0,Cool Man (aka Tustin)
g = random.randint(0,4)


print (Meat[x] + ' - Meat'Winky Winky
print (Bread[y] + ' - Bread'Winky Winky
print (Veggie[b] + ' - Vegetable'Winky Winky
print (Cheese[d] + ' - Cheese'Winky Winky
print (Sauce[v] + ' - Sauce'Winky Winky
print (Drink[n]+ ' - Drink'Winky Winky
print (Dessert[m]+ ' - Dessert'Winky Winky
print (Chip[g]+ '- Chips'Winky Winky
end = raw_input("Should we exit the program? Yes or No\n")
if end == "Yes" or stop == "yes":
Stop = True
read = raw_input("Press enter to quit...")
01-11-2013, 07:43 AM #3
Complete Speed
Do a barrel roll!
Originally posted by Pichu View Post
I only learned Python up to 2.7 but if you want to run it in command line, add the follow:

stop = raw_input()

That way you can read it when executing.

Made it loop for yea:

    import randomMeat = ['Ham','Turkey','Bologna','Meatball','Chicken','Steak','Tuna']
Bread = ['Wheat','White','Honey Oat','Italian']
Veggie = ['Tomato', 'Onion', 'Spinach', 'Lettuce','Jalapeno','Avocado','Banana Peppers']
Cheese = ['Pepper Jack','American','Swiss','Cheddar']
Sauce = ['Mayonaisse','Ranch','Buffalo Sauce', 'Honey Mustard', 'Mustard']
Drink = ['Coca-Cola','Pepsi','Awesome faceiet Pepsi','Awesome faceiet Coca-Cola','Cherry Limeade','Lemonade','Water','Powerade','Awesome facer. Pepper','Root Beer','Fanta']
Dessert = ['White Chip Macadamia Nut Cookie', 'Chocolate Chip Cookie', 'Awesome faceouble Chocolate Cookie', 'M&M Cookie','Ice Cream', 'Apple', 'Banana','Peanut Butter Cookie','Sugar Cookie']
Chip = ['Lays', 'Baked Lays', 'Cool Ranch', 'Nacho Cheese', 'Sun Chips']


Stop = False
while Stop == False:
x = random.randint(0,6)
y = random.randint(0,3)
b = random.randint(0,6)
d = random.randint(0,3)
v = random.randint(0,4)
n = random.randint(0,10)
m = random.randint(0,Cool Man (aka Tustin)
g = random.randint(0,4)


print (Meat[x] + ' - Meat'Winky Winky
print (Bread[y] + ' - Bread'Winky Winky
print (Veggie[b] + ' - Vegetable'Winky Winky
print (Cheese[d] + ' - Cheese'Winky Winky
print (Sauce[v] + ' - Sauce'Winky Winky
print (Drink[n]+ ' - Drink'Winky Winky
print (Dessert[m]+ ' - Dessert'Winky Winky
print (Chip[g]+ '- Chips'Winky Winky
end = raw_input("Should we exit the program? Yes or No\n")
if end == "Yes" or stop == "yes":
Stop = True
read = raw_input("Press enter to quit...")

most people will just download python then run it in idle.
01-11-2013, 02:33 PM #4
Pichu
RIP PICHU.
Originally posted by Kartom View Post
most people will just download python then run it in idle.


Not really, there is a lot of people who will create applications that will appear through the command window and unless you want an interaction or information shown, this is what you need to do.

Same thing applies to console applications in C# or C++.

Console.ReadKey(); //When user presses key, quit application

It's good Python practice because you should anticipate anything and everything that the person may or may not do and I happened to be one of those who runs through console.

Friendly tip.
01-11-2013, 05:00 PM #5
Complete Speed
Do a barrel roll!
yeah, i'm just saying it's good python practice, if it were an important program. not so much if it was a simple little piece. like mine.

and i know how to do all that. i just choose not to. i've studied python for over a year now. and this was just something i threw together when i was bored in like 5 minutes. but thanks for the input and feed back. <3
01-11-2013, 11:18 PM #6
Mr.Picklemixel
Do a barrel roll!
Originally posted by Kartom View Post
tell me what you think of it?


Hahah, this is actually the most helpful thing I've ever found on the internet. Choosing what to eat is one of life's hardest decisions... Definitely going to have to use this to decide on what lunch to take to work, minus the tomatoes 'cause tomatoes are yucky
01-12-2013, 03:24 AM #7
Complete Speed
Do a barrel roll!
Originally posted by Mr.Picklemixel View Post
Hahah, this is actually the most helpful thing I've ever found on the internet. Choosing what to eat is one of life's hardest decisions... Definitely going to have to use this to decide on what lunch to take to work, minus the tomatoes 'cause tomatoes are yucky


indeed, glad i could help. lol it is pretty fun. i'll make it for different restaurants. eventually maybe add a menu or something.
01-12-2013, 04:14 AM #8
Fer
Banned
Originally posted by Kartom View Post

    
import random
Meat = ['Ham','Turkey','Bologna','Meatball','Chicken','Steak','Tuna']
Bread = ['Wheat','White','Honey Oat','Italian']
Veggie = ['Tomato', 'Onion', 'Spinach', 'Lettuce','Jalapeno','Avocado','Banana Peppers']
Cheese = ['Pepper Jack','American','Swiss','Cheddar']
Sauce = ['Mayonaisse','Ranch','Buffalo Sauce', 'Honey Mustard', 'Mustard']
Drink = ['Coca-Cola','Pepsi','Awesome faceiet Pepsi','Awesome faceiet Coca-Cola','Cherry Limeade','Lemonade','Water','Powerade','Awesome facer. Pepper','Root Beer','Fanta']
Dessert = ['White Chip Macadamia Nut Cookie', 'Chocolate Chip Cookie', 'Awesome faceouble Chocolate Cookie', 'M&M Cookie','Ice Cream', 'Apple', 'Banana','Peanut Butter Cookie','Sugar Cookie']
Chip = ['Lays', 'Baked Lays', 'Cool Ranch', 'Nacho Cheese', 'Sun Chips']

x = random.randint(0,6)
y = random.randint(0,3)
b = random.randint(0,6)
d = random.randint(0,3)
v = random.randint(0,4)
n = random.randint(0,10)
m = random.randint(0,Cool Man (aka Tustin)
g = random.randint(0,4)

print (Meat[x] + ' - Meat'Winky Winky
print (Bread[y] + ' - Bread'Winky Winky
print (Veggie[b] + ' - Vegetable'Winky Winky
print (Cheese[d] + ' - Cheese'Winky Winky
print (Sauce[v] + ' - Sauce'Winky Winky
print (Drink[n]+ ' - Drink'Winky Winky
print (Dessert[m]+ ' - Dessert'Winky Winky
print (Chip[g]+ '- Chips'Winky Winky
stop = raw_input()



maybe the php on here messes up the code either way just view raw or whatever and copy it from here:
You must login or register to view this content.
made this quick little program when i was bored. took like 10 minutes.

boring. maybe someone could use this as a base. it's a subway program essentially. lol

what it does is take each item out of an array and puts it together in a nice meal planner.
maybe i can add pricing or add another type of restaurant.

to use this go to You must login or register to view this content. and download python 2.7 or 3.3 not sure if it works on 3.3 it should but go!

tell me what you think of it?


thanks bro, i needed this.

The following user thanked Fer for this useful post:

Complete Speed
01-12-2013, 04:47 AM #9
Pichu
RIP PICHU.
Originally posted by Kartom View Post
yeah, i'm just saying it's good python practice, if it were an important program. not so much if it was a simple little piece. like mine.

and i know how to do all that. i just choose not to. i've studied python for over a year now. and this was just something i threw together when i was bored in like 5 minutes. but thanks for the input and feed back. <3


Nice, I've only about 6 months now of Python knowledge. I don't really use it though because I don't see myself using Linux and C#, I can manage console based applications.
01-15-2013, 04:17 PM #10
Complete Speed
Do a barrel roll!
Originally posted by Pichu View Post
I only learned Python up to 2.7 but if you want to run it in command line, add the follow:

stop = raw_input()

That way you can read it when executing.

Made it loop for yea:

    import randomMeat = ['Ham','Turkey','Bologna','Meatball','Chicken','Steak','Tuna']
Bread = ['Wheat','White','Honey Oat','Italian']
Veggie = ['Tomato', 'Onion', 'Spinach', 'Lettuce','Jalapeno','Avocado','Banana Peppers']
Cheese = ['Pepper Jack','American','Swiss','Cheddar']
Sauce = ['Mayonaisse','Ranch','Buffalo Sauce', 'Honey Mustard', 'Mustard']
Drink = ['Coca-Cola','Pepsi','Awesome faceiet Pepsi','Awesome faceiet Coca-Cola','Cherry Limeade','Lemonade','Water','Powerade','Awesome facer. Pepper','Root Beer','Fanta']
Dessert = ['White Chip Macadamia Nut Cookie', 'Chocolate Chip Cookie', 'Awesome faceouble Chocolate Cookie', 'M&M Cookie','Ice Cream', 'Apple', 'Banana','Peanut Butter Cookie','Sugar Cookie']
Chip = ['Lays', 'Baked Lays', 'Cool Ranch', 'Nacho Cheese', 'Sun Chips']


Stop = False
while Stop == False:
x = random.randint(0,6)
y = random.randint(0,3)
b = random.randint(0,6)
d = random.randint(0,3)
v = random.randint(0,4)
n = random.randint(0,10)
m = random.randint(0,Cool Man (aka Tustin)
g = random.randint(0,4)


print (Meat[x] + ' - Meat'Winky Winky
print (Bread[y] + ' - Bread'Winky Winky
print (Veggie[b] + ' - Vegetable'Winky Winky
print (Cheese[d] + ' - Cheese'Winky Winky
print (Sauce[v] + ' - Sauce'Winky Winky
print (Drink[n]+ ' - Drink'Winky Winky
print (Dessert[m]+ ' - Dessert'Winky Winky
print (Chip[g]+ '- Chips'Winky Winky
end = raw_input("Should we exit the program? Yes or No\n")
if end == "Yes" or stop == "yes":
Stop = True
read = raw_input("Press enter to quit...")


you're awesome keep being awesome!

just friendly advice.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo