Write a program that prompts the user for the length of one side of a triangle and the sizes of the two adjacent angles in degrees and then displays the length of the two other sides and the size of the third angle.
In: Computer Science
implement a formula of your own choosing, as a Python function, following these instructions:
In: Computer Science
4 function calculator (op1 oper op2) using scheme
language
also include comments
In: Computer Science
C# Language
In: Computer Science
Pyramid of oranges, 2^x in each row, total for n rows using scheme language also include comments
In: Computer Science
The following task does not involve writing program code: instead, you will be writing function signatures for hypothetical functions (you will be defining functions in subsequent tasks).
In: Computer Science
Motor, Inc. is a car dealer that sells both new cars and second-hand cars. You are the technical consultant of Motor Inc. and are currently helping the company to develop a database system. Your job is to draw an ERD to help them design the database.
In: Computer Science
1. Describe four cloud-specific security threats.
2. Are there any advantages in not including the MAC in the scope of the packet encryption in SSH?
In: Computer Science
JAVA
StudentId: Consist of the first two characters of the student's first name, student's birth year, and the last two characters of the last name. For instance, if the student full name is John Doe and birthyear is 1995, then the id will be Jo1995oe. Birthday is using GregorianCalendar.
String firstname
String lastname
GregorianCalendar birthday
In: Computer Science
a. (T or F) A member of a class can be a method or an attribute.
b. (T or F)The private attributes of a class cannot be accessed by the public methods of that class.
c. (T or F) The initialization of a variable in the declaration
Ex: int counter = 0;
is not allowed inside a class definition.
d. (T or F) In C++ a class is a definition; it does not exist in RAM until an object is created, using the definition.
e. (T or F) A member of a class that was created “on the stack” (locally) can be accessed by using the dot operator (.) followed by the member name.
In: Computer Science
Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track of several trips by recording miles driven and gallons used for each trip. Develop a Java program that uses a while statement to input the miles driven and gallons used for each trip. The program should calculate and display the miles per gallon obtained for each trip and print the combined miles per gallon obtained for all tankfuls up to this point. Enter miles driven (-1 to quit): 287 Enter gallons used: 13 MPG this trip: 22.076923 Total MPG: 22.076923 Enter miles driven (-1 to quit): 200 Enter gallons used: 10 MPG this trip: 20.000000 Total MPG: 21.173913 Enter the miles driven (-1 to quit): 120 Enter gallons used: 5 MPG this trip: 24.000000 Total MPG: 21.678571 Enter the miles used (-1 to quit): -1
In: Computer Science
9.9 LAB: Artwork label (classes/constructors)
Define the Artist class with a constructor to initialize an artist's information and a print_info() method. The constructor should by default initialize the artist's name to "None" and the years of birth and death to 0. print_info() should display Artist Name, born XXXX if the year of death is -1 or Artist Name (XXXX-YYYY) otherwise.
Define the Artwork class with a constructor to initialize an artwork's information and a print_info() method. The constructor should by default initialize the title to "None", the year created to 0, and the artist to use the Artist default constructor parameter values.
class Artist:
def __init__(self,name, birth_year, death_year):
self.name = 'None'
self.birth_year = 0.0
self.death_year = 0.0
def print_info(self):
if death_year == -1:
print('Artist:', name,'born' ,birth_year)
else:
print('Artist:', name,'(',birth_year,'-',death_year,')')
class Artwork:
def __init__(self,title,year_created,artist):
self.title = 'none'
self.year_created = 0.0
self.artist = Artist(name,birth_year,death_year)
def print_info(self):
print('Title:',end= ' ')
print(title,end= ' ')
print(year_created)
if __name__ == "__main__":
user_artist_name = input()
user_birth_year = int(input())
user_death_year = int(input())
user_title = input()
user_year_created = int(input())
user_artist = Artist(user_artist_name, user_birth_year, user_death_year)
new_artwork = Artwork(user_title, user_year_created,
user_artist)
new_artwork.print_info()
Whats wrong with my code? It keeps saying Title and Artist arn't defined. And it won't print class artist.
In: Computer Science
Create, test, and validate an HTML document that defines a table with columns for state, state bird, state flower, and state tree. There must be at least five rows for states in the table.
In: Computer Science
I have a error code, for my C++ class, using Putty
include <iostream>
using namespace std;
int main()
{
char answer;
char grade;
cout << "Are you taking a class (enter y, Y, N or N): "
<< endl;
cin >> answer;
if (answer == 'N' || 'n');
{
cout << "Thanks for using the system" << endl;
}
else if (answer == 'Y' || 'y');
{
cout << "Enter a letter grade (A, B, C, D, or F): " <<
endl;
cin >> grade;
switch(grade);
{
case 'A':
cout << "Great Job!" << endl;
break;
case 'B':
cout << "Great Job!" << endl;
break;
case 'C':
cout << "You're doing alright." << endl;
break;
case 'D':
cout << "You can improve." << endl;
break;
case 'F':
cout << "You can improve." << endl;
break;
default:
cout << "Invalid grade." << endl;
break;
}
}
else
{
cout << "Invalid input" << endl;
}
return 0;
}
In: Computer Science