Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q2: Write a function named 'fancylist' that contains ONLY 1 line of CODE (using a list comprehension) that loops through all of the UPPERCASE letters

image text in transcribedimage text in transcribed

Q2: Write a function named 'fancylist' that contains ONLY 1 line of CODE (using a list comprehension) that loops through all of the UPPERCASE letters in the alphabet and fills the list with 5 copies of each letter that is a vowel (i.e. 'A', 'E', 'I', 'o'. or 'U'). import math import random import string import collections import datetime import re import time import copy # YOUR CODE BELOW... def checkRegex(str2) : your code here... # end def def fancyList(): your code here... # end def def natureSequence(fn, sn, n) : your code here... # end def def printEvens(a, b) : your code here... # end def def generatePokerHand(deck, coords) : your code here... # end def def main() : rv = checkRegex("abcdefghijklmnopqrstuvwxyz") print (rv) rv = checkRegex("Mariner!") print (rv) rv = checkRegex("acdefghija012345") print(rv) fancylist) rv = natureSequence(0, 1, 10) rv = natureSequence(1, 3, 15) printEvens (433, 452) printEvens (2048, 2188) deck = [["20", "30", "40", "50", "60", "70", "80", "90", "XC", "IC", "QC", "KC", "AC"], ["20", "3D", "40", "50", "60", "70", "3D", "90", "XD", "D", "CD", "KD", "AD"], ["2H", "3H", "4H", "SH", "6H", "7H", "8H", "9H", "XH", "JH", "QH", "KH", "AH"], ["25", "35", "45", "55", "65", "75", "85", "95", "XS", "35", "OS", "KS", "AS"] ] coords=["22", "A", "38", "18", "25"] rv = generatePoker Hand(deck, coords) coords=["23", "24", "25", "26", "27"] rv = generatePoker Hand (deck, coords) # end main() if == _main__" : name main()

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

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions