일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 건담
- jsp
- html
- 반다이몰
- Python
- Flutter
- vscode
- Web
- 연습문제
- 일본어
- C로 시작하는 컴퓨터 프로그래밍4판
- javascript
- ruby
- springboot
- メソッド
- 인프런
- 単語
- 一日一つメソッド
- DART
- 日本語
- rails7
- java
- 자바
- Spring
- 비즈니스일본어
- rails
- nico
- CSS
- 건담베이스
- 디지몬
- Today
- Total
목록Python (25)
AR삽질러
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/byRcQz/btst6Njqc6g/fdQj732UcK2cs6IZrE6yz1/img.png)
Pyhon 기초문법 - 자료형(Data Type) 자료형 설명 예시 정수 int 소수점이 없는 수 num = 10 type(num) # 실수 float 소수점이 있는 수 ip = 3.14 type(y) # 복소수 complex 실수와 허수 부분을 가지고 있는 자료형 x = 2 + 6j type(x) # 논리 bool (true, false) 참 또는 거짓 중하나의 값 a = True b = False tyep(a) # 문자열 str 한개 이상의 문자 name = "AR" type(name) # 리스트 list 여러개의 요소를 순서대로 저장하는 자료형 tList = [1, 2, 3, "Python"] type(tList) # 튜플 typle 여러개의 요소를 순서대로 저장하지만 한번 생성하면 요소를 수정할 ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dJJUIg/btst5j4gLtu/JNINZqHQrzkkFFHNIbXRtK/img.png)
Python 변수(Variable) 데이터를 저장하고 참조하는데 사용되는 메모리공간을 변수라고 하며 값을 저장하는 컨테이너와 같은 역할을 한다. Variable 이름 규칙 1. 문자, 숫자 및 밑줄 문자(_)로 구성된다. 2. 숫자로 시작할 수 없다. 3. Python의 키워드를 변수의 이름으로 사용할 수 없다. name1 = 10 name_2 = "ar" _name3 = 30 Python 변수(Variable) 연습문제 1. 간단한 계산기 프로그램 1) 사용자로부터 두개의 숫자와 연산을 입력받는다. 2) 연산을 수행하고 결과를 출력하는 계산기 프로그 # 간단한계산기 프로그램 # 1. 사용자로부터 두개의 숫자와 연산을 입력받는다. # 2. 연산을 수행하고 결과를 출력하는 계산기 프로그램 def calcu..
D120:鉛筆の数 D120:연필의수 import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int number = sc.nextInt(); int result = number * 12; System.out.println(result); } } 12개가 하나인 연필이 들어있는 필통의 수를 입력받아 총연필의 수를 구하는 문제 1. Scanner sc = new Scanner(System.in); - java표준입출력 Scanner객체생성 - java標準入出力Scannerオブジェクトを作成 2. int number = sc.nextInt(); - 정수를 입력..
C064:paizaでお食事 C064:paiza에서의 식사 使用言語 : Python 사용언어 : Python food, employees = map(int, input().split()) calories_per_100g = [] for _ in range(food): calorie = int(input()) calories_per_100g.append(calorie) for _ in range(employees): menu = list(map(int, input().split())) total_calories = 0 for i in range(food): total_calories += calories_per_100g[i] * menu[i] // 100 print(total_calories) 설명 : 음식..
使用言語 : Python 사용언어 : Python budget, rides = input().split(' ') budget = int(budget) rides = int(rides) price_list = list() for i in range(rides): price = int(input()) price_list.append(price) point = 0 for price in price_list: if point >= price: point -= price else: budget -= price point += price * 0.1 print(budget, int(point)) 설명 : 사용자로부터 예산과 탑승횟수를 입력받아 각 탑승 횟수에 대한 예산과 포인트를 계산하는 문제 説明:ユーザーから予算と..