import logoimport randomimport oseasy = 10hard = 5def set_number(): """ Computer choose random number """ return random.randint(1, 100)def set_level(level): """ User choose the level""" if level == "easy": print("You have 10 attempts") return easy elif level == "hard": print("You have 5 attempts") return hard else: print("Enter easy and hard c..
Before starting the project assignment, I organized the requirements for the assignment in a notepad. Requirements for the Number Guessing Game: 1. Guess a number between 1 and 100. 2. Choose a difficulty level: 'Easy' or 'Hard'. 3. If the 'Hard' difficulty is chosen, the player is allowed only 5 attempts to guess the number. 4. After the player inputs a guessed number, if it is not correct, pro..
The rules for Blackjack If the total value of your cards exceeds 21, you lose (Bust).Jacks, Queens, and Kings are each valued at 10, and Aces can be valued as either 1 or 11, depending on which value is more advantageous.At the start, the dealer receives two cards, and the player also receives two cards.One of the dealer's cards is face-up, and the other card is face-down.To win, the player's to..
클라우드 관련하여 보안, 리눅스, 네트워크, aws에 대해서 공부하려고 계획있다가 급하게 우선 파이썬을 공부해야겠다는 생각이 들었다.나는 그동안 Java, C++, C 언어를 학교에서 배우면서 코드에 대해 기본적으로 탄탄한 줄 알았다.하지만 모바일 앱 프로그래밍이라는 수업을 수강하며 안드로이드 스튜디오를 활용하여 앱을 개발하는 과제에서나의 코딩 수준이 GPT, 혹은 인터넷이 없으면 코딩을 아예 못 짤 정도로 심각한 상황이었다. 그래서 나의 심각함을 깨닫고, 언어 하나를 탄탄하게, 코딩테스트를 봐도 어려움 없이 풀 수 있는 수준으로 코딩 실력을 늘려야겠다는 생각이 들어 파이썬을 먼저 공부하고자 한다!