Question: Creating Functions In this question you are going to create a function for each of the following tasks: - [ Task - 1 ] In

Creating Functions
In this question you are going to create a function for each of the following tasks:
-[Task-1] In Math, Pythagoras theorem states that "In a right-angled triangle, the square of the hypotenuse side is equal to the sum of squares of the other two sides".
Write a function that will take a and b as inputs from the user (Not as parameters) and return the c value.
[Task-2] A function takes two arguments and prints its output. When given 25 and 5 as arguments, it prints 625; and when the arguments are PYTHON and 2, it prints out PYTHONPYTHONPYTHONPYTHON. Create a function to make the requested task (the givens are just an example, it should work with any arguments).
[Task-3] Write a function that takes four arguments x1, y1, x2, y2 where each (x, y) pair refers to a point on a 2D Cartesian plane and prints the distance between the two points (x1, y1) and (x2, y2). You are encouraged to use functions from the math module
[Task-4] Write a function named twice() that takes one argument and print it twice to the screen. Now write another function that takes two argument, con catenates them (careful with the type of your input) and uses the function twice() to write it twice in the screen. It should work even when the inputs are numbers.
Output Example: 4Assignments4Assignments (4 & Assignment are the two arguments for the second function)
[Task-5] Write a function that calculates the same percentage of two num bers. The function should print the percentage value as an integer.
E.g. for input (10,50,30) the result should be: 50% of 10 is 550% of 30 is 15.
[Task-6] Write a function that will take from the user some information about them then returning each part in a separate line. It will ask about: name, surname, departement, student id, gmail and phone number.
The output will be as shown below: Name & Surname: --------
Departement & Std ID: -----
Email: -------
Phone Number : -------
(The department should be returned in upper case and for printing the results use the f-String)
please make all the steps clear, I now it is a long question thank you so much in advance
Creating Functions In this question you are going

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!