Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please code using python idle and follow all the directions above (dont use functions like extend or append) and provide answer according to the template

image text in transcribedimage text in transcribed Please code using python idle and follow all the directions above (dont use functions like extend or append) and provide answer according to the template below.

image text in transcribedimage text in transcribed

Q.2 Write a function called while_it( ) that takes in no parameters and returns a list of the series, 105,98,91,.,7. Constraint: You have to use a while loop to implement this directions. Using the following constructs will result in 0 (zero) for the entire submission (assignment, timed test, etc.). The restricted items are as follows: - Concepts not discussed in lectures yet - String functions - Member functions - Exceptions (can use) : /en () and x=x+[y1,y2,y3] - Built-in functions \& types - Exceptions (can use): str( ), readline( ), open(), close( ), write(), read( ), range( ), .split() - Cannot use .append, .sort, etc. - Cannot use "Slicing" - Cannot use "list comprehension" - Cannot use "not in" (together) - Cannot use "in" - not allowed with conditionals - Exception (can use): with range () - Cannot use and \{\} - Exception (can use): mathematical operations (multiply \& exponents) - Data type functions - Exceptions (can use): int(), str (), float () - Break - Continue - Nested Constructs - Exceptions (can use): 2-D list - Multiple returns \& Multiple assignments - Recursion (not allowed unless the question explicitly states otherwise) - Functions within functions (Definitions) -- invocation is fine - Default Parameters - Global variables - Keyword as variable names def while it (): \# start your code below this line -- make more lines if needed \# finish your code above this line defmain():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

Students also viewed these Databases questions

Question

Discuss some ways agents can make self-serving decisions.

Answered: 1 week ago

Question

What is Accounting?

Answered: 1 week ago

Question

Explain what is meant by the terms unitarism and pluralism.

Answered: 1 week ago