COSC – Research Wing Problem List-1

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (4 votes)

1. Write a program that asks the user how many Fibonacci
numbers to generate and then generates them ?(Hint: The
Fibonacci sequence is a sequence of numbers where the
next number in the sequence is the sum of the previous
two numbers in the sequence. The sequence looks like
this: 1, 1, 2, 3, 5, 8, 13)
2. Make a two-player Rock-Paper-Scissors game. (Hint: Ask
for player plays (using input), compare them, print out a
message of congratulations to the winner, and ask if the
players want to start a new game)
Remember the rules:
Rock beats scissors
Scissors beats paper
Paper beats rock
3. Ask the user for a string and print out whether this
string is a palindrome or not. (A palindrome is a string
that reads the same forwards and backwards.)
note: use only loops, not inbuilt functions.
4. Write a Python program to count the number of
characters (character frequency) in a string.
5. Write a Python function that takes a list of words and
returns the length of the longest one.
6. Write a Python function to find the Max of three
numbers.
7. Write a program which will find all such numbers which
are divisible by 7 but are not a multiple of 5,
between 2000 and 3200 (both included).
The numbers obtained should be printed in a commaseparated sequence on a single line.
Hints:
Consider use range(#begin, #end) method
8. Define a class named Shape and its subclass Square.
The Square class has an init function which takes a
length as argument. Both classes have a area function
which can print the area of the shape where Shape’s area
is 0 by default.
Hints:
To override a method in super class, we can define a
method with the same name in the super class.