Can someone pls help me, I'm really confused | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Can someone pls help me, I'm really confused

Write a program that checks if the water is boiling. Take the integer temperature in Celsius as input and output "Boiling" if the temperature is above or equal to 100. Sample Input 105 Sample Output Boiling My answer temp = int(input()) if temp >= 100: print (temp("Boiling")) else: print ("The water is not boiling") There is something wrong about my answer

23rd Jan 2021, 3:01 PM
Darkchocoo
Darkchocoo - avatar
13 Answers
+ 5
Firstly, `temp` is not the name of a function. Why are you calling it on line 4? The `temp` on that line is just wrong and useless. Secondly, you need indentation in if statements. See here how to use if-statements again (especially read the yellow box on page 1) https://www.sololearn.com/learning/2277/
23rd Jan 2021, 3:06 PM
XXX
XXX - avatar
+ 1
Indentation issue. temp = int(input()) if temp >= 100: print('Boiling'); else: print('Not boiling');
23rd Jan 2021, 3:05 PM
Avinesh
Avinesh - avatar
+ 1
temp = int(input()) If temp >=100: Print ("Boiling") Put some space before print("boiling") Otherwise indentation issue
9th Mar 2022, 1:16 PM
Hashir
0
Write a program that checks if the water is boiling Take the integer temperature in Celsius as input and output "Boiling" if temperature is above or equal to 100 Sample Input 105 Sample output Boiling My answer: temp = int(input()) if temp>=100: print("Boiling") else: print(" ")
22nd Mar 2021, 2:44 PM
Narnavaram Dilip Kumar
Narnavaram Dilip Kumar - avatar
0
Write a program that checks if the water is boiling. Take the integer temperature in Celsius as input and output "Boiling" if the temperature is above or equal to 100. Sample Input 105 Sample Output Boiling temp = int(input()) if temp >= 100: print('Boiling');
28th Sep 2021, 12:51 PM
Priyanka Arora
Priyanka Arora - avatar
0
temp = int(input()) if temp>=100: print("Boiling")
25th Jan 2022, 12:30 PM
Riad Kaptan
0
This is my equation yet im still wrong Temp = int(input()) if temp >= (100 * 9/5): print(“boiling”) Im new to this and im pretty sure im getting tunnel vision can anyone help i dont need the answer just direction
18th Feb 2022, 7:03 PM
Curt
Curt - avatar
0
8th Mar 2022, 6:59 AM
George Darsalia
0
Answer
29th Mar 2022, 4:35 AM
Javandhra Ravi Bharatbhai
0
But app doesn't accept the right code
10th Apr 2022, 3:09 PM
Tekeshwar Bhoyar
0
Boiling Water You are making a program for a water sensor that should check if the water is boiling. Take the integer temperature in Celsius as input and output "Boiling" if the temperature is above or equal to 100. Output "Not boiling" if it's not. Sample Input 105 Sample Output Boiling ____________________________________________________________________________________________________________________ THIS CODE PASSED ALL THE TEST CASES !!!!!!!! import java.util.Scanner; public class BoilingWaterSensor { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int temperature = scanner.nextInt(); scanner.close(); String result = checkBoiling(temperature); System.out.println(result); } private static String checkBoiling(int temperature) { if (temperature >= 100) { return "Boiling"; } else { return "Not boiling"; } } }
30th Nov 2023, 6:40 AM
SHREYAS GN
SHREYAS GN - avatar
- 1
Thank youuu🙂
23rd Jan 2021, 3:08 PM
Darkchocoo
Darkchocoo - avatar
- 2
temp = int(input()) if temp >= 100: print("Boiling") this is the answer. B should be capital in Boiling
29th Mar 2022, 2:33 AM
H.M.H.Prabhashani