当前位置:网站首页>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
边栏推荐
- Convert flat structure to tree structure
- QT basics tutorial: qstringlist
- What is stock online account opening? Is it safe to open an account online?
- 【Redis】List类型
- 利用kubernetes資源鎖完成自己的HA應用
- 【Redis】Key的层级结构
- Why is it recommended that you choose the self research company as much as possible
- 如何用项目甘特图,做好项目汇报
- What is the Valentine's Day gift given by the operator to the product?
- 【Redis】Set类型
猜你喜欢

如何成为一名高级数字 IC 设计工程师(4-5)脚本篇:Shell 脚本实现的文件比较操作

【Redis】SortedSet类型
![[redis] key hierarchy](/img/ab/a5d3bb61b4571966d0f47037af4f41.png)
[redis] key hierarchy

OpenResty 使用介绍

I have summarized some experiences from the whole process of R & D platform splitting

What is the Valentine's Day gift given by the operator to the product?

【Redis】List类型

如何用项目甘特图,做好项目汇报

Understand flex layout in an article
Scala 基础 (三):运算符和流程控制
随机推荐
B1009 irony
Project R & D, what are the free brain mapping tools that are easy to use
OculusRiftS与Unity.UI的交互(1)-总览
Oculusrifts and unity UI interaction (1) - Overview
e. Difference between target and e.currenttarget
Set set
字符串方法练习
When you complain about the roll, others have quietly begun to prepare for the golden three silver four
项目研发,有哪些好用的免费脑图工具软件
目标检测——ADAS实战
三角函数计算
如何成为一名高级数字 IC 设计工程师(4-5)脚本篇:Shell 脚本实现的文件比较操作
How to become a senior digital IC Design Engineer (3-5) tools: Spyglass Technology
Understand flex layout in an article
【网络通信学习笔记】Socket.IO的搭建和部署
Which is the best billing method for okcc call center
Crawler exercise (IV) -- IP address problem
温度转换 II
QT basics tutorial: data types and containers
如何成为一名高级数字 IC 设计工程师(5-1)理论篇:时钟技术、复位技术