Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Submission Requirements Python . py file with no markdown language. Only Python code and comments. Group Assignment: Only 1 assignment needs to be submitted for

Submission Requirements
Python .py file with no markdown language. Only Python code and comments.
Group Assignment: Only 1 assignment needs to be submitted for each group.
Task
Create a program by the following definition:
Define the following setting variables
variable(s) containing the following values for a string: (I would suggest a list of some kind).
Consonants are worth 1
Vowels are worth 5 points
all other characters are worth 0
WordToTest
Your code must perform the following operations:
roll a random number
low value of random range is 0
high value for range is defined as:
length(WordToTest)* NumberOfVowels(WordToTest)*2
Score the WordToTest based on the letter values found in bullet 1
Create a conditional logic output to test:
which has the higher value computed wordtotest or random gen
Notes and Hints
When looping through the string to score, the function .isalpha() might be helpful. Also might be useful as well.
Example
Hello would be scored as 13 points! The random number would be from a range of 0 to 2
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago