본문 바로가기
반응형

python8

[python] BANKER ROULETTE 풀기 결과보고 잘 풀었는줄 알았지만 사실 상 이 코드로 하면 안되는 것... choice()를 쓰지 말고 풀라고 했는데ㅋㅋㅋㅋㅋ 제대로 안 읽고 냅다 풀고 빨리 풀었다고 좋아했음ㅋㅋㅋㅋ Instructions You are going to write a program that will select a random name from a list of names. The person selected will have to pay for everybody's food bill. Important: You are not allowed to use the choice() function. Line 1 splits the string names_string into individual names and puts them.. 2023. 10. 27.
[python]Heads or Tails 문제 풀기 You are going to write a virtual coin toss program. It will randomly tell the user "Heads" or "Tails". Important, the first letter should be capitalised and spelt exactly like in the example e.g. "Heads", not "heads". There are many ways of doing this. But to practice what we learnt in the last lesson, you should generate a random number, either 0 or 1. Then use that number to print out "Heads" .. 2023. 10. 27.
[python] DAY 3 - LOVE CALCULATOR 풀기 출처: https://www.udemy.com/course/best-100-days-python/learn/lecture/40123914#overview You are going to write a program that tests the compatibility between two people. To work out the love score between two people: Take both people's names and check for the number of times the letters in the word TRUE occurs. Then check for the number of times the letters in the word LOVE occurs. Then combine th.. 2023. 10. 26.
[Python] 파이썬의 숫자처리 및 F-String 서로 다른 데이터 유형을 문자열로 처리하는 수작업을 줄어들게 하기 위해 F- String을 이용함 example 2023. 10. 24.
728x90
반응형