Programming/Python (파이썬) (10) 썸네일형 리스트형 setattr function Python | setattr() method. setattr() is used to assign the object attribute its value. Apart from ways to assign values to class variables, through constructors and object functions, this method gives you an alternative way to assign value. Syntax : setattr(obj, var, val) Parameters : obj : Object whose which attribute is to be assigned. var : object attribute which has to be assigned. val : val.. 67. PROJECT 9 - Make your own Coin! - Part 1 Python string capitalize In Python, the capitalize() method converts the first character of a string to capital (uppercase) letter. If the string has its first character as capital, then it returns the original string. www.geeksforgeeks.org/string-capitalize-python/#:~:text=In%20Python%2C%20the%20capitalize(),it%20returns%20the%20original%20string. 26. PROJECT 3: Email Slicer - Part 1- What are Slices? ::-1은 거꾸로 출력하는거 Strings 문자열 추출 docs.python.org/3.8/search.html?q=word&check_keywords=yes&area=default An Introduction to Interactive Programming in Python (Part 1) - Week 3: Event-Driven Programming What happens if you press a key and click the mouse at exactly the same time? >> One of the event handlers executes and the other waits in the event queue until the first handler finishes. You can't control the order that the system inserts events into the event queue and only one event handler executes at a time. An Introduction to Interactive Programming in Python (Part 1) - Week 2: More Operations - In Python, % operator computes the remainder of one number with respect to another. %: 나누기 연산 후 몫이 아닌 나머지를 구함 - In the expression 6 + 7 % 5, which operator is evaluated first (i.e., which has higher precedence)? % - In Python, what statement is used to load a module? import by Coursera An Introduction to Interactive Programming in Python (Part 1) - Week 2: Functions - : (colon) indicates that an indented block of code is about to begin. - Return statement causes a function to return a value. - If a Python function contains no return statement, what value does the function return? None by Coursera An Introduction to Interactive Programming in Python (Part 1) - Week 1: Variables Quiz 1. In Python 2, the result of dividing two integers is another integer. the value of -9 / 4 = -3 The exact answer rounded down to the nearest integer. Quiz 2. These expressions can be used to increment the value of a variable x by 1. x = x + 1 x += 1 += operator retrieves the value of the variable on left-hand side of the assignment, adds the value of the expression on the right-hand side, .. An Introduction to Interactive Programming in Python (Part 1) - Week 1: Arithmetic Expressions - In Python, the function int() converts to an integer, the function float() converts to a floating point number and the function str() converts to string. * integer = 정수 * floating point = (전산학) 이동 소숫점 terms.naver.com/entry.nhn?docId=4971&cid=43659&categoryId=43659 * string = 문자열 A string is a sequence of characters. A character is simply a symbol. by Coursera 이전 1 다음