Skip to content

Instantly share code, notes, and snippets.

@NotoriousArnav
Created August 17, 2022 17:14
Show Gist options
  • Save NotoriousArnav/fa205ddeb640a9c6c9b1ff0dc8936c4f to your computer and use it in GitHub Desktop.
Save NotoriousArnav/fa205ddeb640a9c6c9b1ff0dc8936c4f to your computer and use it in GitHub Desktop.
test
import random
greetings=["Namaste", "Hola", "Hello", "Hi", "Subheccha", "Wenhou", "Konichiwa", "annyeonghasibnikka"]
name = input("Enter Your Name: ")
print(random.choice(greetings), name, sep=" ")
user_float = float(input("enter any number: "))
if user_float==0:
print("Zero")
elif user_float>0:
print("+ve")
else:
print("-ve")
# Goal: To get Square and Square root of any number given by user
num= float(input ("Enter a number "))
sq=num*num
sqrt=num **(1/2)
print (f"your square of the given is {sq} and square root is {sqrt}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment