Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with the below coding questions and how to do them: 1: Exercises @ @ Even or Odd Create a function called EvenOdd that

Need help with the below coding questions and how to do them:

1:

image text in transcribedimage text in transcribedimage text in transcribed
Exercises @ @ Even or Odd Create a function called EvenOdd that will take in one integer and determine if it is 1 Your code goes here... an even or odd number, The function will return \"ODD" ifthe number is odd and \"EVEN" ifthe number is even. Additionally write the code to call your function and print out either EVEN or ODD to the screen. The code running the function needs to take in an integer with a very simple input statement. There is no prompt necessary. For instance: some_num = inpulO For example if the input was 4, the program needs to write EVEN to the screen When you are done writing your program, click on the Try It button to open the terminal and test your program. if your program is not running. click on the Code Visualizer link to run your code line by line. If that still doesn't help. copy the code to either IDLE or VS Code in order to better debug this program. Code Visualizer Drawing Create a function called Draw that will accept a string character and the number of times that character will repeat on the screen. For instance if the user enters an asterick and the number 10, the following will print to the screen once the function is called. t xx *** xx** s$*** x***** xx***** $$****** xz******* ********** Additionally write the code that will ask the user for the character and the number of times that character needs to repeat. You do not need any prompts for your input statements. Make sure the rst input is the character and the second is the number of times that character needs to repeat. Also write the code to call your function. #define your function Collapse Exercises #delcare variables Sales sales1 = float( ) Create a function called AvgSales that will take in 3 months of sales, add them sales2 = float() 9 sales3 = float() together and return the average. Additionally write the code to test and print the 10 average = float() average to the user. The program running the code will need to have 3 very simple 11 input statements to allow Codio to test your code with different values. 12 #Get sales from the user 13 sales1 = float(input() ) 14 sales2 = float (input( ) ) For example when Codio enters 1200, 1750 and 2300 dollars, the value 1750 to 15 sales3 = float (input( ) ) the screen. 16 17 #Call your function 18 When you are done writing your program, click on the Try It button to open the 19 terminal and test your program. TRY IT If your program is not running, click on the Code Visualizer link to run your code line by line. If that still doesn't help, copy the code to either IDLE or VS Code in order to better debug this program. Code Visualizer Check It

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_2

Step: 3

blur-text-image_3

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Describe the characteristics used in classification

Answered: 1 week ago

Question

Explain the phyla in kingdom fungi?

Answered: 1 week ago

Question

Explain the conditions necessary for the growth of fungi?

Answered: 1 week ago