SCHEME
Please find the Dr scheme program below


=============================
OUTPUT
=============================

SCHEME [3 marks] Define a procedure called days_in_month that takes as arguments two numbers representing a...
SCHEME :-) [5 marks] Write a procedure called convert that takes as arguments: a temperature value (number), and two strings representing the input and output units respectively. The procedure should support conversions to or from any combination of Celcius ("C"), Fahrenheit ("F"), and Kelvin ("K"). Any other unit argument should result in the return of an error string. A table of temperature conversion equations and a calculator for verification can be found here. (Note: to compare strings in Scheme you...
PYTHON 4. Define a function that takes two arguments: a string called strText and a number called intNumber. This function will use a repetition structure (a While or For loop) to print strText intNumber of times. Call this function. 5. Get an input from the user that is a file name with an extension (e.g., "myfile.ipynb" or "myfile.txt"). Print only the characters that follow the "." in the file name (e.g., "ipynb" and "txt"). 6. Ask the user for 5...
Define a function called minimum_of_two_numbers. Complete the function to return the smaller of the two numbers passed in as arguments (i.e., num1 and num2). student.py 1 Restore original file
Lab/HW 3 Write a program that reads in the following data, all entered on one line with at least one space separating them: a) an integer representing a month b) an integer representing the day of the month c) an integer representing a year 1. Check that the month is between 1 and 12. If it’s not print an error message. 2. Day cannot be 0 or less nor can it be more than 31 for all months. Print...
Define the is_a_valid_date() function which is passed a string as a parameter. The function returns a boolean indicating whether the parameter string is a valid date or not. The first two lines of the function are: month_names = ["January", "February", "March","April", "May", "June", "July", "August", "September", days_in_month = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) where month_names is a list of valid month names, and days_in_month is a list which contains the maximum day number...
Define the is_a_valid_date() function which is passed a string as a parameter. The function returns a boolean indicating whether the parameter string is a valid date or not. The first two lines of the function are: month_names = ["January", "February", "March", "April", "May", "June", "July", "August", "September", days_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] where month_names is a list of valid month names, and days_in_month is a list which contains the maximum day...
use scheme program
The following pattern of numbers is called Pascal's
triangle.
The numbers at the edge of the triangle are all 1, and each number
inside the triangle is the sum of the two numbers above it.
(pascals 0 0) → 1
(pascals 2 0) → 1
(pascals 2 1) → 2
(pascals 4 2) → 6
(printTriangle 5)
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
[5 marks] Write a procedure...
Define a function called get_n_largest(numbers, n) which takes a
list of integers and a value n as parameters and returns a
NEW list which contains the n
largest values in the parameter list. The values in the
returned list should be in increasing order. The
returned list must always be of length n. If the number of values
in the original list is less than n, the value
None should be repeated at the end of the returned list to...
Python 3
Define a function below, get_subset, which takes two arguments: a dictionary of strings (keys) to integers (values) and a list of strings. All of the strings in the list are keys to the dictionary. Complete the function such that it returns the subset of the dictionary defined by the keys in the list of strings. For example, with the dictionary ("puffin": 5, "corgi": 2, "three": 3) and the list ("three", "corgi"), your function should return {"corgi": 2, "three"...
3. Write a function that takes, as arguments, three numbers, and returns their average. Round the values to the nearest tenth. Name this function calculate Average (p1, p2, p3). For example, >>>calculate Average (2.5, 3.5, 9) average of those 3 values, using decimal division. Round the values to the nearest tenth. Name your function get Average String (p1, p2, p3). For example, >>>get Average String (1.5, 3.5, 4) should return the string “The average value is 3.0.” Your sentence must...