QuestionQuestion

Transcribed TextTranscribed Text

PART 1: Use file created above to write your code 03LastFirstPart1.py Roman Numeral Quiz Program: Write a program that randomly assigns a number from 1-10 into a variable (see program in Sample Program area). Based on the number generated, the program will display the Roman numeral version of that number. 1- I 2- II 3- III 4- IV 5- V 6- VI 7- VII 8- - VIII 9- IX 10 - X You should write an algorithm and place it at the top of the program in the comment block. I started an algorithm for you. Finish off the items in yellow: Import random Declare/set randomNumber = o Declare/set romanNumeral = "I" Generate a random number from 1-10 and save it into the variable into randomNumber. Using an if statement: Check to see if the number in randomNumber is 1, and if so, save "I" into romanNumeral (You must use == to compare two items: randomNumber == 1 so that it does a COMPARISON. If you only use one equal sign, it will not compare, it will assign a 1 into the variable and you will lose your original value). elif check if randomNumber is 2, and if so, save "II" into romanNumeral elif Display the number Display a message to press enter for the answer with this line. Notice we don't save the input into a variable since we don't need to. The input is simply the newline character input "Press Enter for the Answer : " ) ) Display the Roman Numeral Enter the algorithm: # Name : Enter your full name here # Lab : Chapter 3 Part 1 # Description: Enter the description of the program here # Algorithm: Enter the Algorithm here # # The output should look like this: Number: 5 Press Enter for the Answer: Roman Numeral : V 3. PART 2: You will be designing an Algorithm and developing a Python Program for the problem described below: 4. The first thing you should enter in your source file is a comment block. Add a comment block at the top of the py file (your python program source file), which includes the following and then write the program underneath the algorithm: # Name : Enter your full name here # Lab Chapter 3 Part 2 # Description: Enter the description of the program here # Algorithm: Enter the Algorithm here # 5. BONUS Create another program (03LastFirstBonus.py) using the Turtle graphics. Simply copy the program on page 145/146 (Program 3-9). It's a pretty long program, so it's best to test it out as you go.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

# Name: Enter your full name here

# Lab: Chapter 3 Part 1

# Description: This program randomly picks a number between 1-10 and displays its Roman numeral version

# Algorithm:

#   Import random

#   Declare/set randomNumber = 0

#   Declare/set romanNumeral = ""

#   Generate a random number from 1-10 and save it into the variable into randomNumber.

#   Using an if statement:

#    Check to see if the number in randomNumber is 1, and if so, save "I" into romanNumeral

#    elif check if randomNumber is 2, and if so, save "II" into romanNumeral

#    elif check if randomNumber is 3, and if so, save "III" into romanNumeral

#    elif check if randomNumber is 4, and if so, save "IV" into romanNumeral

#    elif check if randomNumber is 5, and if so, save "V" into romanNumeral

#    elif check if randomNumber is 6, and if so, save "VI" into romanNumeral

#    elif check if randomNumber is 7, and if so, save "VII" into romanNumeral

#    elif check if randomNumber is 8, and if so, save "VIII" into romanNumeral

#    elif check if randomNumber is 9, and if so, save "IX" into romanNumeral

#    else randomNumber is surely 10, so save "X" into romanNumeral

#   Print randomNumber

#   Print a message to press enter for the answer with this line:

#    input("Press Enter for the Answer:")

#   Print romanNumeral



import random



randomNumber = 0

romanNumeral = ""



randomNumber = random...

By purchasing this solution you'll be able to access the following files:
Solution.pdf, win03LastFirstPart1.py and win03LastFirstPart2.py.

$18.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats