What's new

Closed Wanna read some programmer joke?

Status
Not open for further replies.

AraAra

Eternal Poster
Joined
Aug 14, 2017
Posts
897
Reaction
282
Points
296
Code:
# The programmer's wife sends out
# her husband to buy:
# "Buy two eggs,
eggs = 0
# and when they have sausages,
sausages = 0
# buy ten.
# The programmer goes into the shop:
shop = ('Bread','Butter','Meat','Sausages','Water','Eggs')
# "Hello, do you have sausages?"
if 'Sausages' in shop:
# "Yes."
# "Ten eggs, please.
    eggs += 10
print("Number of eggs bought: ",eggs)
print("Number of sausages bought: ",sausages)
 
Status
Not open for further replies.

Similar threads

Back
Top