+ 1
How to add this?
A = input() Now, how to add this integer a with a decimal?(like 0.8) if i can get this answer, i can make a celcius converter on my next project. Please help. If this question is already asked, Let me know in the comments below.
13 Respuestas
+ 2
conversion of celcius to fahreneit should use this formula:
C*9/5+32
but your is 9/5 - C + 32
anyway, if you convert input to int at first line, you do not need to repeat it in second line...
and converting to float rather than int would be more generic (as int can be parsed to float, but not the converse)
+ 3
you first need to convert input (string) to number:
A = float(A)
then you could do mathematical expressions:
A = A+0.8
+ 2
Ty. Now my (-3 iq)brain can do it while im in shower coz it best place to thincc
+ 2
+ 2
A = int(input())
B = 9/5 -1 *int(a) + 32
+ 2
Wat is generic
+ 1
W8, my last braincell is sus that the input() wood work. Do u have an answer?
+ 1
Okay?
+ 1
This is my formula for the celcius converter. But it is inaccurate if i put the number 2
+ 1
In putting the number 1 its accurate
+ 1
generic: wich could handle more cases...
0
???
I don't understand... :(
could you be more descriptive?
and share your whole code?
- 1
Maybe this example can help you:
celsius = int(input())
def conv(c):
f = ((9/5)*c)+32 #even the * is handled before the +
return f
fahrenheit = conv(celsius)
print(fahrenheit)