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

Institution
Course

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.

Written for

Study Level
Examinator
Subject
Unit

Document information

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

Subjects

$7.65
Get access to the full document:

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


Also available in package deal

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

Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right 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 aced 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