Question
1. Use Python Write a function rotatelist that rotates a list to the right by k steps. The user will be asked to enter the
1. Use Python Write a function rotatelist that rotates a list to the right by k steps. The user will be asked to enter the list and k in the program.For example : rotatelist([1,2,3,4,5,6,7], 3) will return [5,6,7,1,2,3,4].
2. Use Python Write a program that reads a string and returns a table of the letters of the alphabet in alphabetical order which occur in the string together with the number of times each letter occurs. Case should be ignored. A sample output of the program when the user enters the data ThiS is String with Upper and lower case Letters, would look like: a 2 c 1 d 1 e 5 g 1 h 2 i 4 l 2 n 2 o 1 p 2 r 4 s 5 t 5 u 1 w 2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started