Computer Science, asked by ramsmedicine, 1 month ago

.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

Answers

Answered by Anonymous
13

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 \tt input() 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 \tt{int()} function.

We then simply add the two numbers of MARK1 and MARK2 and after that will display the result.

\rule{300}{1}

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))

\rule{300}{1}

Sample Run

Enter your Term1 marks of English: 83

Enter your Term2 marks of English: 78

The total marks is 161

Answered by BrainlyProgrammer
19

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))

Similar questions