rpa게시판 글답변
본문 바로가기
메뉴열기
메뉴 닫기
아주방열린공장(홈)
나만의지도만들기W
가상쉬은라벨지만들기
텍스트QR
FAQ
1:1문의
접속자
4
새글
사용자메뉴
메뉴 닫기
사이트 내 전체검색
검색
뒤로가기
rpa게시판 글답변
rpa게시판 글답변
이름
필수
비밀번호
필수
이메일
홈페이지
옵션
html
제목
필수
내용
필수
웹에디터 시작
> > > students = [1,2,3,4,5] > print(students) > students = [i+100 for i in students] > > print(students) > > students = ["Iron man", "Thor", "I am groot"] > students = [len(i) for i in students] > > print(students) > > students = ["Iron man", "Thor", "I am groot"] > students = [i.upper() for i in students] > print(students) > > #Quiz 2:22:51 > > from random import * > > guests = range(1,51) > guests = list(guests) > > guests = [randrange(1,51) for i in guests] > > print(guests) > > matchs = range(1, 51) > match_tot = 0 > > for match_no in matchs: > if 5 <= guests[match_no-1] <=15 : > print("[O] {0}번째 손님 (소요시간 : {1}분)".format(match_no, guests[match_no-1])) > match_tot += 1 > else: > print("[ ] {0}번째 손님 (소요시간 : {1}분)".format(match_no, guests[match_no-1])) > > print("총 탑승 승객 : {}분".format(match_tot)) > > > > cnt = 0 > for i in range(1, 51): > time = randrange(1, 51) > if 5<= time <= 15: > print("[O] {0}번째 손님 (소요시간 : {1}분)".format(i, time)) > cnt+=1 > else: > print("[ ] {0}번째 손님 (소요시간 : {1}분)".format(i, time)) > > print("총 탑승 승객 : {}분".format(cnt)) > > > def open_account(): > print("새로운 계좌가 생성되었습니다.") > > open_account() > > def deposit(balance, money): > print("입금이 완료되었습니다. 잔액은 {0} 원입니다.".format(balance + money)) > return balance + money > > def withdraw(balance, money): > if balance >= money: > print("출금이 완료되었습니다. 잔액은 {0} 원입니다.".format(balance - money)) > else: > print("출금이 완료되지 않았습니다. 잔액은 {0}원입니다.".format(balance)) > > def withdraw_night(balance, money): > commission = 100 > return commission, balance - money - commission > > balance = 0 > balance = deposit(balance, 1000) > withdraw(balance, 2000) > withdraw(balance, 500) > > commission, balance = withdraw_night(balance, 500) > > print ("수수료 {0} 원이며, 잔액은 {1} 원입니다.".format(commission, balance)) > > > def profile(name, age=17, main_lang="파이썬"): > print("이름 : {0}\t나이 : {1}\t주 사용 언어 : {2}" \ > .format(name, age, main_lang)) > > profile("유재석", 20, "파이썬") > profile("김태호", 25, "파이썬") > profile("이세호") > > #key word > > def profile(name, age, main_lang): > print(name, age, main_lang) > > profile(name="유재석", main_lang="파이썬", age=20) > profile(main_lang="파이썬", age=20, name="유재석") > > def profilem(name, age, lang1, lang2, lang3, lang4, lang5): > print("이름 : {0}\t나이 : {1}\t".format(name, age), end=" ") > print(lang1, lang2, lang3, lang4, lang5) > > > profilem("유재석", 20, "Python", "Java","C", "C++", "C#") > profilem("김태호", 25, "Python", "Java"," ", " ", "") > > # 가변인자 > def profilev(name, age, *language): > print("이름 : {0}\t나이 : {1}\t".format(name, age), end=" ") > for lang in language: > print(lang, end="") > print() > > profilem("유재석", 20, "Python", "Java","C", "C++", "C#") > profilem("김태호", 25, "Python", "Java"," ", " ", "") > > > #지역변수, 전역변수 > > gun = 10 > > def checkpoint(soliders): > global gun > gun = gun - soliders > print ("[함수 내] 남은 총 : {0}".format(gun)) > > > print("전체 총 : {0}".format(gun)) > checkpoint(2) #2명이 > print("전체 총 : {0}".format(gun)) > checkpoint(2) > > def checkpoint_ret(gun, soliders): > gun = gun - soliders > print ("[함수 내] 남은 총 : {0}".format(gun)) > return gun > > print("전체 총 : {0}".format(gun)) > gun = checkpoint_ret(gun, 2) > print("전체 총 : {0}".format(gun)) > > quiz 2:53:59 > > def std_weight(height, gender): > if gender == "남자": > return height * height * 22 > else: > return height * height * 21 > > > height = 175 > gender = "남자" > > weight = round(std_weight(height / 100, gender),2) > print("키 {0}cm {1}의 표준 체중은 {2}kg 입니다.".format(height, gender, weight)) > > > > print("Python", "Java", sep=" vs ") > print("Python", "Java", sep=",", end="?") > print("Python", "Java") > > import sys > print("Python", "Java", file=sys.stdout) > print("Python", "Java", file=sys.stderr) > > > scores = {"수학":0, "영어":50, "코딩":100} > > for subject, score in scores.items(): > print(subject.ljust(8), str(score).rjust(4), sep=":") > > > # 은행 대기표 > > for num in range(1, 21): > print("대기번호 : " + str(num).zfill(3)) > > > answer = input("아무 값이나 입력하세요. : ") > print("입력하신 값은 " + answer + "입니다.") > print(type(answer)) > > > https://github.com/dlcjsdltlq/pokemon-bread-macro > >
웹 에디터 끝
링크 #1
링크 #2
파일 #1
파일첨부
파일 #2
파일첨부
자동등록방지
자동등록방지
숫자음성듣기
새로고침
자동등록방지 숫자를 순서대로 입력하세요.
취소
작성완료
Copyright ©
open.ajubang.com/mm
All rights reserved.
상단으로