Write a PYTHON function getTimeName(hours, minutes) that returns the English name for a point in time, such as "ten minutes past two", "half past three", "a quarter ‘til four", or "five o'clock". Example output: 8:45 is a quarter ‘til nine.
Q: A 3-ary max heap is like a binary max heap, but instead of 2 children, nodes have 3 children. A…
A: Binary max heap:- A data structure with a complete binary tree-like appearance is called a binary…
Q: Write a C program to read two floating point numbers L and M from the console. Find and display the…
A: Here is the c program of the above problem. See below steps.
Q: Draw the digraph of the relation R, where the relation R on {1,2,3,4} defined by (x,y) ∈ R if x^2>=y.
A: Consider, A set, S={1,2,3,4}. The cartesian product: S x S={1,2,3,4) x…
Q: 4-3 #A circle filled with yellow and the border is black. ************#Attention: please do not…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: 1. How will you compare traditional media from new media?
A: As the requirements have changed in today’s time there has been evolution of the new media with it.
Q: Draw the digraph of the relation R, where the relation R on {1,2,3,4} defined by (x,y) ∈ R if .
A: The question has been answered in step2 successfully.
Q: Explain Initial permutation steps in DES.
A: DES:- As a result of the discovery that the Data Encryption Standard (DES) is open to incredibly…
Q: at makes Kali Linux different from oth
A: Introduction: An ASCII text file Linux distribution engineered on the Debian software system, Kali…
Q: Java Write a program that reads all words in a file and prints out how often each word occured.…
A: To count occurance of each word in a file using HashMap.
Q: c program Exercise 1- Exercise Objectives Recursive Array Processing Problem Description Use this…
A: Given data, Recursive Array Processing: Write and run a C program that performs the following:…
Q: Consider the following fragment of a database outline: EMPLOYEE (EmploveelD, FirstName, LastName,…
A: Question-5 Primary key is used to uniquely identify a column. As Primary Key in DEPENDENT is…
Q: Show the dynamics of the operandStack (i.e show a picture of the operandStack after every push…
A: Answer the above question are as follows
Q: Create a program that recreates this art piece. Use the code of Python to create it. Rubric 25pts…
A: ANSWER:-
Q: mpany that you use on a regular basis. |List 5 items that would be signfic
A: Introduction: A malicious act that seeks to corrupt or steal data, disrupt a company's systems, or…
Q: 3. Consider two Boolean functions, f(x,y,z) and g(x,y,z). Use truth tables to prove the two…
A: Truth Table for f(x,y,z)=x(y'z+y)+x'(y+z')' : x y z x’ y’ z’ y’z y’z+y x(y’z+y)…
Q: Use RSA algorithm to encrypt the plaintext use following parameters p= 11, q=3, e = 13.
A: Answer: Given plain text (m)=3 p=11 q=3 e=13
Q: You are given an array of doubles of items in a store that have different prices (see template).…
A: Here is the c++ program for the problem. See below steps.
Q: Assume you have a method i 5Su b 5 tr ing which checks if one word is a substring of another. Given…
A: These question answer is as follows
Q: Why the older generation prefers to use traditional media over new media?
A: Traditional media Media outlets including newspapers, radio, television, and magazines are included…
Q: i = 1; j = 3; k = 5; bool1 = true; bool2 = false; indicate T (=True) or F (=False)…
A: As per our company guidelines, only 3 sub parts will be answered. So, please repost the remaining…
Q: For this problem, the registrar’s office has requested that we create a report of students and the…
A: Code
Q: Explain in detail IPSec ESP format.
A: Two protocols are used in the IPSec (IP Security) architecture to secure data flow or traffic. ESP…
Q: Use RSA algorithm to encrypt the plaintext "3" use following parameters p= 11, q=3, e = 13.
A: Introduction: In this question, we are asked to encrypt the plaintext "3" by using RSA algorithms,…
Q: 5. Suppose we want an error-correcting code that will allow all single-bit errors to be corrected…
A: Suppose we want an error-correcting code that will allow all single-bit errors to be corrected for…
Q: Complete the table for optimal page replacement. 0 1 2 3 1 4 1 5 3 4…
A: Best page replacement is the optimal page replacement algorithm. This is because this algorithm…
Q: There are three types of edits that can be performed on strings: insert a character, remove a…
A: given data: There are three types of edits that can be performed on strings: insert a…
Q: In the first formula I'm having trouble reading the left hand side. Is the variable x bar infinite?
A: Is the variable x bar infinite?
Q: Need some help understanding this Python program that creates a new database named DSUCollege.db and…
A: Description: The Python code for the following operations are given in the next step. Function…
Q: 1) For the following “Producer-consumer Problem using Semaphores”, (a) Will there be any deadlock if…
A: buffer access to consumer ,so that item can be inserted. ii] Same will be for consumer,Changing…
Q: ould you answer the above question without using a diagram
A: in the following section we will be discussing about alternate method which can be utilized to…
Q: Q.17 What is adjusted rand Index?
A:
Q: Identify a real-world scenario best suited for object-oriented program development, carefully…
A: ALGORITHM:- 1. Define a class Person and its child class Employee. 2. Use inheritance, method…
Q: Question 5 if x=255; what is x.toString(2)? "2.55" "11111111" "1"…
A: According to the information given:- We have to choose the correct output to satisfy the statement.
Q: What is the output? 1 #include 2 using namespace std; int add( int [ ][3 ]); int main() 4 58{ 6 7 8…
A: Here is the explanation of the above code. See below steps.
Q: Explain the role of machine learning algorithms in Spam filtering.
A:
Q: Explain with example the variant of SVM, the Support vector regression.
A: We have to explain the variant of SVM, the Support Vector Regression with an example.
Q: 1. Let's suppose there is an organization with two departments with each department requiring 120…
A: Network Architecture:- The organization of network devices and services to meet the connectivity…
Q: Let p, q , r be well-formed formulas of propositional calculus. Determine if (p ∧ q) ( ( p -> q ) ∧…
A: Contingency
Q: MyKad is the compulsory identity card for Malaysian citizens aged 12 and above. The current format…
A: Here is the java program of the above problem. See below steps for code.
Q: What is the O-notation of f(n)=3n² + 6n + log n + 24.5 A. O(n) B. O(n²) C. O(n³) D. B and C
A: Here is the explanation regarding the time complexity:
Q: Explain concepts of weak and eager learner.
A: Introduction Advertising is a form of communication, where a clearly identifiable sponsor pays for a…
Q: 6. Consider the following binary tree. 3 5 LO 5 8 1 2 10 1 7 6 a) List the nodes visited with a…
A: According to Bartleby Guidelines we need to answer only three sub questions so I have answered first…
Q: In any graph G with Δ = Ω(log n), the gossiping task can be completed in time O((D + Δ) log n log…
A: solution is given in next step:-
Q: Write an OOP complete program in class Overl constructor, destructor and pointers by using function…
A: The Answer is in given below steps:
Q: Define Bayes Theorem.
A: Bayes Theorem : - Bayes Theorem is named for English mathematician Thomas Bayes, who worked…
Q: Implement program to adds methods to search a linked list for a data item with a specified key…
A: Pointers to the following and preceding nodes in the linked list are included in each node. The…
Q: State the different properties of fuzzy set.
A: Sets with elements that have various degrees of membership values are referred to as fuzzy sets.…
Q: Please write a loop that prints multiples of 3 from 300 down to 3. This will be a java programming…
A: The following are steps that need to be taken for the given program: We will create a for loop with…
Q: Consider the following two functions: funA: movq $0x5, %rax leaq (%rax, %rax), %rax retq funB: movq…
A: Answer: A option A. funA returns the value of memory stored at the address in rax, funB returns 10
Q: x86 Assembly Language Programming What will be the final value in EDX after this code executes? mov…
A: Assembly language programming:- The family of assembly languages known as "x86" offers some degree…
Write a PYTHON function getTimeName(hours, minutes) that returns the English name for a point in time, such as "ten minutes past two", "half past three", "a quarter ‘til four", or "five o'clock".
Example output: 8:45 is a quarter ‘til nine.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- IN PYTHON Write a python that calculates the position of a car moving in a 2D-plane given the list of movements that should be executed in order. The movements are right, left, up, or down, followed by the number of units that the car has to move. The number of units can be either integer values or floating values but must be positive. If the input is invalid, then the program should print that there is an error and prompt the user to enter the input again. Note: The starting position of the car is x=0.0, and y=0.0.A county collects property taxes on the assessment value of property, which is 60 percent of the property’s actual value. For example, if an acre of land is valued at $10,000, its assessment value is $6,000. The property tax is then 72¢ for each $100 of the assessment value. The tax for the acre assessed at $6,000 will be $43.20. Write a Python program using functions that asks for the actual value of a piece of property and displays the assessment value and property tax This is Python Programming. I don't know where to go from here.Write a program that take 5 digit number as an input from the user and perform the following tasks:1. Split a number into digits.2. Find the sum of the all the digits in the number.3. Find the product of the all the digits in the number.4. Find maximum number with in the number along with position.5. Printing the digits in the reverse order.Note: Make user defined functions to perform each task.
- USE PYTHON A small shop sells 280 different items. Each item is identified by a 3 – digit code. All items that start with a zero (0) are cards, All items that start with a one (1) are sweets, All items that start with a two (2) are stationery and All items that start with a three (3) are toys. Write a program which inputs the 3 – digit code for all 280 items and outputs the number of cards, sweets, stationery and toys.Python Write a program that receives a number from a user and checks if it's float or integer.In case of being float, print for the user that his/her number is float with integer part andfractional part. In case of being integer, print to the user that his/her number is aninteger and odd/even numbeRWrite a Python program which asks the user for a series of strings as input, and stores each entered string. The user signals the end of input by typing quit. Please implement the following: text_get() This function does the job of repeatedly asking the user for text to input. Before the function finishes, it must combines all the strings entered into one string, and return that string. main() The only purpose of this function is to call text_get() and print the returned string. Do not use the eval function.
- Task 9 Write Python code of a program that reads an integer, and prints the integer if it is a multiple of NEITHER 2 NOR 5. For example, 1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39 ... hint(1): use the modulus (%) operator for checking the divisibility hint(2): You can consider the number to be an integer !%3%===== Example01: Input: 3 Output: 3Subject: Object-Oriented Programming Programming Language: Python Rewrite your pay computation with time-and-a-half for overtime and create a function called computepay which takes two parameters (hour and rate). Enter Hours: 45Enter Rate: 10Pay: 475.0Python has a built in GCD function in its Math module: math.gcd(x.y). Call this module in your original mygcd1.py file, then compare the outcome of this function to the outcome of your algorithm. Display a message that "The math.gcd value is the same as the myGCD value", otherwise, it should display an error message such as " The math.gcd value is NOT the same as the myGCD value". Name your file mygcd2.py
- Flowchart, create. Writing Functions that Require a Single Parameter in Python def sums(n): s = 0 for i in range(1, n + 1): s += i print("Sum is:", s) def products(n): p = 1 for i in range(1, n + 1): p *= i print("Product is:", p) numberString = input("Enter a positive integer or 0 to quit: ") number = int(numberString) while number != 0: sums(number) products(number) numberString = input("Enter a positive integer or 0 to quit: ") number = int(numberString)Write a program that reads (alphabetical) input questions (full question) from the user (e.g: what is the most beautiful country?) and then matches it with already saved answers in the program (through find or any other function to check matching words ) and returns that appropriate saved answer if there is a match(e.g for answer:Scotland is the most beautiful country right now) **coding language python **(hint) first take input question from the user convert it to a list match the converted question list through any function with already avaliable answers list and then display the matching suitable answer for that question Hint is just for guidance purposes the methodology can be differentWrite a C program that determines and prints the date of the Easter Sunday for a given year. You can compute the date for any Easter Sunday from 1982 to 2048 as follows (all are integers): a is year % 19 b is year % 4 c is year % 7 d is ( 19 * a + 24 ) %30 e is ( 2 * b + 4 * c + 6 * d + 5 ) % 7 Easter Sunday is March ( 22 + d + e ) Note: the last expression can make it possible to generate a date in April. Adjust the date accordingly. Your program should ask the user for the year and then print the date (Day Month Year format) of the Easter Sunday for the given year.