Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Python Programs
    • Java Programs

Python asin

by suresh

The Python asin function is one of the Python Math function, which calculates the trigonometry Arc Sine for the specified expression. Python asin or Arc Sine also called the inverse of a Sine. In this section, we discuss how to use asin function in Python Programming language with example.

The syntax of the asin Function in Python Programming Language is

math.asin(number);

Number: A valid numerical expression to find Arc Sine value.

  • If the number argument is a positive or negative number, the asin function returns the Arc Sine value.
  • If it is not a number, the asin function returns TypeError.
  • And if it is outside the range -1 and 1, the asin function returns ValueError.

Python asin Function Example

The Python asin Function allows you to find the trigonometry Arc Sine for the numeric values. In this asin example, we are going to find the Arc Sine values of different data types and display the output

# Python ASIN Function

import math

Tup = (0.21, 0.12, 0.39, -0.89 , 0.42) # Tuple Declaration
Lis = [-0.1, 0.92, 0.35, -0.46 , 0.85] # List Declaration

print('Arc Sine value of Positive Number = %.2f' %math.asin(1))
print('Arc Sine value of Negative Number = %.2f' %math.asin(-1))

print('Arc Sine value of Tuple Item = %.2f' %math.asin(Tup[3]))
print('Arc Sine value of List Item = %.2f' %math.asin(Lis[2]))

print('Arc Sine value of Multiple Number = %.2f' %math.asin(0.10 + 0.20 - 0.40))
print('Arc Sine value of String Value = ', math.asin('Python'))

OUTPUT

Python ASIN Function

ANALYSIS

First, we used the asin Function directly on both the Positive integer and negative integer. The following statements find the Arc Sine of the corresponding values.

print('Arc Sine value of Positive Number = %.2f' %math.asin(1))
print('Arc Sine value of Negative Number = %.2f' %math.asin(-1))

Next, We used the asin Function on Tuple and List items. If you see the above screenshot, the asin function working perfectly on them.

print('Arc Sine value of Tuple Item = %.2f' %math.asin(Tup[3]))
print('Arc Sine value of List Item = %.2f' %math.asin(Lis[2]))

Next, We used the asin Math function directly on multiple values.

print('Arc Sine value of Multiple Number = %.2f' %math.asin(0.10 + 0.20 - 0.40))

Within the last statement, We tried the asin Function on the String value, and it returns TypeError.

print('Arc Sine value of String Value = ', math.asin('Python'))

Please refer to the Python sin Function article to understand the Python Sine Function.

Placed Under: Python

  • Download and Install Python
  • Python Arithmetic Operators
  • Python Assignment Operators
  • Python Bitwise Operators
  • Python Comparison Operators
  • Python Logical Operators
  • Python If Statement
  • Python If Else
  • Python Elif Statement
  • Python Nested If
  • Python For Loop
  • Python While Loop
  • Python Break
  • Python Continue
  • Python Dictionary
  • Python datetime
  • Python String
  • Python Set
  • Python Tuple
  • Python List
  • Python List Comprehensions
  • Python Lambda
  • Python Functions
  • Python Types of Functions
  • Python Iterator
  • Python File
  • Python Directory
  • Python Class
  • Python classmethod
  • Python Inheritance
  • Python Method Overriding
  • Python Static Method
  • Connect Python and SQL Server
  • Python SQL Create DB
  • Python SQL Select Top
  • Python SQL Where Clause
  • Python SQL Order By
  • Python SQL Select Statement
  • Python len Function
  • Python max Function
  • Python map Function
  • Python print Function
  • Python sort Function
  • Python range Function
  • Python zip Function
  • Python Math Functions
  • Python String Functions
  • Python List Functions
  • Python NumPy Array
  • NumPy Aggregate Functions
  • NumPy Arithmetic Operations
  • Python Numpy Bitwise operators
  • Numpy Comparison Operators
  • Numpy Exponential Functions
  • Python Numpy logical operators
  • Python Numpy String Functions
  • NumPy Trigonometric Functions
  • Python random Array
  • Python Numpy concatenate
  • Python Numpy Array shape
  • Python Pandas DataFrame
  • Pandas DataFrame plot
  • Python Series
  • Python matplotlib Histogram
  • Python matplotlib Scatter Plot
  • Python matplotlib Pie Chart
  • Python matplotlib Bar Chart
  • Python List Length
  • Python sort List Function
  • Python String Concatenation
  • Python String Length
  • Python Substring
  • Python Programming Examples
  • C Tutorial
  • C# Tutorial
  • Java Tutorial
  • JavaScript Tutorial
  • Python Tutorial
  • MySQL Tutorial
  • SQL Server Tutorial
  • R Tutorial
  • Power BI Tutorial
  • Tableau Tutorial
  • SSIS Tutorial
  • SSRS Tutorial
  • Informatica Tutorial
  • Talend Tutorial
  • C Programs
  • C++ Programs
  • Java Programs
  • Python Programs
  • MDX Tutorial
  • SSAS Tutorial
  • QlikView Tutorial

Copyright © 2021 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy