#python program to check if the Number is positive, Negative and zero
num=float(input("Enter the Number: "))
if num > 0 :
print("Number is positive")
elif num < 0:
print("Number is negative")
else :
print("Number is zero")
num=float(input("Enter the Number: "))
if num > 0 :
print("Number is positive")
elif num < 0:
print("Number is negative")
else :
print("Number is zero")
Draw S logo by using in python https://youtube.com/shorts/lLJJW6A94xY?feature=share
YouTube
Draw S logo by using turtle in python #smw_official #smw_media
#python,#smw_official,#smw_media,#python, #py, #python3, #pythonprogramming, #pythons, #pythoncode, #pythonlearning, #pythondeveloper, #pythonregius, #python...
Python programming codes
"""Tracking your BMI is a useful way of checking if you’re maintaining a healthy weight. It’s calculated using a person's weight and height, using this formula: weight / height² The resulting number indicates one of the following categories: Underweight…
YouTube
It’s calculated using a person's weight and height, using this formula: weight / height² #python
#smw_officail #python#pythonprograms#programming#ballpython#coding#java#programmer#html#javascript#php#css#pythonsofinstagram#developer#code#software#webdeve...
How the string does get converted to a number?
Junior
To convert the string into a number the built-in functions are used like int() a constructor. It is a data type that is used like int (‘1’) == 1.
float() is also used to show the number in the format as float(‘1’) = 1.
The number by default are interpreted as a decimal and if it is represented by int(‘0x1’) then it gives an error as ValueError. In this the int(string,base) the function takes the parameter to convert string to number in this the process will be like int(‘0x1’,16) == 16. If the base parameter is defined as 0 then it is indicated by octal and 0x indicates it as a hexadecimal number.
There is function eval() that can be used to convert a string into number but it is a bit slower and present many security risks #python
Junior
To convert the string into a number the built-in functions are used like int() a constructor. It is a data type that is used like int (‘1’) == 1.
float() is also used to show the number in the format as float(‘1’) = 1.
The number by default are interpreted as a decimal and if it is represented by int(‘0x1’) then it gives an error as ValueError. In this the int(string,base) the function takes the parameter to convert string to number in this the process will be like int(‘0x1’,16) == 16. If the base parameter is defined as 0 then it is indicated by octal and 0x indicates it as a hexadecimal number.
There is function eval() that can be used to convert a string into number but it is a bit slower and present many security risks #python