Please answer it in python write a function Tuesday, words of even length must be repeated 6 times, separated by a dash, while the words of odd length should be repeated 3 times, separated by commas. Write the function tuesday that takes a word as an argument and returns the string according to the Tuesday rule. (length of a character string is given by len(string).

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 22PE
icon
Related questions
Question

Please answer it in python

write a function Tuesday, words of even length must be repeated 6 times, separated by a dash, while the
words of odd length should be repeated 3 times, separated by commas. Write the function tuesday that
takes a word as an argument and returns the string according to the Tuesday rule. (length
of a character string is given by len(string).

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning