193,829 views
31 votes
31 votes
1. Write a program that asks the user for a rating from 1-10.

Follow these instructions:
.
• If the user rates between a 1 and 4, draw a red X in the middle of the canvas.
If they rate between 5 and 7, draw a yellow horizontal line in the middle of the
canvas.
If they rate an 8 or above, draw a green checkmark in the middle of the canvas.

User RedFog
by
3.2k points

1 Answer

25 votes
25 votes

Answer:

Try this code in repl, it works there. Sorry my power went out and I couldn't post the answeer earlier.

Explanation:

print("\033[0;37;40m Normal text\\")

print("\033[2;37;40m Underlined text\033[0;37;40m \\")

print("\033[1;37;40m Bright Colour\033[0;37;40m \\")

print("\033[3;37;40m Negative Colour\033[0;37;40m \\")

import colorama

from colorama import Fore

number = input("Type in a number 1 through 100: \\")

number = int(number)

if number < 5:

print (Fore.RED)

print (" X ")

if number > 4:

if number < 8:

print (Fore.YELLOW)

print (" --- ")

if number > 7:

print (Fore.GREEN)

print (" / ")

print (" \/ ")

User Sandia
by
3.3k points