当前位置:网站首页>Calculate rectangular area
Calculate rectangular area
2022-06-29 02:18:00 【Long street 395】
describe
The user enters the length and width of the rectangle , Calculate its area and output .
a = eval(input()) # Enter an integer string , Convert to integer ; Enter the floating-point number string , Convert to floating point
b = float(input()) # Enter integer and floating point numbers , Are converted to floating point numbers
c = int(input()) # Only integer inputs are accepted , The output is an integer
#eval() and float() Functions can put input() The numeric string received by the function is converted to numeric type
# example :float('3.14') The result is numerical 3.14
#int() The function can convert an integer string to an integer
# example :int('5') The result is numerical 5
Input format
Enter a number on the first line , Represents the length of the rectangle
Enter a number on the second line , Represents the width of the rectangle
( Input usage input(), Don't add additional tips )
Output format
Area of output rectangle , Unlimited decimal places
Example 1
Input :
3.1415926
5.88
Output :
18.472564488
Example 2
Input :
5
8
Output :
40 Explain :
# User input length and width , Calculate the area of the rectangle
width = eval(input()) # Input width
length = eval(input()) # Input length
area = width * length # Calculated area
print(area) # Output area
边栏推荐
- Eliminate the hover effect when the button is disabled
- 大智慧手机股票开户哪个券商更安全更方便?
- Blog publishing test 2
- [从零开始学习FPGA编程-49]:视野篇 - 芯片是如何被设计出来的?
- Fundamentals of scala (3): operators and process control
- Koa 快速入门
- Dialogue with opensea co creation Alex: we still only touch the tip of the iceberg of NFT capability | chain catcher
- When you complain about the roll, others have quietly begun to prepare for the golden three silver four
- Qt基础教程:QStringList
- How does flush open an account? Is it safe to open an account online?
猜你喜欢
随机推荐
Blog publishing test 1
[从零开始学习FPGA编程-50]:视野篇 - 芯片是如何被制造出来的?芯片制造的十三大步骤。
【Redis】SortedSet类型
如何成为一名高级数字 IC 设计工程师(4-3)脚本篇:C 语言实现的文件读写操作
RISC CPU design based on FPGA (4) 36 questions about the project and their answers
为什么要在网站上安装SSL证书?
字符串方法练习
如何成为一名高级数字 IC 设计工程师(1-1)Verilog 编码语法篇:引言
11-Go基础:接口
110. simple chat room 13: chat room server
How to become a senior digital IC Design Engineer (6-6) digital IC Verification: system level simulation
[redis] set type
【Redis】Key的层级结构
【网络通信学习笔记】Socket.IO的搭建和部署
Oculusrifts and unity UI interaction (1) - Overview
Tiflash compiler oriented automatic vectorization acceleration
Google Borg论文
How to become a senior digital IC Design Engineer (6-7) digital IC Verification: debug skills
在按钮禁用时消除hover效果
110. 简易聊天室13:聊天室服务端




![[redis] set type](/img/97/0a83016e89316849c01072044f2124.png)



