Write a Python program that reads a word and prints all substrings, sorted by length, or an empty string to terminate the program. Printing all substring must be done by a function call it printSubstrings which takes a string as its parameter. The program must loop to read another word until the user enter an empty string. Sample program run: Enter a string or an empty string to terminate the program: sit S i t si it sit Enter a string or an empty string to terminate the program: Code с Co od de Cod ode Code Enter a string or an empty string to terminate the program: Done...
Q: Why is the return statement is required in a function body?
A: Explanation:- Return statement is used in function body because when there is a return statement in…
Q: Exercise 3.1 Define the following terms: relation schema, relational database schema, domain,…
A: The relational database is the table representation of the data which contains rows and columns.…
Q: RESTRICTIONS Determine the present day using a JavaScript Date Object, and use this value to set the…
A: HTML - <div class="wrapper"><div class="title"> </div><div…
Q: What exactly is voting technology? What will the consequences be for computer science networking?
A: Introduction: To understand precisely what voting technology is and what the implications are for…
Q: There are several advantages to communicating through electronic means. Were you aware of any…
A: Problem related to electronic communication is below:
Q: Java: Write a complete method to create an array of random integers. Method Specification The…
A: Answer: We have completed method in java as given three arguments
Q: Which of the following languages are equivalent? L1 = {Λ, a, b} L2 = {Λ, b, a, a} L3 = {Λ ,aa, b}…
A: The question has been answered in step2
Q: Differentiate the following with suitable examples: a) Call by value vs Call by reference b) Pointer…
A: Difference of Call by Value and Call by reference: Call By Value Call By Reference When we…
Q: Program: File GamePurse.h: class GamePurse { // data int purseAmount; public: // public…
A: Answer: we have combined the three program and it is run fine
Q: A device's output may be impacted by an application, but how can you tell? Is it possible to…
A: Given: How can you tell if an application affects the output of a device? You can check this through…
Q: One of the best security practices when using Linux is to disable direct root login via SSH. True…
A: Given : linux is family of open source operating system. There are commands designated to perform a…
Q: 2. Mr. ABC goes to AEON supermarket for his monthly grocery/provisions purchases. He has purchased…
A: Code: def calculate(a,b): cost=0 c1=1 #we seperate the value from the text for both…
Q: The Company decided to give a 25% bonus for employees whose salaries are less than 3000$ due to…
A: The code implementation is given in the below steps. Algorithm: The user is prompted to enter…
Q: PROBLEM 9 The Darby Company manufactures and distributes meters used to measure electric power…
A: Managerial Report 1. The following distribution schedule and charges will apply. Total cost = $…
Q: An investment firm has $1 million to invest in stocks, bonds, certificates of deposit, and real…
A: The answer for the above question is given in the following steps
Q: 5. Suppose b₁,b2, b3, " is a sequence defined as follows: b₁ = 4, b₂ = 12 bk = bk-1 + bk-2 for all…
A:
Q: Write merits and demerits of memory card and USB drive.
A: Introduction: A memory card is one of the cards to save the data and information whereas a USB is…
Q: Explanation of the importance of CPU type (single/multi-core), RAM and Disk space in the…
A: Disk space The maximum quantities of information that a disc, disc, or drive is capable of holding…
Q: Create a class printdata which has methods to print different types of data using the concept of…
A: Program: #include<iostream> #include<algorithm> #include<vector> using namespace…
Q: Explain features of Windows operating system
A: Please find the detailed answer in the following steps.
Q: What exactly is SMP (Symmetric Multiprocessing)?
A: Symmetric Multiprocessing: Multiple processors working together to process data using symmetric…
Q: Describe the various departmental structures that may be seen in corporate settings.
A: Departmental structures: A departmental structure separates a company's duties into several…
Q: Please explain! Dynamic Programming can be used to solve numerous real-life optimization problems.…
A: The above question is solved in step 2 :-
Q: Compare exception handling and handling of warnings in embedded amic SQL, JDBC, and SQLJ.
A: Exception handling is the process of handling the occurrence of errors during computer programming.…
Q: programming?
A: Given :- In the above question, the code in python is mention in the above given question Need to…
Q: Find the shortest path in the graph using the Dijkstra shortest path algorithm??
A:
Q: #include #include #include #include #include "card.h" #include "deck.h" #include "hand.h"…
A: It is defined as a general-purpose programming language and is widely used nowadays for competitive…
Q: what would ios mean with these statements femaleFile.open("FEMALE.TXT",ios::in);…
A: maleFile.open("MALE.TXT",ios::in);mergeFile.open("MERGE.TXT",ios::out); ios stands for input output…
Q: In what ways have computers and the internet as we know them today been shaped by various…
A: Introduction: US research and development activities to set up and link computer networks…
Q: Enterprise-based systems may have both benefits and problems when it comes to using ICT in…
A: ICT(Information and Communications Technology) Information and communications technology (ICT) is a…
Q: Explain in detail how native authentication and authorization services are implemented when a web…
A: Introduction: 1. The following are its security measures: A new Security Context feature in the…
Q: Talk about the importance of database backup and recovery procedures and what they do. Then, go over…
A: The significance of database data backup and methods have been suggested, as well as their…
Q: Thank you, but I have 10K directories that have tens of thousands of file in them. How to use the…
A: Here is the solution:
Q: 4. In a restaurant, whenever customers visit, they are provided with items from two categories, one…
A: Answer: Algorithms 1.Given abstract class fixedCategory in this given bottle price and salad price…
Q: Analyze any two different forms of communication, compare and contrast them, and explain why one of…
A: Communication Media: The term "media" refers to the many channels via which data or information may…
Q: Flowchart in Figure Q4(d) shows an addition of two 8-bit numbers. Convert the following flowchart…
A: Program – Memory Address Mnemonics Comment 2000 LDA 2050 A<-[2050] 2003…
Q: If the system fails repeatedly during recovery, what is the maximum number of log records that can…
A: In the analysis phase, initially it updates begin_checkpoint log record which had been searched…
Q: What are some symptoms that a laptop's OS has been corrupted?
A: Hacking also known as cyber crimes is a problem typical for a personal computer's operating system,…
Q: Question 4 The ARM allows any instruction, including branches to be executed conditionally. O True O…
A: Introduction: The Arm processor was created by Acorn Computers in the 1980s. Up until recently, the…
Q: GSM time slot is 577 s (microseconds) in duration and includes far more than a snapshot o signal..
A: The answer is
Q: struct Queue ( int front; int rear; int maxsize; int" arraynum; Queue(int c) ( }; }; front = 0; rear…
A: Linear data structure of elements that are in ordered entries which come from one end and remove to…
Q: An alternative to hexadecimal notation for representing bit patterns is dotted decimal notation in…
A: The dotted decimal representation means representing each 8 bits binary numbers into it's decimal…
Q: List out names of 10 reserved words in Python?
A: Question is asking for name of 10 keywords in Python Programming Language.
Q: 1. Use a Loop to write a program that reads and calculates the sum of an unspecified number of…
A: Program: #include <bits/stdc++.h> using namespace std; //define the main function int main()…
Q: I need help with this C Program question. TO DO a): Implement function ToLowerCase() that will…
A: C is a programming language based on general purpose used to implement code. Functions is used to…
Q: Explain features of Windows operating system
A: Operating system is a system software which is initially loaded into the system to manage the…
Q: If the system fails repeatedly during recovery, what is the maximum number of log records that can…
A:
Q: Undirected graph is given with the list of edges. Build an adjacency matrix. Print the number of…
A: Here is the algorithm regarding the given problem with explanation:
Q: Q1- Convert the following: a- 1011 1100B to hexadecimal b- 173D to binary c-4 1. 6875 to binary
A: Note: As per Bartleby's answering guidelines, only 3 first sub-parts can be answered. Please re-post…
Q: Which parts of the information system pertain to organisational structure, administrative duties,…
A: The challenges of organization, administration, and technology are all addressed. Senior executives…
Step by step
Solved in 4 steps with 2 images
- Python problem To decipher a code we must make a program that performs certain operations on the input string. -If they find 3 equal letters in a row, you must replace them with the next letter in the alphabet.-If you only find 2 equal letters in a row, you must replace them with the previous letter in the alphabet.-The comma must be removed-The period should be left and a space added after it.-All other characters should be left as isNote that in this case after the "Z" is the "A", and therefore before the "A" is the "Z". Given a string S, execute the operations described above, until no more can be executed. For example: GHHGP, OOOMMZAAZ => GGGPPLZZZ => HELLO EntryThe input will be a single line containing the string S. The string only includes uppercase letters of the English alphabet and special characters. DepartureYou must print the resulting string in double quotes ". Examples Input Example 1 LLLENTTA, JDDD OBCCBUMMTO!Output Example 1 "HIDDEN MESSAGE!" Input Example 2…Python problem To decipher a code we must make a program that performs certain operations on the input string. -If they find 3 equal letters in a row, you must replace them with the next letter in the alphabet.-If you only find 2 equal letters in a row, you must replace them with the previous letter in the alphabet.-The comma must be removed-The period should be left and a space added after it.-All other characters should be left as isNote that in this case after the "Z" is the "A", and therefore before the "A" is the "Z". Given a string S, execute the operations described above, until no more can be executed. For example: GHHGP, OOOMMZAAZ => GGGPPLZZZ => HELLO EntryThe input will be a single line containing the string S. The string only includes uppercase letters of the English alphabet (Does not include Ñ) and special characters. DepartureYou must print the resulting string in double quotes ". Examples Input Example 1 LLLENTTA, JDDD OBCCBUMMTO!Output Example 1 "HIDDEN…HO Webcom /Desktop/CSE110%20Lab%20Assignment%203.ipynb Search Lab Assign ment 3- X cer CSE110 Lab Assignment 3 (autosaved) Logout it View Insert Cell Kernel Help Python 3 O Not Trusted N Run Markdown bangla Task 2 Write a Python program that will ask the user to enter a word as an input. • If the length of the input string is less than 4, then your program should print the same string as an output. • If the input string's length is greater than 3, then your program should add "er" at the end of the input string. • If the input string already ends with "er", then add "est" instead. If the input string already ends with "est", then your program should print the same input string as an output. Example 1: Input: strong REDMI NOTE 9 AI QUAD CAMERA
- esktop/CSE110%20OLab%20Assignment%203.ipynb Search b Assignment 3- er CSE110 Lab Assignment 3 (auftosaved) Lo View Insert Cell Kernel Help Pythons Not Trusted M Run Markdown bangla Task 2 Write a Python program that will ask the user to enter a word as an input. • If the length of the input string is less than 4, then your program should print the same string as an output. If the input string's length is greater than 3, then your program should add "er" at the end of the input string. • If the input string already ends with "er", then add "est" instead. • If the input string already ends with "est", then your program should print the same input string as an output. Example 1: Input: strong REDMI NOTE 9 AI QUAD CAMERApython: a function that counts the number of occurrences of given character in a given string. For example, calling the function with Count(‘j’, ‘just joshin’) returns 2. Note the function counts the character regardless of case.In c language Using function strtod(), Create a character string that contains the following string: “78.3% is the average success rate” Divide this string into double and display the rest of the string The output will be: The original string is: 78.3% is the average success rate The extracted double value is: 78.3 The remainder of the string is: % is the average success rate
- String: abcdefghijklmnopqrstuvwxyzyxwvutsr qponmlkjihgfedcba Make a program that: reads a letter from standard input print the above string up to this letter For example, if the letter was c, the output would be: abcba Must use a function and PythoncapCount.py make a program called capCount.py that has a function that takes in a string and prints the number of capital letters in the first line, then prints the sum of their indices in the second line. The string "hEllo, World" would should look like this: 28Python Pgogram Write a program that incorporates an algorithm with a function that will check whether or not a string is in a valid password format with the following rules: A password must have at least ten characters.A password consists of only letters, digits and symbol(s).A password must contain at least two digits. A password must contain at least one uppercase letter A password must contain at least one special symbol Your program should continue to prompt until the user enters a valid password. Regular expressions (regex) are not allowed!
- PYTHON without Def function Problem Statement Implement a function which takes two arguments: the first is a string and the second is a single character (as a string). This function should move every instance of the given character in the string to the end of the string, and then return (do NOT print) the final string. Sample Input "hello how are you?", "o" Sample Output "hell hw are yu?ooo"Q: Create a program, longest.py, that has a function that takes one string argument and prints a sentence indicating the longest word in that string. If there is more than one word print only the first. Your print statement should read: “The longest word is x” Where x = the longest word. The word should be all lowercase. I have the correct code, but the out put should only print: "The longest word is x". In my case it asks me an input first which I don't need. string = input('Enter string:'). My question is to remove the 'Enter string:' from my code, so that I get the correct working prints with only: "The longest word is x". I tried to remove that, but could print. Thanks ------------------------------------------------------------------------------ def longestWord(): length = 0 x: longestWord() = '' for word in string.split(): if len(word) > length: length = len(word) x = wordreturn x*****string = input('Enter string:') **** (want to remove this part) x =…countVowels.py● Using import sys : Create a python program called countVowels.py that has a function that takes in a stringthen prints the number of unique vowels in the string (regardless of it being upperor lower case).● For example:○ The argument “swEet” should print 1○ The argument “AaaaeeE” should print 2