.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
Melody 2 years 2021-06-22T16:57:32+00:00 2 Answers 0 views 0

Answers ( )

    0
    2021-06-22T16:58:50+00:00

    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

    0
    2021-06-22T16:58:56+00:00

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

Leave an answer

Browse

9:3-3+1x3-4:2 = ? ( )