Computer programming and throubleshooting
Answer:
numbers = '14 36 31 -2 11 -6'
nums = numbers.split(' ')
for i in range(0, len(nums)):
nums[i] = int(nums[i])
print(nums)
Answer:
#include<stdio.h>
void ConvertFahrenheit(float);
void main()
{
float fahrenheit_temp;
printf("Input the temperature in Fahrenheit: ");
scanf("%f", &fahrenheit_temp);
ConvertFahrenheit(fahrenheit_temp);
}
void ConvertFahrenheit(float fahren) {
float c, k;
c = (fahren - 32)/1.8;
k = (fahren + 459.67)/1.8;
printf("Celsius = %f\n", c);
printf("Kelvin = %f", k);
}
Explanation:
- Inside the main function, take the temperature in Fahrenheit as an input from user and call the ConvertFahrenheit function by passing it the fahrenheit_temp variable as an argument.
- Create the ConvertFahrenheit function for the conversion and convert the fahrenheit value to the Celsius and Kelvin by using their conversion formulas respectively.
- Lastly, display the result in Celsius and Kelvin.
Answer:
The TAB key
Explanation:
Sam would use the TAB key, located on the left side of the keyboard, to move around his document to add stops and format its information properly.
Pressing the TAB key will introduce a tab code in his document, which is like moving ahead by a certain number of spaces (5,6, 10 spaces for example, depending on the configuration of the document), but without using spaces, using a tab which is a much better option to position, align things up.
Answer:
The variable used is elevenplus
Explanation:
Given
The above code segment
Required
The variable in the code
In Python, variables are used to take inputs, and they are used to storing values.
On the first line of the program, elevenplus is used to get input for age.
Up till the end of the program, no other variable is introduced.
<em>Hence, the variable in the program is </em><em>elevenplus</em>