Skip to content

Instantly share code, notes, and snippets.

View kleahaka's full-sized avatar
💭
</>

🔁 kleahaka

💭
</>
View GitHub Profile
@kleahaka
kleahaka / score.py
Created April 1, 2024 19:53
scorechecker of grade
score = input('ENTER YOUR SCORE: ')
try:
scoreF =float(score)
except ValueError:
print('Bad score')
quit()
if scoreF>= 0.0 and score <=1.0:
if scoreF>= 0.9:
@kleahaka
kleahaka / leapyear.py
Created March 24, 2024 15:59
Leap Year
year = int(input("Enter year: "))
if year % 4 == 0:
if year % 100 == 0:
if year % 400:
print(f"{year} is a leap year.")
else:
print(f"{year} is not a leap year.")
else:
height = float(input("Enter your height in m: "))
weight = float(input("Enter your weight in kg: "))
bmi = round(weight / height ** 2,2)
if bmi < 18.5:
print(f"Your bmi is {bmi} , you are underweight.")
elif bmi < 25:
print(f"Your bmi is {bmi} , you weight is normal.")
elif bmi < 30:
//degree in Kalvin
const kelvin = 0;
//convert in celsius
var celsius = kelvin - 273;
//conver in fahrenheit
//rounded value in fahrenheit
let fahrenheit = celsius *(9/5) + 32;
fahrenheit = Math.floor(fahrenheit);
console.log(`The temperature is ${fahrenheit} degrees Fahrenheit`);
var newton = celsius *(33/100);