Answer:
Which line of code outputs the decimal portion of a float stored in the variable x?
print (x - int(x))
Three of the following values could be stored as strings. When would you NOT use a string command?
To store decimal values.
Consider the following code:
x = int(input("Enter a number: "))
print (x)
What happens if the user types in A?
This would cause an error: an integer variable cannot store a string.
Which of the following is NOT a data type in Python?
decimal
Which of the following numbers might this code generate: random.randint(1,9)?
1
Answer:
umm i need more descriptive details to answer the question buddy
Answer in Python:
<em># Define program constants</em>
PI = 3.14
<em># Welcome the user to our program</em>
print("### Welcome to the Sphere Volume Calculator")
<em># Ask for the Radius (r) input and store it as a float</em>
radius = float(input("Type the Radius of your sphere in meters: "))
<em># Calculate the volume</em>
volume = 4 / 3 * PI * radius ** 3
<em># Print the result</em>
print("Your sphere volume is:", volume, "m³")
References:
- https://www.w3schools.com/python/python_variables.asp
- https://www.w3schools.com/python/python_casting.asp
- https://www.w3schools.com/python/python_user_input.asp
- https://www.w3schools.com/python/python_operators.asp
- https://www.w3schools.com/python/ref_func_print.asp
your answer should be TRUE if i’m correct..
MARK ME BRAINLIEST PLEASE IF IM CORRECT
Answer:
The first 1 on the left is 32 and the 1 on the right is 2. Hence this 8 digits binary number represents 32 + 2 which is the decimal number 34
Explanation:
each 1 represents the number 2 powered by a different number, so starting at the further right, the first number with value 0 is representing , the next on the left which is value 1 is representing which is 2 and so on. So the other 1 further on the left will be which is 32.
Every other digit that is zero is not taking any value, but if they were, they would all be taking values from to Take a look below:
0 0 1 0 0 0 1 0
32 2