Comments (10)
I have done it. Please check.
from python.
temperature=float(input())
celsius=input()
if (temperature<=0 and celsius=='True') or (temperature<=32 and celsius=='False'):
print("Freezing")
else:
print("Not freezing")
from python.
Tempeture
Temp = -8
Celcius
Cel = True
Conditionals For Temp & Cel To Be Considered Freezing Or Not.
if Cel == True and Temp <= 0:
print "Freezing!!!"
elif Cel == True and Temp > 37.7:
print "Really Hot!!!"
elif Cel == False and Temp <= 32:
print "Freezing!!!"
elif Cel == False and Temp >= 100:
print "Really Hot!!!"
else:
print "Not Freezing"
from python.
if temperature >32:
(Indent)print("Not Freezing")
elif temperature <= 32 and Celsius == False:
(Indent)print("Freezing")
elif temperature <=0 and Celsius == True:
(Indent)print("Freezing")
else:
(Indent)print("Unknown")
from python.
temperature = input(">::Enter Temp Value =")
celsius = input(">::Celsius -> Enter True or False:")
if (celsius == True and temperature <= 0) or (celsius == False and temperature <= 32):
print ("Freezing")
else:
print ("Not freezing")
from python.
@coded92 Can we please have a better title on this issue?
from python.
temperature = -3.7
celsius = TrueYou may modify the lines of code above, but don't move them! When you Submit your code, we'll change these lines to assign different values to the variables.
Above are given two variables. temperature is a float that holds a temperature. celsius is a boolean that represents whether the temperature is in Celsius; if it's False, then the given temperature is actually in Fahrenheit.
Add some code below that prints "Freezing" if the values above represent a freezing temperature, and "Not freezing" if they don't.
In Celsius, freezing is less than or equal to 0 degrees. In Fahrenheit, freezing is less than or equal to 32 degrees.
Comment your code
temperature = eval(input("Enter Temperature : "))
Celsius = input("Enter input(Celsius = True/Fahrenheit = False) : ")
if Celsius == True:
if temperature <= 0:
print("Freezing")
else:
print('Not Freezing')
else:
if temperature <= 32:
print("Freezing")
else:
print("Not Freezing")
from python.
temperature = -3.7
celsius = TrueYou may modify the lines of code above, but don't move them! When you Submit your code, we'll change these lines to assign different values to the variables.
Above are given two variables. temperature is a float that holds a temperature. celsius is a boolean that represents whether the temperature is in Celsius; if it's False, then the given temperature is actually in Fahrenheit.
Add some code below that prints "Freezing" if the values above represent a freezing temperature, and "Not freezing" if they don't.
In Celsius, freezing is less than or equal to 0 degrees. In Fahrenheit, freezing is less than or equal to 32 degrees.
Comment your code
def isFreezing():
if celsius and temperature <= 0:
print("Freezing")
elif not celcius and temperature <= 32:
print("Freezing")
else:
print("Not Freezing")
isFreezing()
from python.
if celsius and temperature <=0 :
print("Freezing")
elif not celsius and temperature <= 32 :
print ("Freezing")
else:
print ("Not freezing")
Instead of checking Fahrenheit and Celsius
together, we could convert one to the other:
if not celsius:
temperature = (temperature - 32) / 1.8
if temperature <= 0:
print("Freezing")
else:
print("Not freezing")
from python.
temperature = -3.7
celsius = True
#You may modify the lines of code above, but don't move them!
#When you Submit your code, we'll change these lines to
#assign different values to the variables.
#Above are given two variables. temperature is a float that
#holds a temperature. celsius is a boolean that represents
#whether the temperature is in Celsius; if it's False, then
#the given temperature is actually in Fahrenheit.
#Add some code below that prints "Freezing" if the values
#above represent a freezing temperature, and "Not freezing"
#if they don't.
#In Celsius, freezing is less than or equal to 0 degrees.
#In Fahrenheit, freezing is less than or equal to 32 degrees.
#Add your code here!
if (celsius == True and temperature <= 0) or (celsius == False and temperature <= 32):
print("Freezing")
else:
print("Not freezing")
from python.
Related Issues (20)
- .... HOT 1
- I checked the repository using black(plugin) HOT 1
- Learn with python HOT 1
- python HOT 1
- Added autocomplete solution to repo HOT 4
- Abcd HOT 1
- Hd HOT 2
- G HOT 1
- Hola HOT 1
- Basic about core
- Ptjso
- Python
- sudo apt-get update HOT 2
- First time HOT 2
- Python learn
- Projects
- Hi, I'm a beginner in software engineering. I'm looking for a community to join and means to gain experience and knowledge on language like js, python and others
- Shaurya
- Xaccer
- geek
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python.