#Docstrings : 함수 목적을 나타내는 작은 설명? 문서.. > 함수정의 바로 다음줄이 docstrings 자리임 #ex) def is_leapyear(year): """ 입력받은 year가 윤년인지 아닌지를 True/False로 return하는 함수 """ if year%400 == 0: return True elif year%4 == 0 and year%100 != 0: return True else: return False
# 리턴값이 있는 함수 # 계산기 프로그램을 만들거임. # Functions with Outputs ------------------------------------------------------------------------- def format_name(f_name, l_name): #단어별 첫번째 글자를 대문자로 만드는 함수 f_name = f_name.title() l_name = l_name.title() #print(f"{f_name} {l_name}") return f"{f_name} {l_name}" #cf. return is the end of the function #format_name("AGhgshahghssSADAD","eomHSJDHklSHJKDHKSdd") output = ..
from art import logo #텍스트 아트를 별도의 art.py에 logo 변수로 두고 읽어왔음 from replit import clear #화면 지우기의 일반적인 함수를 모르겠음 print(logo) print("Welcome to the secret auction program.") bidding = {} #딕셔너리와 리스트/딕셔너리, 리스트간 무엇을 사용할지 결정하는데 시간소비함 repeat = True while repeat: ones_name = input("What is your name?: ") ones_bid = int(input("What's your bid?: $")) bidding[ones_name] = ones_bid if input("Are there any other ..
travel_log = [ { "country": "France", "visits": 12, "cities": ["Paris", "Lille", "Dijon"] }, { "country": "Germany", "visits": 5, "cities": ["Berlin", "Hamburg", "Stuttgart"] }, ] #? Do NOT change the code above #TODO: Write the function that will allow new countries #to be added to the travel_log. ? def add_new_country(country, howmanytimes, cities): travel_log.append( { "country": country, "vi..
#Nesting Dictionary in a Dictionary #여행지 기록, 나라와 방문한 도시 입력 trabel_log = { "France": "Paris", "Germany": "Berlin", } #여행지 기록, 나라와 방문한 도시들 입력 trabel_log = { "France": ["Paris","London","Dijon"], "Germany": ["Berlin","Hamburg","Stuttgart"], } #여행지 기록, 나라와 방문한 도시들, 방문한 회수 입력(도시들이 무얼 나타내는지 중첩된 Dictionary trabel_log = { "France": {"cities_visited": ["Paris","London","Dijon"], "total_visits": 12}, "Ger..
student_scores = { "Harry": 81, "Ron": 78, "Hermione": 99, "Draco": 74, "Neville": 62, } # ? Don't change the code above ? #TODO-1: Create an empty dictionary called student_grades. student_grades = {} #TODO-2: Write your code below to add the grades to student_grades.? for key in student_scores: score = student_scores[key] if score > 90 and score 80: student_grades[key] = "Exceeds Expectations"..
딕셔너리: key, value 중첩 * Dictionary { key : value } { key1:value1, key2:value2, ... } 키는 "문자", 숫자 123, 등 datatype을 구별한다 # Retrieving items for dictionary programming_dictionary = { "Bug": "An error in a program that prevents the program from running as expected.", "Function": "A piece of code that you can easily call over and over again.", "Loop": "The action of doing something over and over again...
- Total
- Today
- Yesterday
- vmware.powercli
- 대소문자
- 배열
- sysprep
- powercli
- 정렬
- dp-1
- fromkeys
- LIST
- 부동없이
- EXA
- virt-sysprep
- oracle
- set()
- 변수화
- Join
- 중복제거
- storage
- dezoomify
- 읽어오기
- 3par
- insert
- exadata
- cloud-init
- 차집합
- dp-2
- powershell
- vmware
- artandculture
- 스토리지
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |