Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Let’s play a game of FizzBuzz! It’s quite the same with your childhood "PopCorn" game, but with a little bit of twist to align it with programming.


Are you ready?


Instructions:

  1. Input a positive integer in one line. This will serve as the ending point of your loop.
  2. Loop from 1 to the ending point (inclusive) and perform the following statements:
  3. If the number is only divisible by 3, print "Fizz"
  4. If the number is only divisible by 5, print "Buzz"
  5. If the number is divisible by both 3 and 5, print "FizzBuzz"
  6. If nothing is true in the previous conditions, skip the number

Input

1. An integer

Output

The first line will contain a message prompt to input the integer.

The succeeding lines contain strings.

radio_button_unchecked

Test Case 1

Expected Output

Enter n: 15
Fizz
Buzz
Fizz
Fizz
Buzz
Fizz
FizzBuzz

radio_button_unchecked

Test Case 2

Expected Output

Enter n: 20
Fizz
Buzz
Fizz
Fizz
Buzz
Fizz
FizzBuzz
Fizz
Buzz






Combined right angle triangle:


Sample input: 4


1st half:


1 2 3 4


5 6 7


8 9


10


2nd half:


17 18 19 20


14 15 16


12 13


11


Output should be combined pattern:


Combined pattern:


1 2 3 4 17 18 19 20


5 6 7 14 15 16


8 9 12 13


10 11



(2x +1) (3y+z) program to solve following equation


How to Attempt?





Charles and the Necklace





Charles wants to buy a necklace in which:





1. There is a minimum of 1 pearl and maximum of X pearls such that





each pearl has its own magnificent coefficient. 2. The pearls should be in non-decreasing order of their magnificence power.





You are given the maximum number of pearls in a necklace and the range of the magnificent coefficients of the pearls. Find the number of necklaces that can be made that follow the mentioned conditions.

Write a python program to create a regular expression to retrieve all words starting with vowels in each string.


Create a program that will display the corresponding remark of a given input grade. The range of grades and its corresponding remark are given below:



Note: Use switch case statement



Range of Grades Remarks


90-10 Excellent


80-89 Good


75-7 Fair


50-74 Poor


Other grades Out-of-range



convert ten digits into a string:



rules for conversion:



separate the number into a set of four-three-three


Two consecutive numbers: double


Three consecutive numbers: triple


Four consecutive numbers: quadruple



sample input:9966777819



output should be:double nine double six triple seven eight one nine



Sample input2: 9999



Output should be: quadruple nine



Sample input3: 88



Output should be: double eight

Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.



Nested lists


The “*” operator


List slices


The “+=” operator


A list filter


A list operation that is legal but does the "wrong" thing, not what the programmer expects


Provide the Python code and output for your program and all your examples


Construct a class named “Book” that assigns title, author and format as initial values.


Create a class named “Library” that extends “Book” and assigns available as initial value, a method named updateAvailability that updates availability of the book, and a method named “str” that returns the string representation of the class.

Write an “abstract” class, Box, and use it to define some methods which any box object should have: add, for adding any number of items to the box, empty, for taking all the items out of the box and returning them as a list, and count, for counting the items which are currently in the box. Write a simple Item class which has a name attribute and a value attribute – you can assume that all the items you will use will be Item objects. Now write two subclasses of Box which use different underlying collections to store items: ListBox should use a list, and DictBox should use a dict.


LATEST TUTORIALS
APPROVED BY CLIENTS