+ 1
You are making a Celsius to Fahrenheit converter. Write a function to take the Celsius value as an argument and return the cor
29 Answers
+ 26
celsius = int(input())
def conv(c):
#your code goes here
return (c*9/5)+32
fahrenheit = conv(celsius)
print(fahrenheit)
+ 5
celsius = int(input())
#remember to indent your code
def conv(c):
#your code goes here
#converts the celsius to fahrenheit
return 9/5 * c + 32
fahrenheit = conv(celsius)
print(fahrenheit)
+ 1
celsius = int(input())
def conv(c):
#your code goes here
fahrenheit =con(c)
fahrenheit = conv(c)
print(fahrenheit)
+ 1
Actually, the formula is provided on the question page. You just have to copy and paste into the function.
https://code.sololearn.com/cmb1VX4r61pq/?ref=app
+ 1
celsius = int(input())
remember to indent your code
def conv(c):
#your code goes here
#converts the celsius to fahrenheit
return 9/5 * c + 32
fahrenheit = conv(celsius)
print(fahrenheit)
+ 1
celsius = int(input())
def conv(c):
#your code goes here
return (c*9/5)+32
fahrenheit = conv(celsius)
print(fahrenheit)
+ 1
celsius = int(input())
def conv(c):
#your code goes here
fahrenheit = 9/5 * celsius + 32
return fahrenheit
fahrenheit = conv(celsius)
print(fahrenheit)
+ 1
import java.util.Scanner;
public class Program {
//your code goes here
static double fahr(double c){
double calc = ((1.8 * c) + 32);
return calc;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double c = sc.nextDouble();
System.out.println(fahr(c));
}
}
+ 1
CORRECT
import java.util.Scanner;
public class Converter {
static double fahr(double celsius) {
double fahrenheit = 1.8 * celsius + 32;
return fahrenheit;
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("");
double celsiusValue = scanner.nextDouble();
double fahrenheitValue = fahr(celsiusValue);
System.out.println("" + fahrenheitValue);
scanner.close();
}
}
0
Can anybody tell the code for this
0
Thanks
0
https://code.sololearn.com/cPubX09zV06b/?ref=app
See this...
0
Here is my solution if you can read it
celsius = int(input())
def conv(c):
#your code goes here
result = (9/5*celsius+32)
return result
fahrenheit = conv(celsius)
print(fahrenheit)
0
celsius = int(input())
def conv(c):
#your code goes here
result = (9/5*celsius+32)
return result
fahrenheit = conv(celsius)
print(fahrenheit)
0
celsius = int(input())
def conv(c):
#your code goes here
return (c*9/5)+32
fahrenheit = conv(celsius)
print(fahrenheit)
0
celsius = int(input())
def conv(c):
#your code goes here
return (c*9/5)+32
fahrenheit = conv(celsius)
print(fahrenheit)
0
celsius = int(input())
def conv(celsius):
fahrenheit = (1.8 * celsius + 32)
print(fahrenheit)
conv(celsius)
0
celsius = int(input())
def conv(c):
fahrenheit=9/5*c+32
return fahrenheit
fahrenheit = conv(celsius)
print(fahrenheit)
0
celsius = int(input())
def conv(c):
fahrenheit = 9/5 * c +32
print(fahrenheit )
conv(celsius)
#You may not put celsius value in function conv
0
celsius = int(input())
def conv(c):
#your code goes here
return (9/5*c+32)
fahrenheit = conv(celsius)
print(fahrenheit)