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

1. Open and read the countrycities.csv file.

2. Count and display the number of cities per country.

3. Count and display the country which is a member of the EU (EU = yes) and not a member of the EU (EU = no).

4. Find and display the country with the highest and lowest total population.

5. Count and display the country with a coastline (coastline = yes) and without a coastline (coastline = no).


THIS IS THE LINK OF countrycities if you can help me with this i badly need this, i am just a student : https://drive.google.com/drive/folders/1dFoUHbPrBo3hiOJY_PTccdlQXSM4YJ4s?usp=sharing


 Discuss how an operating system protects computer

hardware, processor, main memory, and input-output

devices of a computer system; and provide

appropriate practical examples to illustrate your

answer.


Write a program in C++ that uses a structure to store the following product data in a file (File 

Name: product.txt):

Product ID

Product Name

Quantity 

Wholesale Cost

Retail Cost

Date Added to Product

The program should have a menu that allows the user to perform the following tasks:

• Add new records to the file.

• Display any record in the file.

The program should calculate and display the following data:

• The total wholesale value of the product

• The total retail value of the product

Input Validation: The program should not accept quantities, or wholesale or retail costs, less 

than 0. The program should not accept dates that the programmer determines are unreasonable.


Control Structures: As a build up from the previous question, consider 3 possible scenario of input : A character, number or word. You program should the do the following: In case the input is a character it should indicate if it’s a vowel or not, when a number is entered then it’s should check if it’s a prime and finally if a word is entered the system should check if it’s a palindrome or not. Sample Run1 Sample Run3 Enter a character, number or word: c Enter a character, number or word: 7 Output1: C is not a vowel Output3: 7 is a prime number Sample Run2 Enter a character, number or word: programming Output2: Programming is not a palindrome


Given a positive number, create an array with that number as a size and populate it with the items/names provided. Additionally, the program should print out the longest name in the array. Sample Run1 3 Apple Banana Kiwi Output1: Banana is the longest name


Input three random characters and make sure they are inputted on different lines.

Print out the three characters in order, each on a different line, using only 1 printf() statement and newline characters (\n).

An initial code with the one printf() is provided for you, just complete the missing items inside it. Do not add any other printf()'s


Instructions:

  1. Your task is to ask the user for a character input.
  2. Then, include the cctype built-in library and call the toupper() function. In case you do not know what this function is, this function has the following definition:
  3. Return type - int
  4. Name - toupper
  5. Parameter - one integer which represents the ASCII of a character
  6. Description - returns the ASCII of the uppercase equivalent of the character passed
  7. Extra note - even though it's function definition in the C++ Programming Language Documentation is int toupper(int ch), you can just pass a normal char variable instead and this will just be automatically typecasted/converted to its integer equivalent.
  8. Once you get the uppercase equivalent, print this out.


Sample:

Enter a small letter: a
Uppercase = A


Enter a small letter: f
Uppercase = F

Write a python function Write_String(fname, *list)  which take a list containing string elements and write them in a file myfile.txt until the string “finish” (not case sensitive) occur. The function then returns the contents written in file as a string. Before writing list elements in file, you also need to make a separate python function to check whether input list contains "Finish" or not. If not, then it should return error as shown in example.


Write the program in function definition?


myfile.txt:

Python

Java

C

C++

Ruby

.Net


 

Example-1

Example-2

Example-3

Input:

myfile.txt

["Python", "Java", "C", "C++", "Finish"]

 

Output:

PythonJavaCC++

Input:

myfile.txt

["Python", "Java", "C", "C++", "Finish",".Net", "Rubby"]

Output:

PythonJavaCC++Input:

myfile.txt

["Python", "Java", "C", "C++"]

Output:

Error: List does not contain Finish

 


 Write a python function Read_Prime(fname, list)  which takes a list of numbers as an input, use this number to write them in a file "primes.txt" . The function then read the file and return a list containing only prime numbers as shown in the example. Also, write the exception handling code to show the proper message.


def Read_Prime(fname, list_1):

    #write your code here

 

    return

#Call your function from main

list_1=[1,2,3,4,5,6,7]

fname = "primes.txt"

res = Read_Prime(fname, list_1)

print(res)


Example-1

Example-2

Example-2

Input:

primes.txt

[1,2,3,4,5,6,7]

 

Output:

[1,2,3,5,7]

Input:

primes.txt

[3,6,5,13,18,21]

 

Output:

[3,5,13]

Input:

primes.txt

[2,4,6,8,10]

 

Output:

[2]



Write a code on even and odd numbers


LATEST TUTORIALS
APPROVED BY CLIENTS