当前位置:网站首页>三角函数计算
三角函数计算
2022-06-29 02:12:00 【长街395】
描述
根据下面公式计算并输出x的值,a和b的值由用户输入,括号里的数字是角度值, 要求圆周率的值使用数学常数math.pi,三角函数的值用math库中对应的函数进行计算 。

输入格式
输入包括两行, 每行一个数字。
输出格式
表达式的值
输入输出示例
输入:2 5
输出:-0.9209814967618768
import math
a = eval(input())
b = eval(input())
x = (-b+math.sqrt(2 * a * math.sin(math.pi / 3)*math.cos(math.pi / 3)))/(2 * a)
print(x)边栏推荐
- 【网络通信学习笔记】Socket.IO的搭建和部署
- SAP ui5 beginner tutorial 22 - development and use of filter
- [redis] hash type
- How to choose source code encryption software
- Secondary encapsulation of storage (sessionstorage/localstorage) using TS
- How to become a senior digital IC Design Engineer (6-5) digital IC Verification: coverage collection
- Qt基础教程:QStringList
- C language course design - food warehouse management system
- 110. simple chat room 13: chat room server
- Pyinstaller打包pikepdf失败的问题排查
猜你喜欢
![[redis] set type](/img/97/0a83016e89316849c01072044f2124.png)
[redis] set type

How to become a senior digital IC Design Engineer (4-5) script: file comparison operation implemented by shell script

How to become a senior digital IC Design Engineer (4-3)

C language course design - food warehouse management system

Differences between web testing and app testing

How to use project Gantt chart to make project report

Crawler exercise (IV) -- IP address problem

【Redis】Hash类型
Scala 基础 (三):运算符和流程控制

干货丨微服务架构是什么?有哪些优点和不足?
随机推荐
如何成为一名高级数字 IC 设计工程师(6-4)数字 IC 验证篇:测试点分解
【Redis】数据介绍 & 通用命令 & String类型
chrome浏览器关闭更新弹窗
如何用项目甘特图,做好项目汇报
TiFlash 面向编译器的自动向量化加速
B1006 output integer in another format
How to become a senior digital IC Design Engineer (6-6) digital IC Verification: system level simulation
[learn FPGA programming from scratch -49]: Vision - how is the chip designed?
SAP ui5 beginner tutorial 22 - development and use of filter
Utiliser kubernets Resource Lock pour compléter son application ha
Which brokerage is safer and more convenient to open an account for compass mobile stock?
Is there any risk in opening an account for Dongfang fortune stock? Is it safe for Dongfang fortune to open an account
A full screen gesture adaptation scheme
Scala 基础 (三):运算符和流程控制
Adding, deleting, checking and modifying stack - dynamic memory
SystemVerilog-结构体(一)
如何成为一名高级数字 IC 设计工程师(6-7)数字 IC 验证篇:DEBUG 技巧
什么叫股票线上开户?网上开户安全么?
【Redis】Key的层级结构
【Redis】List类型