• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 1 fuera de 2 páginas
Ensayo

Python Program from Unit 6 (in text format)

Document preview thumbnail
Vista previa 1 fuera de 2 páginas

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

Vista previa del contenido

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

Información del documento

Nivel de Estudio
Tema
Subido en
4 de diciembre de 2017
Número de páginas
2
Escrito en
2015/2016
Tipo
Ensayo
Profesor(es)
Desconocido
Grado
Desconocido
$7.60

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
SNK0
4.1
(7)
Vendido
32
Seguidores
26
Artículos
28
Última venta
2 año hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes