This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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); |