Challenge: Oven is Ready
Test yourself and implement what you have learned so far in this chapter.
We'll cover the following
Problem statement
Your oven has an initial temperature and you need to heat it to 375o. If the temperature of the oven, upon checking, is under 375o, you increase the temp by 25o each time.
You need to keep track of the number of times you had to increase the temperature by 25o.
Input
The input will be the variable temperature
which stores the current temperature of the oven.
You also have a variable count
which keeps track of the number of times you increased the temperature of the oven.
count
andtemperature
have already been declared for you.
Output
The output will be the number of times you increased the temperature of the oven.
Sample input
300
Sample output
3
Test yourself
Write your code in the given area. Try the exercise by yourself first, but if you get stuck, the solution has been provided. Good luck!
Create a free account to access the full course.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy