Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Using Dataweave write a function that will take a list of integers as its only argument. it should return the same list of integers but

Using Dataweave

write a function that will take a list of integers as its only argument. it should return the same list of integers but be coded to: 1. if the integer is divisible by 3, return the string "Fizz" in its place 2. if the integer is divisible by 5, return the string "Buzz" in its place 3. if the integers are divisible by both 3 and 5, return the string "FizzBuzz" in its place.

4. Do not use conventional if-else blocks and use the case function instead. However, if and else can be used exclusively.

input sample: [1,2,3,4,5,6,7,8,9,10] output sample: [1,2,"Fizz",4,"Buzz","Fizz",7,8,"Fizz","Buzz"]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

What attracts you about this role?

Answered: 1 week ago

Question

How many states in India?

Answered: 1 week ago

Question

HOW IS MARKETING CHANGING WITH ARTIFITIAL INTELIGENCE

Answered: 1 week ago