
03. Introduction and practice of engineering computer(Factorial & Stars)
[toc] 공학컴퓨터입문및실습 과제3 5!을 구해보자 #include <stdio.h> int main(void) { int i = 5; int factorial = 1; while (i >= 1) { factorial *= i; i--; } printf("%d \n", f...
[toc] 공학컴퓨터입문및실습 과제3 5!을 구해보자 #include <stdio.h> int main(void) { int i = 5; int factorial = 1; while (i >= 1) { factorial *= i; i--; } printf("%d \n", f...
[toc] Circuit Theory HW4 문제 파이썬으로 2X2 행렬값을 입력한 후, 역행렬을 구하라 코드 1. 생각의 흐름을 따라 작성 print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") a = list(map(int, input('Input the elements in a 2x2 Matrix: '...
[toc] 공학컴퓨터입문및실습 과제2 문자를 입력 받아 아스키코드 찾기 #include <stdio.h> int main(void) { char ch; printf("문자를 입력하시오: "); ch = getchar(); printf("아스키 코드: %d\n", ch); //문자를 정수로 받으면 아스키...
[toc] 공학컴퓨터입문및실습 과제1 4칙연산 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(void) { int x; int y; int result; printf("첫 번째 숫자를 입력해주세요. :"); // 첫 번째 숫자를 지정합니다. sc...
[toc] 파이썬(입문) 예제풀이 문자열을 입력받고, 영어 대문자, 소문자, 한글, 숫자, 특수문자로 구분하기 # 코드 a = input("문자열을 입력하세요. ") sUpper = "대문자 : " sLower = "소문자 : " sNum = "숫자 : " sKor = "한글 : " sSpc = "특수문자 : " for i in range(0, ...
[toc] 파이썬(입문) 과제4 객체 지향(Object oriented) 그림판 객체 지향 프로그래밍이란? 프로그래밍에서 필요한 데이터를 추상화시켜 상태와 행위를 가진 객체를 만들고 그 객체들 간의 유기적인 상호작용을 통해 로직을 구성하는 프로그래밍 방법 # 코드 from tkinter import * ...
[toc] 파이썬(입문) 과제3 로또번호 추출 프로그램 # 코드 import random def getNumber(): return random.randrange(1, 45) lotto = [] num = 0 print("로또 추첨을 시작합니다.\n") while True: num = getNumber() if lo...
[toc] 파이썬(입문) 과제2 Turtle 거북이로 무작위 방향으로 그림을 그리는 UI 구현 #프로그램1 import turtle import random ## 전역 변수 선언 ## myTurtle, tX, tY, tColor, tSize, tShape = [None] * 6 shapeList = [] playerTurtles = [] sw...
[toc] 파이썬(입문) 과제1 가위바위보 게임 비기는 것이 없는 버전 import random # 랜덤함수 불러오기 a = ["가위", "바위", "보"] # 가위바위보 리스트 win = 0 lose = 0 draw = 0 while True: computer = random.choice(a) # 컴퓨터가 랜덤으로 가위바위보...
[toc] 통계학 중간고사 정리 1. 기본용어 정리 용어 설명 실험단위 사물, 사람 등 자료를 수집하는 실험 대상인 객체 모집단 실험단위의 전체 집합 변수 모집단의 특성이나 성질 ...