Answer:
def feet_to_inches( feet ):
inches = feet * 12
print(inches, "inches")
feet_to_inches(10)
Explanation:
The code is written in python. The unit for conversion base on your question is that 1 ft = 12 inches. Therefore,
def feet_to_inches( feet ):
This code we define a function and pass the argument as feet which is the length in ft that is required when we call the function.
inches = feet * 12
Here the length in ft is been converted to inches by multiplying by 12.
print(inches, "inches")
Here we print the value in inches .
feet_to_inches(10)
Here we call the function and pass the argument in feet to be converted
Answer:
cumulative
Explanation:
Acknowledgment acknowledges that receiver has correctly received a packets which implicitly informs the sender that the previous packets were already received correctly.
Answer:
Code completion.
Explanation:
The NetBeans is an integrated development environment framework of java language. Code completion is the features of NetBeans which is easier to complete the code This feature is known as smart code features because it completes the code in a very easy manner. The Code completion features are needful when we have to fill the missing code or program in the java language.
Hence Code completion. is used to enter the name into the code in the NetBeans.
Answer:
grade = int(input("What grade are you in?")
if grade == 9:
print ("Freshman")
elif grade == 10:
print ("Sophomore")
elif grade == 11:
print ("Junior")
elif grade == 12:
print ("Senior")
else:
print ("Invalid")
Explanation:
You fail to provide the complete code. So, I will rewrite the code from scratch
The complete question requires that the level is printed based on the input grade.
The code has been added in the answer section.
The explanation is as follows:
[Thus gets input for grade]
grade = int(input("What grade are you in?")
[If grade is 9, this prints Freshman]
if grade == 9:
print ("Freshman")
[If grade is 10, then level is sophomore]
elif grade == 10:
print ("Sophomore")
[If grade is 11, then grade is Junior]
elif grade == 11:
print ("Junior")
[If grade is 12, then level is senior]
elif grade == 12:
print ("Senior")
[All other inputs are invalid]
else:
print ("Invalid")
Answer:
import random
a = random.randint(1,10)
b = random.randint(1,10)
answer = a * b
print(str(b)+" * "+str(a)+" = "+str(answer))
Explanation: So I am guessing you are on Edhesive Module 2.5 Intro to cs. Sorry it took so long but hopefully this works.