Question: Solve the following using Python programming. idle Exercise 1: Enter an input statement using the input function at the shell prompt. When the prompt asks

 Solve the following using Python programming. idle Exercise 1: Enter an

Solve the following using Python programming. idle

Exercise 1: Enter an input statement using the input function at the shell prompt. When the prompt asks you for input, enter a number. Then, attempt to add 1 to that number, observe the results, and explain what happened. Exercise 2: Enter an input statement using the input function at the shell prompt. When the prompt asks you for input, enter your first name, observe the results, and explain what happened. Exercise 3: Modify the given code snippet (Ohm's.py) and this time solve for the Resistance, save the file as Resistance.py. Follow this pseudo code: 1. Give the user directions. 2. Ask the user for voltage in volts. 3. Ask the user for the current in amperes. 4. Compute the voltage from R=V/I. 5. Print out the resulting Resistance in ohms. Exercise 4: Write a program to compute for the distance between two points. The Pythagorean theorem is the basis for computing the distance between two points, let (xl,yl) and (x2,y2) be the coordinates of points in the plane. Write an algorithm similar to exercise 1. Use the formula d = (4x2) + (Ay) = (x2 - x)2 + (y2 - y.), you can also use the square root function sqrt(), then use ** to square the number (e.g. (x1-x2)**2 + (y 1-y2)**2) Exercise 5: Write and test a program that computes the area of a circle. This program should request a number representing a radius as input from the user. It should use the formula 3.14 * radius ** 2 (pi*rad^2) to compute the area and then output this result suitably labeled. Exercise 6: Write and test a program that accepts the user's name (as text) and age (as a number) as input. The program should output a sentence containing the user's name and age. Exercise 7: Write a program that takes the radius of a sphere (a floating-point number) as input and then outputs the sphere's diameter, circumference, surface area, and volume

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 Databases Questions!