100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Essay

Python Program from Unit 6 (in text format)

Rating
-
Sold
-
Pages
2
Uploaded on
04-12-2017
Written in
2015/2016

BTEC IT Level 3 Unit 6 Assignment 1 PROGRAM REQUIRED TO PASS









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
December 4, 2017
Number of pages
2
Written in
2015/2016
Type
Essay
Professor(s)
Unknown
Grade
Unknown

Content preview

#Author: Maheen Hannan
#Date & Time: 13/10/2015 12:32PM
#Purpose: Mark to grade converter

# import time to control flow of time within the program.
import time

# print command to output text to the terminal.
print('Welcome to Marks-to-Grade Conversion program prowered by Python 3.4')
print ()
print ('Note:')
print ('Grades are U -> A')
print('Mark minimum is 0, maximum is 100')
print ()

# 'n' as a variable for name input, input to allows user input.
# 'input' is given so that the user is allowed to enter an input.
n = input('Enter your name: ')

# while True command used to define a correct input.
while True:

# If an error is expected it will stop tranfer.
try:
print ()

# 'm' is the variable for the amount of marks inputted by the user.
# 'int' is used so that the inputted number will be an interger.
m = int(input('Enter your mark: '))
print ()

# When a character is entered that it is not a number it will return with an
error.
except ValueError:

# '\' is gien so that the word 'not' is not given as a function.
print ('That\'s not a number!')

# If a character is entered that is a number it will flow into this string of
options.
else:

# 'if' is given so that when a number is entered a sepecific result will be
given.
# '? < 'int(m)' < ?' is given to create a range of numbers.
if -1 < int(m) < 101:

if -1 < int(m) < 40:

# '(?-(m))' is given so that it can calculate the difference
between a number and the given number by the user.
print ((n),'you have received Grade U.', 'You were', (40-(m)),
'away from Grade E.')

# 'time.sleep' is given to end the program after a given amount of
seconds.
time.sleep (3)

# Stop the script.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
SNK0 Pearson
View profile
Follow You need to be logged in order to follow users or courses
Sold
32
Member since
9 year
Number of followers
26
Documents
28
Last sold
1 year ago

4.1

7 reviews

5
3
4
2
3
2
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions