"남편은 프로그래머였다" - 중독성 강한 코딩 댓글....ㅋㅋ > 유머게시판

유머게시판

"남편은 프로그래머였다" - 중독성 강한 코딩 댓글....ㅋㅋ 정보

"남편은 프로그래머였다" - 중독성 강한 코딩 댓글....ㅋㅋ

본문

ㅋㅋㅋ.... 은근 중독성에 다 보게 됨... ㅋㅋ

---------------------------------------------------------------

A wife asks her husband, "Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6."

A short time later the husband comes back with 6 cartons of milk. The wife asks him, "Why did you buy 6 cartons of milk?"

He replied, "They had eggs."



totalCartonsofMilk = 1If(eggs) {totalCartonsofMilk = 6}return totalCartonsofMilk

var totalCartonsOfMilk = hasEggs()? 6 : 1;

해결책까지 제시해줌

 

What the wife actually said:

.#!/usr/bin/env pythonfrom SuperMarkets import check_out, find_markets, inventorydef run_errand(milk, eggs):    shopping_cart = []    if 'milk' in inventory and 'eggs' in inventory:        shopping_cart.append(milk * 6)    elif 'milk' in inventory and 'eggs' not in inventory:        shopping_cart.append(milk)    else:       print 'Store has no milk.  Try another.'       find_markets()    check_out(shopping_cart)if __name__ == '__main__':    run_errand(milk='milk', eggs='eggs').

What the wife should have said to her programmer husband:

.#!/usr/bin/env pythonfrom SuperMarkets import check_out, find_markets, inventorydef run_errand(milk, eggs):    shopping_cart = []    if 'milk' in inventory and 'eggs' in inventory:        shopping_cart.append(milk + eggs)    elif 'milk' in inventory and 'eggs' not in inventory:        shopping_cart.append(milk)    elif 'eggs' in inventory and 'milk' not in inventory:        shopping_cart.append(eggs)        print 'Buy eggs, then go to another store for milk.'        find_markets()    else:        print 'Store has no eggs or milk.  Try another.'        find_markets()    check_out(shopping_cart)if __name__ == '__main__':    run_errand(milk='milk', eggs='eggs' * 6)


한국에서는 싸움남 ㅋㅋㅋㅋ

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ㅋㅋ
5
노잼
0

댓글 10개

신고가 접수된 글입니다.
신고 횟수가 1회 이상이면 글을 확인하지 못합니다.

여자랑 하는거보다 더 좋네
진짜 미쳤다 곧휴가 아주 녹는다 녹아~

https://linktr.ee/ORGASM.com
: 아니요 or 언급 안 되어 있어요. ㅎㅎ
그러니까 남편은 "계란"을 if문의 조건문으로 봤기 때문에 그냥 확인용이고,
실행문인 "우유"만을 사온 거 같아요. 이게 실제 액션이니... 그것도 6개나...ㅎㅎ
전체 21,798 |RSS
유머게시판 내용 검색

회원로그인

진행중 포인트경매

  1. 참여80 회 시작24.04.19 15:40 종료24.04.26 15:40
(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT