Write a code snippet that can arrange the alphabets of a name entered by user in alternate cases. Note: Ignore white spaces. Input String : Timothy Olyphant Output String : TiMoThY oLyPhAnT Input String : Olga Kurylenko Output String : OlGa KuRyLeNkO
Q: The problem is not the lower and upper case the problem is the quotation marks. The sentence,…
A: - The question is to read the string with the quotes and print accordingly with the quotes. - We…
Q: Write a code snippet that can arrange the alphabets of a name entered by user in alternate cases.…
A: Procedure Followed: Declare variable str: to store a string. Read a string from the user and store…
Q: Write a program which reads two integer values. If the first is less than the second, print the…
A: Here I have declared 2 variables num1 and num2 of integer data type. Next, I have taken input from…
Q: Write a program that inputs year and month number, it then display the number of days in that month…
A: The given problem is to be solved in programming language where the user will input the year and…
Q: convert this code to C languge #include using namespace std; int main() { string input = "hello…
A: The following is the C equivalent of the given C++ code: #include <stdio.h> int main() {…
Q: 1. Write a program that prompts the user to enter two points (x1, yl) and (x2, y2) and displays…
A: Here I have taken input from the user and then stored it into 4 different variables. Next, I have…
Q: Assume nextWord is a String variable that has been given a String value that is entirely made up of…
A: Here, A program statement is given.
Q: Read in a time such as 3 pm and print the equivalent military hour (such as 15). Validate the input.…
A: Program to convert the time in the equivalent military hour. Prompt the user to enter the hour. When…
Q: Create a program that prints it flipped and exchanges the last word when given a three-word phrase…
A: #include <bits/stdc++.h>using namespace std; int main(){ string s[] = {"i", "like", "this",…
Q: Ex: If the input of the program is: food.txt and the contents of food.txt are: Sandwiches Ham…
A: Code Screenshot :
Q: (1) Prompt the user for a string that contains two strings separated by a comma. Examples of…
A: spilt() function in Python splits a string into a list. not in key word is used to check if comma…
Q: Forms often allow a user to enter an integer. Write a program that takes in a string representing an…
A: Please find the answer below :
Q: Use this table to convert digits to barcode representation and vice-versa; each digit is represented…
A: we are going to convert the following zip code into bar code-
Q: Create a program that accepts input from the user and outputs information about the test scores:
A: #include <stdio.h> int main(){ int marks[5], total=0, hscore=0; double avg;…
Q: (1) Prompt the user for a string that contains two strings separated by a comma. Examples of…
A: The complete code is given below.
Q: 1. Write a program that prints your name, age, and department in console 2. Write a program that…
A: As no programming language is mentioned, it is solved using C++
Q: Write a code that prints the Fibonacci series backwards. Prompt for and input two integers in the…
A: #include <stdio.h> int main() { printf("Enter two numbers in fibonacci series:"); int…
Q: Fix the errors and find the lowest marks entered by the user struct std{ string name; int reg_no;…
A: Given data is shown below: Fix the errors and find the lowest marks entered by the user struct…
Q: You must have 2 functions: one computes the average and the other finds the letter grade. The…
A: A) Calculate Average def calcAverage(score1, score2, score3, score4, score5): return (score1 +…
Q: Girl Scout Troop 815 has 18 members. Write the pseudocode for a program in which the troop can enter…
A: The following the required pseudo code for display the total number of boxes sold and calculate…
Q: Write a program that takes your full name as input and displays the abbreviations of the first and…
A: 1- Note: Since you have not provided the language to write the code so I am using java language to…
Q: paython Q3) Assume that your friend has a problem in his keyboard such that it sometimes repeats…
A: Algorithm: Start Read a string Convert it to list Traverse through the string from j=1 to…
Q: Q1) Write a program that takes as input any change expressed in Saudi Riyals. It should then compute…
A: //Note: Always the language of code in which you want the result. //For Now I am doing this in java…
Q: 18.1 LAB: Longest string Write a program that takes in two strings and returns the longest string.…
A: #Return the string whose length is longest def compute(x,y): if len(x) > len(y): #Comparing…
Q: = int(input("Enter value for x:")) if x == -1 : print("Disagree") elif x == 0: print("Neutral")…
A: Please find the answer below
Q: Write a program that consists of the following algorithm: num1 =4, num2= 4* 5-11, sale = 0.02 *…
A: Write a program that consists of the following algorithm: num1 =4, num2= 4* 5-11, sale = 0.02 *…
Q: (1) Prompt the user for a string that contains two strings separated by a comma. (1 pt) Examples of…
A: //Java Source Code :- import java.util.Scanner; public class ParseString { public static void…
Q: Write a program that prompts for an odd integer that is between 50 and 100, inclusive. Use just one…
A: #Program to validate user input of odd and in range number #prompt user to enter an odd number…
Q: IN PYTHON Write a script which uses the input function to read a string, an int, and a float, as…
A: In Python, input() method is used to take the input from the user. int() method is used to convert…
Q: Given a string that contains text. Print all words starting with the letter that the user enters.…
A: Required: Given a string that contains text. Print all words starting with the letter that the…
Q: Write a program that repeatedly prompts a student to enter grade points (on a scale of 0-4) and…
A: Please find the answer below :
Q: Develop a program in java that aids in the creation of non-empty palindromes i.e. an algorithm that…
A: Java program is given below to print all pre set number of palindromes
Q: Write a program that reads in a grade from the user using JOptionPane. (Remember that the grade is…
A: Programs are a sequence of code that give the machine instructions. To complete those tasks,…
Q: 2. Randomly generate an integer umber in range [100, 999]. (a) Check if this number is even or odd,…
A: Given: To write a program to generate an integer number in range[100,999] and print according to…
Q: Write Psuedo-code of an algorithm that will repeatedly ask the user to enter a number 10 times. If…
A: Psuedo code is step by step written outline that can be easily translated into the program.
Q: write a js code that enter two integers ab with a difference of 1000, and then randomly generate 10…
A: Here have to determine about javascript code to print random odd number.
Q: Write a single program that allows the user to enter two (2) strings and perform each of the…
A: #include <iostream>using namespace std; int main(){ string s1, s2, result; cout…
Q: Code should be in Python Prompt the user for a string that contains two strings separated by a…
A: logic:- use while True infinite loop read string if string==‘q’ or string ==‘Q’ break…
Q: Using Python, Many documents use a specific format for a person's name. Write a program whose input…
A: Algorithm and explanation: In the given problem, we can solve it by using string and list concepts.…
Q: A software company sells a package that retails for $99. Quantity discounts are given according to…
A: question :- Program using C++ language without the use of logical operators (&&, || ,!) To…
Q: Change a String to uppercase with a tese Write a python program that allows the user to enter a…
A: #take string as input s = input("Enter a String : ") #variable to hold count of upper case char…
Q: Write a program that asks the user to type a vowel from the keyboard. If the character entered is a…
A: Actually, program is a executable software that runs on a computer.
Q: Write a program that takes input values as integer, checks the number is not less than 10 (otherwise…
A: The program reads a value from the user in the while loop because the value is unknown. If the…
Q: Write a program that can be used as a math tutor for a young student. The program should display two…
A: Introduction: Write a programthat can be used as a math tutor for a young student. The program…
Q: Take user input for a sentence (character by character) and count total number of vowels both…
A: Input character by character into a string till user moves to new line Compare each character and…
Q: echo Enter your Name: read studentnane echo Enter your First Grade: read grade1 echo Enter your…
A: echo is used to print the content on console read is used to read the contents from console Now this…
Q: write a code snippet that can arrange the alphabet of a name entered by user in alternate case…
A: Introduction of Program: The C program takes a string from the user and then the program converts…
Q: Write a code snippet that can arrange the alphabets of a name entered by user in alternate cases.…
A: The required C program code is: #include <stdio.h>void changeCase(char []); // function…
Q: 9. Give the output of the expression below: firstName= "Thebe" string str4 = "It is written..";…
A: String: it is a collection of characters. Here we need to declare firstName as string then we will…
Step by step
Solved in 2 steps with 1 images
- PEN AND PAPER FLOWCHART. Hand write the correct pseudocode using pen and paper. DEBUG03-03 // This pseudocode is intended to display// employee net pay values. All employees have a standard// $45 deduction from their checks.// If an employee does not earn enough to cover the deduction,// an error message is displayed.// This example is modularized.start Declarations string name string EOFNAME = ZZZZ while name not equal to EOFNAME housekeeping() endwhile while name not equal to EOFNAME mainLoop() endwhile while name not equal to EOFNAME finish() endwhilestop housekeeping() output "Enter first name or ", EOFNAME, " to quit "return mainLoop() Declarations num hours num rate num DEDUCTION = 45 num net output "Enter hours worked for ", name input hours output "Enter hourly rate for ", name input rate gross = hours * rate net = gross - DEDUCTION if net > 0 then output "Net pay for ", name, " is ", net…Password modifier Many user-created passwords are simple and easy to guess. Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "q*s" to the end of the input string. You may assume that the string does not contain spaces and will always contain less than 50 characters. i becomes ! a becomes @ m becomes M B becomes 8 o becomes . Ex: If the input is: mypassword the output is: Myp@ssw.rdq*s LAB ACTIVITY 4.20.1: LAB: Password modifier 0 / 10 please you c programmingFunction SubStr( St As String) As String Sum=1 for x=l to 8 if x mod 2 = 0 then S=Mid(St, x, x*2) Else S=Mid(St, x, x+2) End if Next x SubStr=S End Function Sub Cmd_Click() Label.text= SubStr("Phones:987456124123456744") End Sub 987456124 :9874561241 9874561241 98745612412
- Q: People often forget closing parentheses when entering formulas. Write a program that asks the user to enter a formula and prints out whether the formula has the same number of opening and closing parentheses. Q: Write a program that asks the user to enter a word and prints out whether that word contains any vowels. Q: Write a program that asks the user to enter a string. The program should create a new string called new_string from the user’s string such that the second character is changed to an asterisk and three exclamation points are attached to the end of the string. Finally, print new_string. Typical output is shown below: Enter your string: Qbert Q*ert!!! Q: Write a program that asks the user to enter a string s and then converts s to lowercase, removes all the periods and commas from s, and prints the resulting string. Q: Write a program that asks the user to enter a word and determines whether the word is a palindrome or not. A palindrome is a word that reads the same…C# language MORSE CODE CONVERTERDesign a program that asks the user to enter a string and thenconverts that string to Morse code. Morse code is a code whereeach letter of the English alphabet, each digit, and variouspunctuation characters are represented by a series of dots anddashes. Table 8-9 shows part of the code. Needs to be two labels, two text boxes and click button for conversionPassword modifier Many user-created passwords are simple and easy to guess. Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "q*s" to the end of the input string.i becomes ! a becomes @ m becomes M B becomes 8 o becomes .
- Capitalize initial keyword – This is a rule while writing a pseudo code. T/FPls debug this pseudocode // Program lets user input scores on four tests// Average is computed and letter grade is determined// Letter grades are based on 90 for an A, 80 for a B, and so onstart string name num score num NUM_TESTS = 4 num NUM_RANGES = 5 num RANGES[NUM_RANGES] = 90, 80, 70, 60, 0 string QUIT = "ZZZZZ" string GRADES[NUM_RANGES] = "A", "B", "C", "D", "F" num total num average num sub output "Enter student name or ", QUIT, " to quit " input name while name <> QUIT sub = 0 total = 0 while sub < NUM_TESTS output "Enter score " input score total = score endwhile sub = 0 while average < RANGES sub = sub + 1 endwhile letterGrade = GRADES[sub] output name, letterGrade output "Enter student name or ", QUIT, " to quit " input lettergrade endwhilestopOdd Even Number Problem Description Even Numbers are integers that are exactly divisible by 2, whereas an odd number cannot be exactly divided by 2. Example of even numbers are 2,4,6,8 and odd numbers are 1, 3, 5, 7, 9. Input The first line input contains an integer, which determines the number of test cases. Each of following lines represent sequence of integers that ends with 0. 2 34 1 8 5 22 0 10 7 16 -2 0 Output For each test case, the output will present the size of oddQueue and evenQueue following with the integers of odd and even numbers. oddQueue 2: 1 5 evenQueue 3: 34 8 22 oddQueue 1: 7 evenQueue 3: 10 16 -2 ** Your task is to write a program that will read the input and identify whether it is an odd number or even number. /******************************************************************************* Compilation: javac Queue.java** The Queue class represents a first-in-first-out (FIFO) queue of generic items.* It supports the usual enqueue and dequeue…
- Option #1: String Values in Reverse Order Assignment Instructions Write a Python function that will accept as input three string values from a user. The method will return to the user a concatenation of the string values in reverse order. The function is to be called from the main method. In the main method, prompt the user for the three strings.Name: Claz 4. Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case. The code segment below is intended to display all multiples of 5 between the values start and end, inclusive. For example, if start has the value 35 and end has the value 50, the code segment should display the values 35, 40, 45, and 50. Assume that start and end are multiples of 5 and that start is less than end. Line 1: i + start Line 2: REPEAT TIMES Line 3: { DISPLAY (i)oplev a bonin vimobn ldemyA i + i + 5 Line 4: Line 5: Line 6: } Which of the following could replace in line 2 so that the code segment works as intended? wlf a0wollo 1 end - start + 1 b. end start + 6 (( end - start) / 5) + 1 d. 5 * (end - start) + 1 а. C.Pig Latin is a nonsense language. To create a word in pig Latin, you remove the first letter and then add the first letter and ay at the end of the word. For example, dog becomes ogday and cat becomes atcay. Write a program named PigLatin that allows the user to enter a word and displays the pig Latin version.