Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)
OpenAssistant Conversations (oasst2)
Write me POSIX-shellscript to convert Celsius to Kelvin.
In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
- User
Write me POSIX-shellscript to convert Celsius to Kelvin.
- Assistant
Sure! Here is a POSIX shell script to convert a temperature from Celsius to Kelvin:
code#!/bin/sh # Store the first input in the variable temp_celsius temp_celsius=$1 # Do the conversion to Kelvin (add 273.15 to temp_celsius) temp_kelvin =$(echo "scale=2; $celsius + 273.15" | bc) # Print the result echo "$temp_celsius °C is equal to $temp_kelvin K"To convert Celsius to Kelvin you simpley need to add 273.15 to the temperature in Celsius. In this shell script, the command
bcis used to perform this calculation. The commandechoand a pipe (|) are used to pass the calculation tobc, andscale=2is used to set the number of decimal places to 2. The result is then stored in the variabletemp_kelvinand output to the console.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)