is to write a program that allows an input of a sequence of numbers from the user and prints the number of appearances for each digit in the sequence. Below is an example of what the program should look like. Please note that the numbers that have not appeared in the sequence (such as 9) are not printed

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter10: Application Development
Section: Chapter Questions
Problem 12VE
icon
Related questions
Question

the code should be in python:

answer all the following questions in one Python file The person running the file will be asked to choose one of these programs. A good approach to designing this file is for each question to have its own main like (main1, main2, etc.). These functions are called when the user selects a question (If the user selects question 1, main1 will be executed). code must also include comments which are explaining your code briefly. Also, make sure you specify where the question ends and the next one starts.

Q1) is to write a program that allows an input of a sequence of numbers from the user and prints the number of appearances for each digit in the sequence. Below is an example of what the program should look like. Please note that the numbers that have not appeared in the sequence (such as 9) are not printed.

Q2) is to write a program that allows two numbers from the user and prints all the numbers that are multiplications of three. which are within these two numbers (not inclusive). The user can enter these two numbers in any order. Here are some examples of the output for such a program.

Q3) to write a program that allows the input of a string from the user and prints the longest word in that string and its length. If there are multiple words with the same maximum length you must print the first one only. For example:

Enter the string:

I would like a new apple watch

Result: would 5

Q4) is to write a function that receives a list as its only parameter. Inside the function remove all the duplicate items from the list and returns a new list. For Example: If we call the function with [“dad”, “aunt”, “mom”, “sister”, “mom”] as its input, the returned value should be [“dad”, “aunt”, “mom”, “sister”]. The order of the items inside the returned list does not matter.

Q5) is to write a function that allows the input of a list of strings as its only parameter. Inside the body of the function find the first palindromic word and return it. If there is no such word, it should return an empty string. A string is palindromic if it reads the same forward and backward so for example If we call the function with [“dog”, “cat”, “car”, “level”, “dad”], the returned value should be “level”. Note that “dad” is also a palindrome, but is not the first one.

 

 

 

Please enter the first number:
-4
Please enter the second number:
10
Result: -3 0 3 6 9
Transcribed Image Text:Please enter the first number: -4 Please enter the second number: 10 Result: -3 0 3 6 9
Please enter your sequence:
318047170471
In this sequence we saw:
"o": 2 time(s)
“1": 3 time(s)
“3": 1 time(s)
“4": 2 time(s)
“7": 3 time(s)
“8": 1 time(s)
Transcribed Image Text:Please enter your sequence: 318047170471 In this sequence we saw: "o": 2 time(s) “1": 3 time(s) “3": 1 time(s) “4": 2 time(s) “7": 3 time(s) “8": 1 time(s)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning