Fahrenheit to Celsius Function
Level EASY
Given three values - Start Fahrenheit Value (S), End Fahrenheit value (E) and Step Size (W), you need to convert all Fahrenheit values from Start to End at the gap of W, into their corresponding Celsius values and print the table.
Input Format :
Output Format :
Constraints :
Sample Input 1:
Sample Output 1:
Sample Input 2:
Sample Output 2:
120 48
160 71
200 93
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def printTable(start,end,step): | |
#Implement Your Code Here | |
while True: | |
c=0 | |
if start<=end: | |
c=(start-32)*5/9 | |
print(start,int(c)) | |
start = start + step | |
else:break | |
s = int(input()) | |
e = int(input()) | |
step = int(input()) | |
printTable(s,e,step) | |
Comments
Post a Comment
Please give us your valuable feedback