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

find the class of each address.


a) 00000001 00001011 00001011 11101111


b) 11000001 10000011 00011011 11111111


c) 14.23.120.8


d) 252.5.15.111


Given list sorting array and same frequency



Input:



[2 6 3 1 8 12 2 9 10 3 4]



Output:



[1 2 2 3 3 4 6 8 9 10 12]



2 3

Switch Statement



Sample output:


Enter any one of the alphabets a,b,or c:A


You are in case A



Sample output 1:


Enter any one of the alphabets a,b,or c:a


You are in case a



Sample output 2:


Enter any one of the alphabets a,b,or c:b


You are in case b

Make a program that will use the scanner and will output strings, int and double


ENTER FULLNAME


ENTER ADRESS


ENTER STATUS


ENTER SCHOOL NAME



ENTER FIRST NUMBER


ENTER FIFTH NUMBER



ENTER FIRST DECIMAL NUMBER


ENTER FIFTH DECIMAL NUMBER

Develop a java program to get n numbers as input and find the second duplicate and print the reverse of a number

First line contains the value n and the remaining lines contain the corresponding input

Input:

5

11

24

33

11

24

Output:

42

Note:

If the second duplicate is single digit, print as it is

If there is no second duplicate, print the first duplicate itself

If there is no duplicate, print "No duplicate found


Create and Print List -3:

You are given N numbers as input. Create a list and add the N numbers which are given as input and print the list.


Input:

The first line of input is an integer N. The next N lines each contain an integer.

Explanation:

In the given example,

N=4 and the numbers are 1, 2, 3, 4. So, the output should be [ 1, 2, 3, 4 ]

Sample Input 1

4

1

2

3

4

Sample Output 1

[1, 2, 3, 4]

Sample Input 2

3

13

21

19

Sample Output 2

[13, 21, 19]


can i get code without using append


Write a class that has three overloaded methods for calculating the areas of the following geometric shapes:

 

•    Circle

•    Rectangle

•    Cylinder

 

Here are the formulae for calculating the area of the respective shapes:


Shape: Circle

Area Formula: A = πr2

Notes: π is Math.PI and r is the circle’s radius

Shape: Rectangle

Area Formula: Area = Width * Height

Shape: Cylinder

Area Formula: Area = 2πrh + 2πr2

Notes: π is Math.PIand r is the radius of the cylinder’s base h is the cylinder’s height


  1. what does this statement print system.out.println(''bc'' + 2 + 3)

Sanjay is recruited in Infosys company as a python developer. The company assigned him a software development task to build a compiler. Sanjay identifies that for compiler designing he need to implement tokenization of a specific line of program. As a friend of Sanjay, your task is to help him to write a python function Tokenize_Line(fname, n) (Refer RollNo_W11A_2.py )which reads nth line from prime.py file and returns a list containing all tokens of that line as shown in the example. Also, handle the possible exception and provide proper message.







Contents of prime.py file will be like:




from math import sqrt




n = 1




prime_flag = 0




if(n > 1):




for i in range(2, int(sqrt(n)) + 1):




if (n % i == 0):




prime_flag = 1




break




if (prime_flag == 0):




print("true")




else:




print("false")




else:




print("false")

You are given a file read.txt which contains some lines. As a python developer, you need to write a python function Read_Contents(fname, n) (Refer RollNo_W11A_1.py )which takes the name of the files and number of lines to be read from file. The function returns those lines in a string as shown in example.



Contents of read.txt file will be like:



This is python Lab.



The is the program for file handling.



Reading first n lines !

LATEST TUTORIALS
APPROVED BY CLIENTS