Viết chương trình Python nhập vào chiều dài và chiều rộng của hình chữ nhật và hiển thị chu vi và diện tích hình chữ nhật.
K
Khách
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.


NT
8 tháng 3 2023
import math
r = float(input('r = '))
C = math.pi * r * 2
S = math.pi * r**2
print ('Chu vi của hình tròn là: ', C, 'cm')
print ('Diện tích của hình tròn là: ', S, 'cm2')

8 tháng 1 2023
n = int(input("nhập năm dương lịch: "))
if n%4 == 100 or (n%4 == 0 and n%100 == 0):
print("năm đó là năm nhuận")
else:
print("năm đó không phải là năm nhuận")

23 tháng 12 2022
n=float(input())
if(n<5):
print(n*20000)
else:
print(n*18000)
PT
6

28 tháng 3 2022
(1): Chọn ô, hàng, cột
(2): Lay out --> Alignment --> ...
PT
14

28 tháng 3 2022
b1: insert => table => insert table
b2: điền số hàng số cột
b3: OK

dai=float(input())
rong=float(input())
c=(dai+rong)/2
s=dai*rong
print(c,s)
# Take the length and width of a rectangle from the user.
length = int(input())
width = int(input())
# Display the perimeter and area of the rectangle on the screen.
print("The Perimeter of the rectangle is:")
print("The area of the rectangle is:")