Send to a Friend

Corille's avatar

Can you help fix this programming problem in Python?

Asked by Corille (1points) May 20th, 2019

name = ”...”
school = ”...”
student = “Monday, 20/5/2019”
studentdetails = name + student + school
print(studentdetails)

teacherdaetails = {“teacherName”:“suh”,“teacheremail”:“suh@gmail.com”}
print(teacherdaetails)

print(”=”*50)

mass = []
print(“Enter the mass value”)
num = “0”

while num.isdigit():
num = input(“enter the mass value”)
if num.isdigit():
m = float(num)
mass.append(m)

print(mass)
acceleration=[]
print(“enter the acceleration values”)
num = “0”

while num.isdigit():
num = input(“enter acceleration value”)
if num.isdigit():
a=float(num)
acceleration.append(a)

print(acceleration)

print(max(mass))
print(min(acceleration))

Force = (“mass”[2]*“acceleration”[3])
print(Force)

print(”=”*50)

Traceback (most recent call last):
File “C:/Users/s118630/PycharmProjects/untitled/venv/Test 2.py”, line 38, in <module>
Force = (“mass”[2]*“acceleration”[3])
TypeError: can’t multiply sequence by non-int of type ‘str’

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.