My coding is:
#Marksheet subject=input("Enter Subject Name:") exam=float(input("Enter the marks obtain in", subject )) coursework=float(input("Enter Exam marks obtain in course work:")) percentage=(exam + CW)/2 print("The average percentage of" , subject ,":", percentage)
but I got type error:
Enter Subject Name : URdu Traceback (most recent call last): File "C:/Users/Lenovo/app data /Local/Programs/Python/Python37-32/marksheet.py2.py", line 3, in exam=float(input("Enter the marks obtain in", subject )) Type Error: input expected at most 1 arguments, got 2
Except this error rest is perfect but still I'm unable to solve it..
Answers
Answered by
0
Answer:
the abstract science of number, quantity, and space, either as abstract concepts ( pure mathematics ), or as applied to other disciplines such as physics and engineering ( applied mathematics ).
"a taste for mathematics"
the mathematical aspects of something.
plural noun: mathematics
"James immerses himself in the mathematics of baseball"
Answered by
5
Given Códe:-
- #Marksheet
- subject=input("Enter Subject Name:")
- exam=float(input("Enter the marks obtain in", subject ))
- coursework=float(input("Enter Exam marks obtain in course work:"))
- percentage=(exam + CW)/2
- print("The average percentage of" , subject ,":", percentage)
Answer:
- #Marksheet
- subject=input("Enter Subject Name:")
- print("Enter the marks obtain in ",subject,end=":")
- exam=float(input())
- CW=float(input("Enter Exam marks obtain in course work:"))
- percentage=(exam + CW)/2
- print("The average percentage of" , subject ,":",percentage)
What was the error?
Your errors are as follows:-
- I assume that CW is the variable for coursework. So do not use different Variable names.
- In line no. 3 of your codé you cannot print the variable during input. If you want to do so, use print statement
Note:-
- You may or may not use end="" in print statement. It will not change your output. end is use to get formatted output.
Attachments:
Similar questions