Question: Given the comments, write a python code: Subprogram writeNameAssn() Write My name is: Write This is assignment:

Given the comments, write a python code: Subprogram writeNameAssn() Write "My name is: "  Write "This is assignment: " End Subprogram Subprogram getPosInt() Declare n as Integer Declare done as Boolean done = False While not done Write "Enter a positive integer: " Input n If n < 0 Then Write "The value you entered is not a positive integer" Else done = True End While Return n end Subprogram Main Call writeNameAssn() *** hint: google "python 3 modulus" *** Write "Enter a number greater than 5." count = getPosInt() For (i = 1; i < count + 1; i++) If i % 2 > 0 Then Write "The value " + i + " is odd." Else Write "The value " + i + " is even." End If End For End Main 

-----------

Sample out put should look like this:

My name is Username This is assignment 4 
Enter a number greater than 5. Enter a positive integer: 6 The value 1 is odd. The value 2 is even. The value 3 is odd. The value 4 is even. The value 5 is odd. The value 6 is even. 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!