1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zlopas [31]
4 years ago
8

Define a function print_total_inches, with parameters num_feet and num_inches, that prints the total number of inches. Note: The

re are 12 inches in a foot. Sample output with inputs: 58 Total inches: 68 def print_total_inches (num_feet, hum_inches): 2 str1=12 str2=num_inches 4 print("Total inches:',(num_feet*strl+str2)) 5 print_total_inches (5,8) 6 feet = int(input) 7 inches = int(input) 8 print_total_inches (feet, inches)
Computers and Technology
1 answer:
jeka944 years ago
6 0

I'll pick up your question from here:

<em>Define a function print_total_inches, with parameters num_feet and num_inches, that prints the total number of inches. Note: There are 12 inches in a foot. </em>

<em>Sample output with inputs: 5 8 </em>

<em>Total inches: 68</em>

<em />

Answer:

The program is as follows:

def print_total_inches(num_feet,num_inches):

     print("Total Inches: "+str(12 * num_feet + num_inches))

print_total_inches(5,8)

inches = int(input("Inches: "))

feet = int(input("Feet: "))

print_total_inches(feet,inches)

Explanation:

<em>This line defines the function along with the two parameters</em>

def print_total_inches(num_feet,num_inches):

<em>This line calculates and prints the equivalent number of inches</em>

     print("Total Inches: "+str(12 * num_feet + num_inches))

The main starts here:

<em>This line tests with the original arguments from the question</em>

print_total_inches(5,8)

<em>The next two lines prompts user for input (inches and feet)</em>

inches = int(input("Inches: "))

feet = int(input("Feet: "))

<em>This line prints the equivalent number of inches depending on the user input</em>

print_total_inches(feet,inches)

You might be interested in
Def shared_motif(dna_list):
krok68 [10]

Answer:

Explanation:

The following code is written in Python, the function creates various nested loops to loop through each individual string comparing letter by letter in order to find the longest common substring. Finally, returning the substring itself.

def shared_motif(dna_list):

   substr = ''

   if len(dna_list) > 1 and len(dna_list[0]) > 0:

       for x in range(len(dna_list[0])):

           for i in range(len(dna_list[0]) - x + 1):

               if i > len(substr) and all(dna_list[0][x:x + i] in y for y in dna_list):

                   substr = dna_list[0][x:x + i]

   return substr

arr = ["GATTACA", "TAGACCA", "ATACA"]

stems = shared_motif(arr)

print(stems)

5 0
3 years ago
Digital cameras always create great photographs. <br>True <br>False
Pavel [41]

True..they do take great photography..

8 0
3 years ago
Read 2 more answers
Question 2: Did every packet arrive in the correct order? Describe what went wrong and whether your partner was able to read the
Gemiola [76]

Answer:

No, the packets did not arrive in the right order but the TCP protocol reordered the packets. The transmission took a while, but the message was finally delivered.

Explanation:

Packets are chunks of data from a data source or message transmitted from one computer device to another. Protocols like TCP or transmission control protocol and UDP (user datagram protocol) are used for data transfer, with TCP as the more reliable protocol (it checks for errors, retransmit lost packets, and reorders received packets in the destination device) and slow protocol.

5 0
4 years ago
How can I use the word technology in a sentence
romanna [79]


Technology is being changed everyday.

Technology is everywhere.

How is technology helping us?

Everything has technology

Hope it helps :)

Hope the sentences help you 


8 0
3 years ago
Read 2 more answers
Sorting data in Excel Online hides content that does not fit your criteria. True False
Katarina [22]

False, sorting doesn't hide them

6 0
4 years ago
Read 2 more answers
Other questions:
  • Assign to avg_owls the average owls per zoo. Print avg_owls as an integer. Sample output for inputs: 1 2 4 3
    7·1 answer
  • Write code to complete print_factorial()'s recursive case. sample output if user_val is 5: 5! = 5 * 4 * 3 * 2 * 1 = 120
    15·1 answer
  • In a newspaper advertisement for a hybrid car, which of these presentation methods would be most effective
    6·2 answers
  • Which of the following is FALSE? Select one: a. The fast-paced and collaboration-based business environment makes email less use
    10·1 answer
  • Below is an image from Google Trends that plots Cats and Dogs. It shows a line that is higher for dogs than cats. Choose the mos
    11·1 answer
  • Gary lives in an area that receives a lot of rain throughout the year. which device would be useful to him to maintain his compu
    8·1 answer
  • Can you answer the fill in the blanks
    15·2 answers
  • What tag is used to contain information about a web page, such as the title and related pages?
    12·1 answer
  • Name the tools in plant propagation.<br>Q<br>18.<br>16.<br>17.<br>19.<br>20.<br>please po asap​
    15·1 answer
  • Debbie can use the feature in the email to copy her manager on the email without her colleague knowing she did so
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!