0

Please help me

Question- Celsius to Fahrenheit You are making a Celsius to Fahrenheit converter. Write a function to take the Celsius value as an argument and return the corresponding Fahrenheit value. Sample Input 36 Sample Output 96.8 The following equation is used to calculate the Fahrenheit value: 9/5 * celsius + 32 How can i do this question?

21st Jan 2021, 5:03 AM
Kaustav Nath
14 odpowiedzi
+ 3
This is right or full code
21st Jan 2021, 7:57 AM
Naveen Rathore
Naveen Rathore - avatar
+ 3
celsius = int(input()) def conv(c): #your code goes here res= 9/5 * c + 32 return res fahrenheit = conv(celsius) print(fahrenheit)
12th Jun 2021, 9:27 PM
Bushra Fatah
Bushra Fatah - avatar
0
Just make a function that takes celsius as a parameter and returns the result of the the formula you have in your question and print the returned value.
21st Jan 2021, 5:08 AM
ChaoticDawg
ChaoticDawg - avatar
0
Try it yourself first and if you can't figure it out without the clues given then post the code from your try and we'll help you out. It's really permitted to just give the answers to the challenges here on SL.
21st Jan 2021, 5:49 AM
ChaoticDawg
ChaoticDawg - avatar
0
Def fun(c): return ((9/5) *c)+32
21st Jan 2021, 6:06 AM
Naveen Rathore
Naveen Rathore - avatar
0
But it is showing that test case 2,3 and 4 is wrong while the test case 1 is right. Test case 2 it is input 0 and expected output was 32.0. Test case 3 it is input 18 and expected output is 64.4 I have written the code as celsius = 36 def func(c): return ((9/5)*c) +32 fahrenheit = (9/5 * celsius)+32 print(fahrenheit) Please help
21st Jan 2021, 7:36 AM
Kaustav Nath
0
celsius = int(input()) def conv(c): #your code goes here return ((9 / 5) * c) + 32 fahrenheit = conv(celsius) print(fahrenheit) Got it.....
21st Jan 2021, 7:56 AM
Naveen Rathore
Naveen Rathore - avatar
0
Sample Input 36 Sample Output 96.8
6th Nov 2021, 9:31 AM
Nunthida sinkha
Nunthida  sinkha - avatar
0
celsius = int(input()) def conv(c): conv=((9/5)*celsius+32) fahrenheit=float() return conv fahrenheit = conv(celsius) print(fahrenheit)
3rd Jan 2022, 1:13 PM
Shahad Al-Shama
0
Great!
1st Oct 2022, 4:29 AM
Baysah Guwor
Baysah Guwor - avatar
0
import java.util.Scanner; public class Program { static double temp(double celsius){ double fahr = (1.8 * celsius) +32; return fahr; } //your code goes here public static void main(String[] args) { Scanner sc = new Scanner(System.in); double c = sc.nextDouble(); double fahr = temp(c); System.out.println(fahr); } } This is the easiest way to run it in Java
11th Apr 2024, 10:48 AM
Tony
- 1
Pleaase help with the code chaoticdog and naveen rathore because I know you have completed the course
21st Jan 2021, 7:39 AM
Kaustav Nath
- 4
I actually wanted the full code Please help me with the full code Chaoticdawg
21st Jan 2021, 5:42 AM
Kaustav Nath