Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 2 pages
Essay

Python Program from Unit 6 (in text format)

Document preview thumbnail
Preview 1 out of 2 pages

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

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.

Document information

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

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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
4.1
(7)
Sold
32
Followers
26
Items
28
Last sold
2 year ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions