Master your skills with these problems

In order to run the solution code, please copy and paste and the program onto the main.py and then run it. It is much more efficient

Problem #1

Check whether an inputted value is odd or even.

Problem #2

Display the number of asterisks(*) according to the input and then display one less than the number of asterisks and the continue like this until the number is 1.

Hint: Try using the range() function

Problem #3:

Write a program to switch the upper case letters to lowercase and the lower case letters to upper case and the numbers in a sentence shall remain the same.

Problem #4:

Make a simple rock-paper-scissor game.

Information:

1. Rock beats scissor

2. Paper beats rock

3. Scissor beats Paper

Hint: Import a module called random

Problem #5:

Check whether a entered year is a leap year.

Problem #6:

Write a code to print the next 5 leap years from a given year in the input. These 5 leap years should be added to a list. The list should be printed and the elements in the list should also be printed in a new line. The input can be any number, cannot be a float and has to be valid. If the input is a leap year itself, add the input year to the list and the next 4 leap years after the input.

Problem #7:

Write a python code to print the next day of the given inputs. All of three inputs are integers and these are a day, month, year. For example, if the day was 4, the month was 9, and the year was 2004. The output should be ​5-9-2004. ​Because the next day after 4 is 5. The day will always be less than 28. Here is the catch, your code shall not exceed one line.

Problem #8:

Write a program to remove a specific character from a string. Take two inputs, n and string. n shall be a number and the string should be a string. The output should be the string without the nth character.

Problem #9:

Write a program to print the indexes of spaces in a string.

Hint: Try using the function enumerate().

The output doesn't have to be in one line

Problem #10:

Write a program to generate the ticket numbers for specified number of passengers traveling in a flight as per the details mentioned below:

The ticket number should be generated as airline:src:dest:number.

Consider AI as the value for airline ,src and dest should be the first three characters of the source and destination cities. number should be auto-generated starting from 101.The program should return the list of ticket numbers of last five passengers.

Note: If passenger count is less than 5, return the list of all generated ticket numbers.

Problem #11:

Write a python program to take sentence and print each word in reverse and the join back the sentence.

Problem #12:

Write a program that accepts a sentence and calculate the number of letters and digits.

Problem #13:

Write a program that counts the number of upper and lower case letters in a given sentence by taking an input by the user.

Problem #14:

Write a code to count the number of vowels and consonants in a given string.

Problem #15:

Write a Python program to get the Fibonacci series between 0 to 50.

Continue practice