Questions tagged [unit-conversion]
Code whose primary purpose is to convert quantities from one system of measurement to another
105 questions
3
votes
1
answer
103
views
Basic rust Celsius to Fahrenheit conversion
I've been following the rust book, and I made a Celsius to Fahrenheit converter as it advised me.
After a bit, I came up with this code; however in my opinion, there's a lot of unnecessary parts that ...
2
votes
1
answer
111
views
Python 3.10+: an exploration of meta classes and subclasses through the lens of metric (SI) prefixes with subclass-able units and changeable bases
Problem Statement
From the National Institute of Standards and Technology's Office of Weights and Measures, one can find a handy list of all the metric prefixes:
e.g.
Purpose
Name
Symbol
Factor
Name
...
5
votes
3
answers
780
views
Temperature unit conversion in Rust
Below is a simple Rust program which inter-converts temperature between the Celsius scale and the Fahrenheit scale. It takes two inputs:
scale referring to the temperature scale of the next input
the ...
0
votes
1
answer
157
views
Celsius Fahrenheit converter
I'm trying to learn Rust and for this reason I'm reading the Rust Book. It contains the following exercise:
Convert temperatures between Fahrenheit and Celsius.
Here's my take. Note I'm only using ...
1
vote
1
answer
109
views
Temperature Scale Converter in Rust
Problem statement:
Write a program that converts all given temperatures from a given input temperature scale to a given output temperature scale. The temperature scales to be supported are Kelvin, ...
3
votes
2
answers
501
views
Temperature Scale Converter in Python
Problem statement:
Write a program that converts all given temperatures from a given input temperature scale to a given output temperature scale. The temperature scales to be supported are Kelvin, ...
2
votes
2
answers
406
views
Temperature Scale Converter in Kotlin
Problem statement:
Write a program that converts all given temperatures from a given input temperature scale to a given output temperature scale. The temperature scales to be supported are Kelvin, ...
1
vote
2
answers
213
views
Temperature Scale Converter in Java (for 8 scales)
Problem statement:
Write a program that converts all given temperatures from a given input temperature scale to a given output temperature scale. The temperature scales to be supported are Kelvin, ...
1
vote
2
answers
151
views
Temperature Scale Converter in Clojure
Problem statement:
Write a program that converts all given temperatures from a given input temperature scale to a given output temperature scale. The temperature scales to be supported are Kelvin, ...
1
vote
1
answer
135
views
Temperature Scale Converter in C
Problem statement:
Write a program that converts all given temperatures from a given input temperature scale to a given output temperature scale. The temperature scales to be supported are Kelvin, ...
0
votes
2
answers
318
views
Temperature Scale Converter in C++
Problem statement:
Write a program that converts all given temperatures from a given input temperature scale to a given output temperature scale. The temperature scales to be supported are Kelvin, ...
2
votes
0
answers
369
views
Temperature Scale Converter in Prolog
Problem statement:
Write a program that converts all given temperatures from a given input temperature scale to a given output temperature scale. The temperature scales to be supported are Kelvin, ...
5
votes
3
answers
529
views
Templatizing a Timer class
I'm making a timer class in C++. This is the overview:
...
2
votes
2
answers
249
views
Python - Temperature - descriptors with conversion
So I'm trying to understand the concept of descriptors and gathered some code together and made an exampel out of different sources. Like the offical documentation and StackOverflow answers. I'd hope ...
2
votes
2
answers
204
views
Time Converter - Python Tkinter - General comments on code
I have been learning python since being in lockdown, this is the first Tkinter application I've built without consulting the internet or seeking help anywhere.
It is a time converter where you can ...