Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.


Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.


Input:-

The input will be a string in the single line containing spaces and letters (both uppercase and lowercase).


Output:-

The output should be a single line containing the secret message. All characters in the output should be in lower case.


For Example -

Input 1:-

python


Output 1:-

16-25-20-8-15-14


Input 2:-

Foundations

Output 2:-

6-15-21-14-4-1-20-9-15-14-19


Input 3:-

python learning

Output 3:-

16-25-20-8-15-14 12-5-1-18-14-9-14-7


When we give three Inputs one by one they can give exact three Outputs must be come when code can be executed


Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways. Complete the program to read the needed values from input, that the existing output statement can use to output a short story.

#include <iostream>

using namespace std;


int main() {


  cout << "name";

  string location;

  int  number;

  string pluralNoun;

  

   

  

  cout << name << " went to " << location << " to buy " << number << " different types of " << pluralNoun << "." << endl;


  return 0;

}




ANG IYONG KAPALARAN sa 2030 PROGRAM

Create a list with following items:

  • Maganda
  • Pogi
  • Cute
  • Panget
  • Sexy
  • Payat
  • Mataba
  • Walang Jowa
  • In a Relationship
  • Married
  • Umaasa sa Ayuda
  • Rich kid
  • Successful
  • Sinungaling parin

(Pwede mong dagdagan ang items)



Then the program should ask for your name and birth year and compute your age. The program should display the randomly picked item on list.

Note: Do not use random.choice() function


Sample output:


Enter your name: Carlo

Enter your Birth Year: 1999


Carlo, Ang iyong edad ay 31 at Ikaw ay Sinungaling parin sa 2030


Problem 1:

Create 2 virtual dice. Roll both dice, display the random value of each, and display the result.



Sample output:

First dice: 3

Second dice: 6

You got 9


1.Use a for loop and the list append method to generate the powers of 2 to produce the following result [1, 2, 4, 8, 16, 32, 64, 128]
2.Write a for loop that prints a dictionary's items in sorted (ascending) order

Design a GPA calculator in which the student is allowed to enter maximum of 5 courses along with the course grade. The program should output the final GPA based on the scale below.

90-100 Excellent A 4.00

87-89 Very Good A- 3.75

84-86 Good B+

3.35 80-83 B 3.00

77-79 B- 2.75 74-76

Satisfactory C+ 2.50 70-73 Average C 2.00 67-69 Below Average

C- 1.75 64-66 Poor

D+ 1.50 60-63 D 1.00

<60 Fail F 0.00


Design a GPA calculator in which the student is allowed to enter maximum of 5 courses along with the course grade. The program should output the final GPA based on the scale below.


Write a program to accept two numbers at a time from the user. The product of the numbers is to be calculated and displayed. The user should then be prompted to indicate if they want to enter another pair of numbers.


Write a program to accept two numbers at a time from the user. The product of the numbers is to be calculated and displayed. The user should then be prompted to indicate if they want to enter another pair of numbers. As long as they enter ‘y’ at the prompt they should be allowed to enter another pair of numbers. Any other entry from the user at the prompt will result in them not being able to enter any more numbers.


Write the definition of a class WeatherForecast that provides the following behavior (methods):

  • A method called set_skies that has one parameter, a String.
  • A method called set_high that has one parameter, an int.
  • A method called set_low that has one parameter, an int.
  • A method called get_skies that has no parameters and that returns the value that was last used as an argument in set_skies.
  • A method called get_high that has no parameters and that returns the value that was last used as an argument in set_high.
  • A method called get_low that has no parameters and that returns the value that was last used as an argument in set_low.

No constructor need be defined. Be sure to define instance <span style="text-decoration-line: none;">variables</span> as needed by your "get"/"set" methods.


LATEST TUTORIALS
APPROVED BY CLIENTS