아 오늘 왜이렇게 머리가 어지럽지..
7. Write a program that estimates the average number of drawings it takes before the user’s numbers are picked in a lottery that consists of correctly picking six different numbers that are between 1 and 10. To do this, run a loop 1000 times that randomly generates a set of user numbers and simulates drawings until the user’s numbers are drawn. Find the average number of drawings needed over the 1000 times the loop runs.
문장이 너무 길어서 해석이 잘 안되어요
.1과 10사이의 6개의 서로다른 숫자가 있는 복권에서 사용자의 번호들을 뽑기 이전에 평균 수를 측정하는 프로그램을 써라.
???
이렇게 하기 위해서 1000번의 무작위의 유저 번호 세트를 생성하는 반복문을 돌려라 유저의 번호들이 뽑히기 전까지 시뮬레이션 하라
1000번의 반복을 돌릴때 필요한 뽑는 평균수를 구하라
???
무슨 뜻이죠??
8. Write a program that simulates drawing names out of a hat. In this drawing, the number of
hat entries each person gets may vary. Allow the user to input a list of names and a list of
how many entries each person has in the drawing, and print out who wins the drawing
모자에서 이름을 뽑는 프로그램을 짜라. 뽑을때 모자안에 엔트리는 사람마다 다르다 이름 리스트와 얼마나 엔트리를 각각의 사람들이 가지는지 입력받고 누가 뽑는걸 이기는지 출력하라
???
뭘 어떻게 하면 이긴다는거죠?
.아 어지러워
영어도 몬하는놈이
도와주세요 ㅠㅠ
조건 더 없나
릿코드같은데 링크없음?
흐잉~~ 센세 오셧군요. 저게 문제 전문에이요 링크는 올릴게요
https://www.brianheinold.net/python/A_Practical_Introduction_to_Python_Programming_Heinold.pdf
에서 8강 7번 8번 문제에요
첫번째는 랜덤으로 뽑는데 중복되면 다시 뽑아야 하잖아 1부터 10까지 뽑는데 몇번만에 뽑는지 그 값을 n이라고 할때 1000번 실행하면 n의 평균이 얼마인지 묻는듯
모자에서 이름을 얻은 놈이 이긴거
조건이 구체적이 아닌거보면 니가 상상력을 덧붙여서 실습하길 바랐나봐
흑 흑 이거 답지도 없어서 완전 고생중이에요 ㅠ 감사합니다!