100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Python Program from Unit 6 (in text format) £4.99
Add to cart

Essay

Python Program from Unit 6 (in text format)

 74 views  0 purchase

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

Preview 1 out of 2  pages

  • December 4, 2017
  • 2
  • 2015/2016
  • Essay
  • Unknown
  • Unknown
All documents for this subject (10)
avatar-seller
SNK0
#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.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller SNK0. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £4.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

49160 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£4.99
  • (0)
Add to cart
Added