[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Python Programming Tutorial – 19 – My trip to Walmart and Sets
by
Tags:
Comments
44 responses to “Python Programming Tutorial – 19 – My trip to Walmart and Sets”
-
woha! , bucky 2 beers to a list , you must be an alcoholic , that's not allowed.
-
video starts at 1:05
-
why does this code give me error?? and i have pycharm 3.4.4
groceries = {'beer', 'pizza', "chicken", 'lotion', 'chocolate', 'beer'}
print(groceries)groceries = {'beer', 'pizza', "chicken", 'lotion', 'chocolate', 'beer'}
^
SyntaxError: invalid syntax -
Why did you use curly brackets instead of square? Whats the difference?
-
staring guy looks at groceries, when Bucky is gone to get something, man adds tuna and beer.
-
Why the order of the groceries are shuffled??? (After printing)
That's weird!! -
unpacking argments:
function(*list)
-
What the heck
Video was recorded on August 29th 2014
But Video was uploaded on August 28th 2014?
Illuminati? -
Guys, I'm making a python program to calculate the money I spent in a vacation but the program keep showing this message "cannot concatenate str and nonetype objects python error". Can u guys help me out?
def hotel_cost (nights):
return 140 * nights
def plane_ride_cost (city):
if city == "Charlotte":
city_cost = 183
return city_cost
elif city == "Tampa":
city_cost = 220
return city_cost
elif city == "Pittsburgh":
city_cost = 222
return city_cost
elif city == "Los Angeles":
city_cost = 475
return city_cost
def rental_car_cost (days):
car_cost = days * 40
if days >= 7:
car_cost -= 50
return car_cost
elif days >= 3:
car_cost -= 20
return car_cost
else:
return car_cost
def trip_cost (days, x):
trip_cost = hotel_cost (days) + plane_ride_cost (x) + rental_car_cost (days)
return trip_cost -
can I get subs
-
duct tape and lotion? it puts the lotion on the skin
-
Alright beer lotion duct tape beer… Wait a sec! Did I forget the chloroform!?
-
It got creepy after beer, duct tape, and lotion. What are you doing with those?
-
why does the first set print out of order? shouldn't it print the same order as the groceries={….}?
-
sir please how to input and print out the array in python
-
Bucky, why is duct tape usually on your list?!
-
@thenewboston you have great fun tutorials. Its helpful
-
it says in the bottom right corner 29. of August yet this video was published 28.
dafuq?! -
If anyone is wondering, how Bucky looks like do watch his CSS tutorial.
-
why you did not loop throw the set??
-
again, an excellent video! I love it ~^o^~
-
4:04 downloads your app, runs it Oh yeah, you need milk! adds milk to the grocery list You already have milk hoss! deinstalls app
-
you need some milk
-
Nice example. I still don't understand, what is different between [ ] and { } in this example?
-
Buckey
-
What's the difference in the use of curly braces & square braces ?
-
wondering why the set items werent printed in the same order as u wrote them
-
Question : i wonder according to which order the elements in a set appear….have observed tht they dont get saved in the order we enter..
-
I'm really confused does this code only work with Python 3 and higher. I downloaded Pycharm Community and it only supports 2.7, but the libraries only seem to work with Python 3.
-
1:44 You're welcome 😉
-
for a in b:
for b in a -
When it printed the list, it printed the items in a different order than they appear in the program. Why?
-
for for for ferra
-
the way you say the word 'item' is weird. Just wanted to point that out.
-
Sets seem to be deprecated in Python version 2.6.
I even tried:
from sets import Set
groceries = Set(['Bread', 'Milk', 'Sugar', 'Pop', 'Milk'])Error = DeprecationWarning: the sets module is deprecated from sets import Set
Whats the alternative?
And thanks for the tutorials
-
items = {'milk','oil','beef','chikens','lotion','tea'}
check=input("check avilablity : ")
for x in items:
if x == check:
print(x," already in the list")
break
else:
print("New item found")
#items+check;
break -
the burping/ bodily functions is/are getting kind of gross
-
Why did the set output in another order than what you entered?
-
watching this exactly one year after it was recorded 😛 happy birthday
-
i started watching this video at 12:35am, idk why but i get such a kick at comparing our times cause theyre sometimes at like 3 in the morning
-
I love this language its fun 🙂
-
DID ANYONE SAW THAT?!?
Why was in the result/outcome the order of elements in the set different from the orignal set? :O -
Am I the only one who saw that after the program was ran with the "if" statement was included, the order of the output was mixed up?
Leave a Reply