Contact me
It's pretty easy to create a programme using python that will tell how much marks you got in your exam, Here's how to:
print ('Hello and welcome to percantage teller, an app that tells how much percantage you got in your exam')
It's nice to give a description of the programme.
myname = input('Enter your name: ')
It's always nice to know the name
totalmarks = int (input ('Enter the total marks of your exam: '))
totalmarksexam = int (input ('Enter the total marks you have got: '))
percant = totalmarksexam / totalmarks
percantage = percant * 100
print ('You have got', percantage, 'percent in your exam',myname)
Easy right? I know.. It's pretty easy
The final code:
print ('Hello and welcome to percantage teller, an app that tells how much percantage you got in your exam')
myname = input('Enter your name: ')
totalmarks = int (input ('Enter the total marks of your exam: '))
totalmarksexam = int (input ('Enter the total marks you have got: '))
percant = totalmarksexam / totalmarks
percantage = percant * 100
print ('You have got', percantage, 'percent in your exam',myname)
Save the file as .py or .pyw
Questions? Comment below.
No comments:
Post a Comment