대학생 코딩 과제 대행 java, python, oracle 네 번째

https://open.kakao.com/o/s3aMpbA

캐나다 칼턴 대학교에서 Introduction to Computer Science 1수업의 퀴즈 의뢰가 들어왔다.
총 5문제다.
Python3 으로 풀어야 된다고 의뢰했다.

r1 = input("what is the first circle's radius?")
r2 = input("what is the second circle's radius?")

r1 = float(r1)
r2 = float(r2)

r1_circumference = 2*math.pi*r1
r1_area = math.pi*r1*r1

r2_circumference = 2*math.pi*r2
r2_area = math.pi*r2*r2

if(r1_circumference>r2_circumference):    
     print("The first circle is bigger than second circle ")
elif(r1_circumference<r2_circumference):    
     print("The second circle is bigger than first circle")
elif(r1_circumference==r2_circumference):    
     print("The first circle is same to second circle")





Z만 출력!

i=8
while(i<39):    
    print(i)
    i+=6



for i in range(2,11,2):    
    for j in range(i):        
        if(i==4 and j==1):            
            print("-",end="")
        elif(i==6 and j>=1 and j<=2):            
            print("-",end="")
        elif(i==8 and j>=1 and j<=3):            
            print("-",end="")
        elif(i==10 and j>=1 and j<=4):            
            print("-",end="")
        else:            
            print("*",end="")
    print()










뭐 대충 이런식으로 해봤다.

댓글

이 블로그의 인기 게시물

About JVM Warm up

About idempotent

About Kafka Basic

About ZGC

sneak peek jitpack

Spring Boot Actuator readiness, liveness probes on k8s

About Websocket minimize data size and data transfer cost on cloud

About G1 GC