10 – Type & Type Conversion

Up until now, we’ve discussed four data types in Python: Int, float, bool, and string. If you recall from our previous video, you can check the type of any object directly using the built-in function type. Using type, we can observe that the same number can be coded in different types, each with their own … Read more

1 – Introduction

Welcome to this lesson on data types and operators. This is a very important lesson because it’s where you’ll learn about the building blocks of Python datatypes and operators. Students tend to learn how to program at different rates. Take your time understanding each of the concepts that follow and getting practice with activities in … Read more

3-1-2-39. Summary

https://www.hackerrank.com/domains/python https://www.codewars.com/dashboard https://www.irishtimes.com/news/science/how-george-boole-s-zeroes-and-ones-changed-the-world-1.2014673 연습이 필요합니다! 이 무료 사이트를 사용하여 이 과정에서 볼 수 있는 기술을 연습하십시오. 아래는 이번 과에서 배운 내용을 복습한 것입니다. 내가 시작할 때, 나는 항상 더 많은 연습을 원했다는 것을 압니다. 이 과정은 이 시점부터 매우 빠르게 진행될 것이므로 주제에 대해 더 많은 연습 문제를 원하신다면 웹에 무료 과정이 많이 있습니다. 이 프로그램의 이점뿐만 아니라 나중에 … Read more

3-1-2-38. Conclusion

Congratulations on completing this lesson on data types and operators. You started your journey in Python with a great foundation. Next, you’ll learn how to piece together the building blocks you just learned to write cooler and more complex programs. Great job. 데이터 유형 및 연산자에 대한 이 강의를 완료한 것을 축하합니다. 훌륭한 기초를 가지고 … Read more

3-1-2-36. Quiz: Compound Data Structures

퀴즈: 중첩된 사전에 값 추가하기중첩된 사전으로 작업해 보십시오. 요소 사전의 각 사전에 다른 항목 ‘is_noble_gas’를 추가합니다. 새 항목을 삽입한 후 다음 조회를 수행할 수 있어야 합니다. 컬렉션 데이터 그룹이 있을 때 (데이터 요소의) 컬렉션으로 생각할 수 있습니다. 이 수업에서는 Python이 데이터 컬렉션을 저장, 액세스 및 조작하기 위해 제공하는 다양한 데이터 구조를 보았습니다. 특히 우리는 목록, 집합 및 … Read more

3-1-2-32. Quiz: Dictionaries and Identity Operators

퀴즈: 사전 정의 population이 데이터를 포함 하는 사전을 정의하십시오 . 질문 2/5 다음 중 사전의 키로 사용할 수 있는 것은 무엇입니까? (해당되는 항목을 모두 선택하십시오.) 힌트: 사전 키는 변경 불가능해야 합니다. 즉, 수정할 수 없는 유형이어야 합니다. 질문 3/5 사전에 없는 값을 조회하면 어떻게 됩니까? 테스트 사전을 만들고 대괄호를 사용하여 정의하지 않은 값을 찾습니다. 무슨 일이야? get 기본값으로 사전에는 유용한 관련 … Read more

3-1-2-31. Dictionaries and Identity Operators

Sets, are simple data structures, and they have one main use, collecting unique elements. Our next data structures, dictionaries, are more flexible. Rather than storing single objects like lists and sets do, dictionaries store pairs of elements, keys and values. In this example, we define a dictionary, where the keys are element names, and their … Read more

3-1-2-29. Sets

Imagine that you run a popular search engine, and you’ve surveyed your users to see where they’re browsing from. You’ve collected the 785 responses and have assembled them into a list of countries. There aren’t 785 countries in the world, which means that there are duplicate entries in the country’s list. Slicing the list to … Read more

3-1-2-27. Tuples

Python provides another useful container, tuples. Tuples are used to store related pieces of information. A tuple is a data structure in Python that is an immutable ordered sequence of elements. Consider this example involving latitude and longitude. Tuples are similar to lists in that they store an ordered collection of objects which can be … Read more

3-1-2-26. Quiz: List Methods

퀴즈: len, max, min및 목록 이 페이지의 퀴즈와 관련된 테스트 코드를 실행할 수 있는 Python 환경이 이 페이지 하단에 있습니다! 질문 1/4 다음 코드의 출력은 무엇입니까? (객관식 답변의 쉼표를 줄 바꿈으로 처리합니다.) – 2 퀴즈: sorted, join및 목록 질문 2/4 다음 코드의 출력은 무엇입니까? (객관식 답변의 쉼표를 줄 바꿈으로 처리합니다.) – 4 퀴즈: append및 목록 질문 3/4 다음 코드의 출력은 무엇입니까? (객관식 답변의 쉼표를 … Read more

3-1-2-24. Solution: List and Membership Operators

퀴즈 질문 3 다음은 아래에 표시된 답변에 대한 설명입니다. sentence1는 문자열이므로 변경할 수 없는 개체입니다. 즉 sentence1, 에서 개별 문자를 참조할 수 있지만 (예: 와 같은 것을 작성할 수 있음 sentence1[5]) 값을 할당할 수 없습니다 (예: sentence1[5] = ‘a’). 따라서 세 번째 표현식 (sentence1[30]=”!”)은 오류가 발생합니다. sentence2는 목록이고 목록은 변경 가능합니다. 즉, 다음에서 개별 항목의 값을 변경할 수 있습니다 sentence2. 에서 제 식 (SENTENCE2 [6] = “!”) 우리의 … Read more

3-1-2-23. Quiz: Lists and Membership Operators

퀴즈: 목록 인덱싱 목록 인덱싱을 사용하여 정수 변수를 기반으로 특정 월에 며칠이 있는지 확인 month하고 해당 값을 정수 변수에 저장합니다 num_days. 예를 들어 month가 8 인 경우 8 num_days월인 8월은 31일이므로 31로 설정해야 합니다. 0부터 시작하는 인덱싱을 고려해야 합니다! 퀴즈: 슬라이싱 목록 목록 분할 표기법을 사용하여 이 목록에서 가장 최근 날짜 세 개를 선택합니다. 힌트: 음수 인덱스는 조각에서 작동합니다! 질문 3/3 우리는 다음 … Read more