Task 11 Write a python program that takes two inputs. The first input is a string and the second input is a number. If the number is even then concatenate the given string two times the given number...




Must show it in Python:



Please show step by step with comments.



Please show it in simplest form.



Please don't use any functions




Please don't use any def func ()


Task 11<br>Write a python program that takes two inputs. The first input is a string and the second input is a number. If the number is even then concatenate the given<br>string two times the given number and if the number is odd then concatenate the given string three times the given number.<br>=======<br>=======<br>Sample Input 1:<br>CSE110<br>4<br>Sample output 1:<br>CSE110CSE110CSE110CSE110CSE110CSE110CSE110CSE110<br>Explanation: The second input which is the number 4 is even, therefore the first string input 'CSE110' is concatenated(joined together) 4*2 = 8 times.<br>====== ====== =====================================<br>==================<br>Sample Input 2:<br>CSE110<br>3<br>Sample Output 2:<br>CSE110CSE110CSE110CSE110CSE110CSE110CSE1100CSE110CSE110<br>=====================================================================<br>

Extracted text: Task 11 Write a python program that takes two inputs. The first input is a string and the second input is a number. If the number is even then concatenate the given string two times the given number and if the number is odd then concatenate the given string three times the given number. ======= ======= Sample Input 1: CSE110 4 Sample output 1: CSE110CSE110CSE110CSE110CSE110CSE110CSE110CSE110 Explanation: The second input which is the number 4 is even, therefore the first string input 'CSE110' is concatenated(joined together) 4*2 = 8 times. ====== ====== ===================================== ================== Sample Input 2: CSE110 3 Sample Output 2: CSE110CSE110CSE110CSE110CSE110CSE110CSE1100CSE110CSE110 =====================================================================

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here