Python Language:Define function that asks for a name and displays it.Define function that takes a name as a parameter and displays the nameDefine function "smallest" that returns the smallest number from a list given as parameterDefine function that takes length in feet and inches and returns meters.Implement queues using lists in Python. Define functions enqueue(list, element) and dequeue(list) that perform needed operations.
Answer:
Answering first 4 parts as per policies:
def ask_name():
name = input('Enter the name: ')
print('Entered Name is:', name)
def print_name(name):
print('Name:', name)
def smallest(l):
smallest = l[0]
for i in l:
if i<smallest:
smallest = i
return smallest
def feet_to_metres(feet, inches):
metres = ((12*feet)+inches)*0.0254
return metres

PLEASE UPVOTE IF YOU FOUND THIS
HELPFUL!
Python Language:Define function that asks for a name and displays it.Define function that takes a name...
Using PYTHON: (Find the index of the smallest element) Write a function that returns the index of the smallest element in a list of integers. If the number of such elements is greater than 1, return the smallest index. Use the following header: def indexOfSmallestElement(lst): Write a test program that prompts the user to enter a list of numbers, invokes this function to return the index of the smallest element, and displays the index. PLEASE USE LISTS!
Python Programming 4th Edition: Write a program that asks the user for the number of feet. The program converts those feet to inches by using the formula ’12 * feet’. Hint: Define main () program Get the number of feet from the user Define variables Call a function feet_to_inches(feet) The function receives the number of feet and returns the number of inches in that many feet. The output should look like as follows: Enter the number of feet: If the...
using python, Write a function named displayReverse that takes a list as a parameter and DISPLAYS the contents of the list to the screen in reverse. Submit the code and a screenshot of the program running in Linux
Python
use dequeue and enqueue methods, alter the dequeue method and
the enqueue method. remove items from the first element of the list
(the front of the queue) and return this value and you need to add
items to the last element of the list (the rear of the
queue).
4. (20 points) Programming Exercise 5 from Chapter 3 of your textbook. Name the class Queuex, and use the other method names given in Chapter 3.11 in your digital textbook....
Please insert in your code the number of the question and the question itself, followed by the piece of code that is your answer to that particular question. You can comment multiple lines in Python with “”” commented fragment””” or a single line by #commented line. Define function that asks user for his/her name and displays it. Define function that takes a name as a parameter and displays the name Define function “smallest” that returns the smallest number from a...
Write a python function named displayFizzBuzz that takes a number as a parameter and DISPLAYS the appropriate FizzBuzz value for that number. Test this function on all of the numbers between 1 and 100000. Submit the code and a screenshot of the program running in Linux
Write only a python function definition for a function that takes two strings values as its parameters , and if the first parameter alphabetically comes later in a dictionary than the second parameter then the function returns the length of the first parameter, otherwise the function returns the negative of the length of the second parameter. Name your function fA. For instance : fA(“do”,”can”) returns 2
1) Translate the following equation into a Python assignment statement 2) Write Python code that prints PLUS, MINUS, O ZERO, depending on the value stored in a variable named N. 3) What is printed by: 3 - 1 while 5: while 10 Print ) Page 1 of 9 4) Write a Python while loop that reads in integers until the user enters a negative number, then prints the sum of the numbers. 1-2 of 9 4) Write a Python while...
Define a Python function that takes a list and returns the length of the list using map and sum.
PYTHON Programming short Questions: 1. Write a function takes as input name (string) and age (number) and prints: My name is <name> and I am <age> years old(where name and age are the inputs) 2. Write a function that takes as input a and b and returns the result of: ??ab 3. Write a function that takes as input a and b and returns the result of: ??ab if it is valid to divide a and b 4. Write a...