Question

Write a Python program that will ask the user to enter the masses of two particles (particle one and particle two) and particle 1’s initial velocity (v1). Assume particle two is at rest. The program should calculate the scattering angle and velocity for particle 2 as a function of the scattering angle and resulting velocity of particle 1

Answer #1

Two particles collide in a straight line, one of which was
initially moving with velocity v1 and the other initially at
rest.
Assume particle 2 is at rest. Write a Python program that will
ask the user to enter the masses of the two particles and particle
1’s initial velocity (v1). The program should calculate the
scattering angle and velocity for particle 2 as a function of the
scattering angle and resulting velocity of particle 1.

Consider the collision of two identical particles. The masses of
the two particles are therefore equal m1=m2. The initial velocity
of particle 1 is v1 and particle two is initially at rest. After an
elastic head on collision, the final velocity of particle two is is
v'2 and is given by...

Write a python code that will ask the user to enter an integer
number n. Construct a recursive function that
prints numbers 1 to n in the form “11223344..nn”.

IN PYTHON : Write a program that asks the user for a number.
Write the number to a file called total.txt. Then ask the user for
a second number. Write the new number on line 2 with the total for
both numbers next to it separated by a comma. Then ask the user for
a third number and do the same. Keep asking for numbers until the
person puts in a zero to terminate the program. Close the file. Be...

Write a python program that calculates the area of triangle. The
user will be asked to enter the base (b) and the height (h). The
formula to calculate the area is:
Triangle_area=(bh)/2
Note: the program should print the area to the user:
(for example: the area of the triangle is: 34.3)

Flowchart + Python.
Ask the user for a value. Then, ask the user for the number of
expressions of that value. Use While Loops to make a program.
So then, it should be so that 5 expressions for the value 9
would be:
9 * 1 = 9
9 * 2 = 18
9 * 3 = 27
9 * 4 = 36
9 * 5 = 45
Flowcharts and Python Code. Not just Python code.

Write a Python program to calculate the area of a circle. The
user needs to input the value of the radius of the circle.
area = 3.14 x radius x radius
You should use a function named circlearea to perform the
calculation
3.
Write a Python program to calculate the area of a square. The
user needs to input the value of the length of the square.
area = len*len
You should use a function named squarearea to perform the...

Please use Python 3
4). Write a program that asks the user to enter 10 numbers. The
program should store the numbers in a list and then display the
following data:
• The lowest number in the list •
The highest number in the list
•The total of the numbers in the list
• The average of the numbers in the list
Sample input & output:
(Prompt) Enter Number 1: (User enter) 4
(Prompt) Enter Number 2: (User enter) 7...

(Python Programming)
Write a program that prompts a user for a positive integer and
then uses a loop to calculate and display the sum of specific
fractions as follows:
Let's say the user enters 5, then your program will compute: 1/5
+ 2/4 + 3/3 + 4/2 + 5/1 which is 8.7.

Write a program to ask user to input
an integer and display the special pattern accordingly.
REQUIREMENTS
The user input is always correct (input verification is not
required).
Your code must use loop statements (for, while or
do-while).
Your program should use only the following 3
output statements, one of EACH of the
followings:
System.out.print("-"); // print #
System.out.print("+"); // print +
System.out.println(); // print a newline
Your code must work exactly like the following example (the
text in bold...

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 7 minutes ago

asked 8 minutes ago

asked 10 minutes ago

asked 16 minutes ago

asked 16 minutes ago

asked 32 minutes ago

asked 32 minutes ago

asked 35 minutes ago

asked 39 minutes ago

asked 53 minutes ago

asked 59 minutes ago

asked 1 hour ago