Find the best answers to your questions at Westonci.ca, where experts and enthusiasts provide accurate, reliable information. Join our platform to connect with experts ready to provide accurate answers to your questions in various fields. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.

Define a function print_feet_inch_short(), with parameters num_feet and num_inches, that prints using ' and " shorthand. End with a newline. Remember that print() outputs a newline by default. Ex: print_feet_inch_short(5, 8) prints:
5' 8"
Hint: Use \" to print a double quote.


''' Your solution goes here '''

user_feet = int(input())
user_inches = int(input())

print_feet_inch_short(user_feet, user_inches) # Will be run with (5, 8), then (4, 11)


Sagot :

fichoh

def print_feet_inch_short(num_feet, num_inches):

#function named print_feet_inch_short takes in two arguments.

print(str(num_feet)+"'",str(num_inches)+"\"")

#output the feet and inch value supplied with the shorthand sign of feet and inch using string concatenation.

num_feet = int(input())

#allows user to specify a feet value and stores it in num_feet

num_inches = int(input())

#allows user to specify an inch value and stores it in num_inch

print_feet_inch_short(num_feet, num_inches)

#calling the function with the number of feets and inches given by user.

Learn more : https://brainly.com/question/18318709

Program Explanation:

  • Declaring method "print_feet_inch_short" that takes two variable "num_feet and num_inches".
  • Inside the method parameter variable is used that converts the value into the string and prints its value.
  • Outside the method, a parameter variable is declared that uses an input method with the int method that takes an integer value.
  • calling the method by passing parameter value.

Program:

def print_feet_inch_short(num_feet, num_inches):# defining a method print_feet_inch_short which takes two parameters.

   print(str(num_feet)+"'",str(num_inches)+"\"")# using print method that converts parameters value into string  

num_feet = int(input())# defining num_feet variable input integer variable

num_inches = int(input())# defining num_inches variable input integer variable

print_feet_inch_short(num_feet, num_inches)#calling method

Output:

Please find the attached file.

Learn more:

brainly.com/question/14637323

View image codiepienagoya