예제2 python data structures 1주차 -string 문자열에 대한 강의를 보았음 즉 바나나는 오퍼레이터가 0,1,2,3,4,5 임 이 말은 즉슨 word='banana' 라고 하면 w[0] -> b w[4] -> n 이란 의미 이 정도만 알아도 대부분 이해가 가서 바로 과제로 넘어간다 1주차 과제 6.5 Write code using find() and string slicing (see section 6.10) to extract the number at the end of the line below. Convert the extracted value to a floating point number and print it out. 6.5 find()와 스트링 슬라이싱(섹션 6.10 참조)을 사용하여 아래 줄 끝에 있는 숫자를 추출하는 코드를 작성하십시오.. 2022. 1. 14. 모두를 위한 프로그래밍 7주차 for 문을 이용하는 강의 파이썬은 복수형을 이해하지 못하기 때문에 아래 예시에서는 리스트 형으로 이해하여 오른쪽 처럼 출력하게 하게 된다 과제 5.2 Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number. En.. 2022. 1. 13. 이전 1 다음