.Assign your Term1 Marks of English to variable MARK1 and Term2 Marks of English to variable MARK2. Write a program to store total
Question
.Assign your Term1 Marks of English to variable MARK1 and Term2 Marks of English to variable MARK2. Write a program to store total marks in variable Total and display the result.
pls answer
in progress
0
Mathematics
2 years
2021-06-22T16:57:32+00:00
2021-06-22T16:57:32+00:00 2 Answers
0 views
0
Answers ( )
Store total marks – Python
First we would take a user input string in the MARK1, after that same as MARK1 we will take a user input in MARK2 also.
We know that the
function returns a string, string is one of the basis types in Python that store text.
To convert it to a number, we can use the
function.
We then simply add the two numbers of MARK1 and MARK2 and after that will display the result.
The Program
MARK1=int(input(‘Enter your Term1 marks of English:’))
MARK2=int(input(‘Enter your Term2 marks of English:’))
print(“The total marks is”, + (MARK1+MARK2))
Sample Run
Enter your Term1 marks of English: 83
Enter your Term2 marks of English: 78
The total marks is 161
Required Answer:
m1=(int)(input(“Enter mark1:-“))
m2=(int)(input(“Enter mark2:-“))
total=m1+m2
print(“Total”,total)
#you can also write print(“Total”,(m1+m2))