The program that will calculate the internal angle of an n-sided polygon from a triangle upto a dodecagon is given below
import random
def internal_angle(n):
angle = 360 / n
return angle
n = random.randint(3, 12)
print("Random number chosen:", n)
angle = internal_angle(n)
print("Internal angle of a", n, "-sided polygon:", angle, "degrees")
What is the Python program about?The program uses the formula for calculating the internal angle of a polygon, which is 360° divided by the number of sides (n). It also generates a random number between 3 and 12 to represent the number of sides of the polygon, and uses this value to calculate the internal angle.
The program starts by importing the random library, which is used to generate a random number. Then, it defines a function called "internal_angle" that takes one parameter, "n", which represents the number of sides of the polygon.
Inside the function, the internal angle of the polygon is calculated by dividing 360 by n and storing the result in the variable "angle". The function then returns this value.
Therefore, It's important to note that the internal angle of a polygon would be correct as long as the number of sides is greater than 2.
Learn more about Python program from
https://brainly.com/question/28248633
#SPJ1
(PYTHON)
The instructions will be shown down below, along with an example of how the program should come out when finished. Please send a screenshot or a file of the program once finished as the answer.
Using the knowledge in computational language in JAVA it is possible program should come out when finished.
Writting the code:package numberofcharacters;
import java.util.ArrayList;
public class App {
public static void main(String[] args) {
String toCalculate = "123+98-79÷2*5";
int operator_count = 0;
ArrayList<Character> operators = new ArrayList<>();
for (int i=0; i < toCalculate.length(); i++){
if (toCalculate.charAt(i) == '+' || toCalculate.charAt(i) == '-' ||
toCalculate.charAt(i) == '*' || toCalculate.charAt(i) == '÷' ) {
operator_count++; /*Calculating
number of operators in a String toCalculate
*/
operators.add(toCalculate.charAt(i)); /* Adding that operator to
ArrayList*/
}
}
System.out.println("");
System.out.println("Return Value :" );
String[] retval = toCalculate.split("\\+|\\-|\\*|\\÷", operator_count + 1);
int num1 = Integer.parseInt(retval[0]);
int num2 = 0;
int j = 0;
for (int i = 1; i < retval.length; i++) {
num2 = Integer.parseInt(retval[i]);
char operator = operators.get(j);
if (operator == '+') {
num1 = num1 + num2;
}else if(operator == '-'){
num1 = num1 - num2;
}else if(operator == '÷'){
num1 = num1 / num2;
}else{
num1 = num1 * num2;
}
j++;
}
System.out.println(num1); // Prints the result value
}
}
See more about JAVA at brainly.com/question/29897053
#SPJ1
Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 5 percent and the county sales tax is 2.5 percent.in python
Answer:
This program first prompts the user to enter the amount of the purchase. It then defines the state and county sales tax rates as constants. It calculates the state and county sales tax amounts by multiplying the purchase amount by the appropriate tax rate. Finally, it calculates the total sales tax by adding the state and county sales tax amounts together, and prints the results.
Hey tell me more about your service
Answer:
look below!
Explanation:
please add more context and I’ll be happy to answer!
Write a java program that asks the student for his name and the month in which he/she was born. Students are then divided into sections, according to the following: Section A: Name starts between A - E Born between months 1 - 6 Section B: Name starts between F - L Born between months 1 - 6 Section C: Name starts between M - Q Born between months 7 - 12 Section D: Name starts between R - Z Born between months 7 - 12
Answer:
import java.util.Scanner;
public class SectionAssignment {
public static void main(String[] args) {
// Create a scanner object to read input
Scanner input = new Scanner(System.in);
// Prompt the student for their name
System.out.print("Enter your name: ");
String name = input.nextLine();
// Prompt the student for the month they were born
System.out.print("Enter the month you were born (1-12): ");
int month = input.nextInt();
// Assign the student to a section based on their name and birth month
String section = "";
if (name.charAt(0) >= 'A' && name.charAt(0) <= 'E' && month >= 1 && month <= 6) {
section = "A";
} else if (name.charAt(0) >= 'F' && name.charAt(0) <= 'L' && month >= 1 && month <= 6) {
section = "B";
} else if (name.charAt(0) >= 'M' && name.charAt(0) <= 'Q' && month >= 7 && month <= 12) {
section = "C";
} else if (name.charAt(0) >= 'R' && name.charAt(0) <= 'Z' && month >= 7 && month <= 12) {
section = "D";
} else {
section = "Invalid";
}
// Print the student's section assignment
System.out.println("Your section is: " + section);
}
}
Type the program's output states = ['CA', 'NY', 'TX', 'FL', 'MA'] for (position, state) in enumerate(states): print(state, position)
Answer:
states = ['CA', 'NY', 'TX', 'FL', 'MA']
for (position, state) in enumerate(states):
print(state, position)
Output:
CA 0
NY 1
TX 2
FL 3
MA 4
What benefit do internal networked e-mail systems provide over Internet-based systems?
A) They enable the transmission of videos.
B) They allow e-mail to be sent to coworkers.
C) They allow files to be shared by sending attachments.
D) They provide increased security.
Answer:
The correct answer is D) They provide increased security.
draw a flowchart to accept two numbers and check if the first number is divisible by the second number
Answer:
I've attached the picture below, hope that helps...
Can you incorporate open-source code from a github forum into IP tool?
Answer:
No
Explanation:
Answer: No, Info does not allow the use of open-source components in proprietary software he contracts.
_______ is the assurance that you can rely on something to continue working properly throughout its lifespan.
A) Reliability
B) Raid
C) P/E cycle
D) MTBF
Meredith's repair business has two offices—one on the east side of town and one on the west side. An employee may work out of one office on one day and the other office on the next, based on the workload on a given day. For this reason, Meredith found it useful to set up a network to connect both offices. The company's important files are stored on a server so that employees can access the information they need from either location. The type of network Meredith's business is most likely using is a _____.
WAN
MAN
LAN
Answer:
MAN
Explanation:
brainliest?:(
Answer:
WAN (Wide Area Network)
List 2 or 3 visual aids that you might use during a speech on "Technology in the Classroom" (or a topic of your choosing) to illustrate your main points, and explain exactly how you plan to use them. (Site 1)
Answer:
Graphs or charts: I would use graphs or charts to illustrate the trend of technology usage in the classroom over time. For example, I could show a line graph that compares the percentage of classrooms that had no technology, limited technology, or full technology access in the past decade. This would allow the audience to see the increasing trend of technology adoption in the classroom and better understand the impact that technology is having on education.
Photos or videos: I would use photos or videos to provide concrete examples of how technology is being used in the classroom to enhance teaching and learning. For example, I could show a video of a teacher using a virtual reality headset to take her students on a virtual field trip to a museum, or I could show a series of photos of students using tablets or laptops to complete assignments and collaborate with their peers. These visual aids would help the audience to better understand the specific ways in which technology is being used in the classroom and how it is benefiting students and teachers.
Infographic: I would use an infographic to present a summary of the main points of my speech in a visually appealing and easy-to-understand format. The infographic could include bullet points or graphics that highlight the key benefits of technology in the classroom, such as increased engagement, improved learning outcomes, and enhanced collaboration. By presenting the information in this way, I could help the audience to quickly grasp the main points of my speech and better retain the information.
The user is able to input grades
and their weights, and calculates the overall final mark. The program should also output what you need to achieve on a specific assessment to achieve a desired overall mark. The program should be able to account for multiple courses as well. Lists are allowed.
Name of person
Number of courses
Course ID
Grades and Weights in various categories (Homework, Quiz, and Tests)
Enter grades until -1 is entered for each category
Final Grade before exam
Calculate to get a desired mark (using final exam)
Output all courses
Answer:
Here is an example of how you could write a program to perform the tasks described:
# Store the student's name and number of courses
name = input("Enter the student's name: ")
num_courses = int(input("Enter the number of courses: "))
# Create an empty list to store the course data
courses = []
# Loop through each course
for i in range(num_courses):
# Input the course ID and initialize the total grade to 0
course_id = input("Enter the course ID: ")
total_grade = 0
# Input the grades and weights for each category
print("Enter grades and weights for each category (enter -1 to finish)")
while True:
category = input("Enter the category (homework, quiz, test): ")
if category == "-1":
break
grade = int(input("Enter the grade: "))
weight = int(input("Enter the weight: "))
# Calculate the contribution of this category to the total grade
total_grade += grade * weight
# Store the course data in a dictionary and add it to the list
course_data = {
"id": course_id,
"grade": total_grade
}
courses.append(course_data)
# Input the final grade before the exam
final_grade_before_exam = int(input("Enter the final grade before the exam: "))
Needing some help with a code, any help would be appreciate for C++
Write a program that has the following functions:
- int* ShiftByOne(int[], int);
This function accepts an int array and the array’s size as arguments. The
function should shift all values by 1. So, the 1st element of the array should
be moved to the 2nd position, 2nd element to the 3rd position, and so on so
forth. Last item should be moved to the 1st position. The function should
modify the input array in place and return a pointer to the input array.
- Int* GetMax(int[], int);
This function accepts an int array and the array’s size as arguments. The
function should return the memory address of the maximum value found in
the array.
- unsigned int GetSize(char[]);
This function accepts a character array (C-String) and should return the size
of the array.
The program that has the following functions is given below:
The Program#include <algorithm>
int* ShiftByOne(int array[], int size) {
int temp = array[size - 1];
for (int i = size - 1; i > 0; i--) {
array[i] = array[i - 1];
}
array[0] = temp;
return array;
}
int* GetMax(int array[], int size) {
int max_val = *std::max_element(array, array + size);
return &max_val;
}
unsigned int GetSize(char str[]) {
unsigned int size = 0;
for (int i = 0; str[i] != '\0'; i++) {
size++;
}
return size;
}
Note: The function ShiftByOne() modifies the input array in place and return a pointer to the input array.
The function GetMax() returns the memory address of the maximum value found in the array.
The function GetSize() returns the size of the array.
Read more about programs here:
https://brainly.com/question/23275071
#SPJ1
1. Explain the benefits and drawbacks of using C++ and Visual Studio in a coding project.
2. Explain the benefits and drawbacks of using Java and Eclipse or Python and PyCharm in a coding project.
3. Describe the advantages of being able to code in multiple coding languages and compilers.
Answer:
1. The benefits of using C++ and Visual Studio in a coding project include the availability of a wide range of libraries and tools, the ability to create high-performance applications, and the ability to customize the code as needed. Drawbacks include the complexity of the language and the potential for memory leaks.
2. The benefits of using Java and Eclipse or Python and PyCharm in a coding project include the availability of a large number of libraries and tools, the ability to create high-level applications quickly, and the relative simplicity of the language. Drawbacks include the potential for code to become bloated and the lack of support for certain features.
3. The advantages of being able to code in multiple coding languages and compilers include the ability to use different languages and tools for different tasks, the ability to switch between languages quickly, and the ability to take advantage of the strengths of each language. Additionally, coding in multiple languages can help to increase one's overall coding knowledge and skills.
Explanation:
How to write a java program that asks the user for grades of students. Once the user enters 0 (zero), the program should print the largest of the marks of the students.
Answer:
import java.util.Scanner;
public class GradeProgram {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Please enter the student grades: ");
int grade = sc.nextInt();
int largestGrade = 0;
while (grade != 0) {
if (grade > largestGrade) {
largestGrade = grade;
}
grade = sc.nextInt();
}
System.out.println("The largest grade is: " + largestGrade);
}
}
Explanation:
What is one advantage that typing has compared to writing by hand?
•It can be done anywhere there's paper.
•Each person's typing has its own individual personality
•There's no special equipment needed.
•It's easier to make corrections.
Answer: Typing encourages verbatim notes without giving much thought to the information.
Answer: D its easier to correct mistakes
Explanation:
Write a Java program that have ten integral values into an array namely List. Your program
should have a menu to select/perform the following functions :-
lnsert ( ) - accept a value into the array if it's not full
Remove ( ) - remove a value from an array if it's not empty based on user selection
Search ( ) - Return the numbers of the particular search value
lncrease ( ) - lncrease the percentage of the store value based onto the input percentage
Update ( ) - Edit the existing value choose by user.
How many rows are in the SFrame?
Answer: It's not possible for me to know how many rows are in a specific SFrame without more information. The number of rows in an SFrame will depend on the data that it contains and how it was created.
Explanation: SFrame is a data structure for storing large amounts of data in a tabular format, similar to a spreadsheet or a SQL table. It was developed by the company Turi, which was later acquired by Apple. SFrames are designed to be efficient and scalable, and they can store data in a variety of formats, including numerical, categorical, and text data.
which function in the random library will generate a random integer within a range of specified by two parameters? the range is inclusive of the two parameters
Ran dint Python function is the function in the random library will generate a random integer within a range of specified by two parameters.
What is Ran dint Python function?With both inclusive parameters, the randint Python method returns an integer that was created at random from the provided range.
The randint() method provides a selected integer number from the given range. Note that randrange(start, stop+1) is an alias for this technique.
A value from a list or dictionary will be generated by the random command. And the randint command will choose an integer value at random from the provided list or dictionary.
Thus, Ran dint Python function.
For more information about Ran dint Python function, click here:
https://brainly.com/question/29823170
#SPJ1
Gigantic Life Insurance has 4000 users spread over five locations in North America. They have called you as a consultant to discuss different options for deploying Windows 10 to the desktops in their organization. They are concerned that users will be bringing their own mobile devices such as tablets and laptops to connect to their work data. This will improve productivity, but they are concerned with what control they have over the users' access to corporate data. How will Windows 10 help the company manage users who bring their own devices?
how to Design a registration page for a school called At school complex with html
Answer:
<!DOCTYPE html>
<html>
<head>
<title>At School Complex Registration</title>
<meta charset="utf-8">
</head>
<body>
<h1>At School Complex Registration</h1>
<form>
<label for="name">Name:</label><br>
<input type="text" id="name" name="name"><br>
<label for="email">Email:</label><br>
<input type="email" id="email" name="email"><br>
<label for="phone">Phone:</label><br>
<input type="phone" id="phone" name="phone"><br>
<label for="grade">Grade Level:</label><br>
<select id="grade" name="grade">
<option value="kindergarten">Kindergarten</option>
<option value="elementary">Elementary</option>
<option value="middle">Middle</option>
<option value="high">High</option>
</select>
<br>
<input type="checkbox" id="activities" name="activities">
<label for="activities">I am interested in after-school activities</label><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
To insert a new column to left of a specific column right click the header containing the columns letter and select
To insert a new column to the left of a specific column, right-click the header containing the column's letter and select simply right-click on any cell in a column, right-click and then click on Insert.
What is inserting columns?By doing so, the Insert dialog box will open, allowing you to choose "Entire Column." By doing this, a column would be added to the left of the column where the cell was selected.
Go to Home > Insert > Insert Sheet Columns or Delete Sheet Columns after selecting any cell in the column. You might also right-click the column's top and choose Insert or Delete.
Therefore, to insert a column, right-click the header containing the column's letter.
To learn more about inserting columns, refer to the link:
https://brainly.com/question/5054742
#SPJ1
If I wanted to share files only within my organization and limit my employees from sharing information with external people, what type of network should I set up in my office?
A) Internet
B) Peer-to-Point
C) Intranet
D) Extranet
Explain TWO examples of IT usages in business (e.g.: application or system) that YOU
have used before. Discuss your experience of using these system or applications. The
discussions have to be from YOUR own experience
Answer:
(DO NOT copy from other sources). Discuss these systems or applications which include of:
Introduction and background of the application or system. Support with a diagram, screenshots or illustration.
Explanation:
7. The expansion slot is located on the A. CPU B. DVD drive C. D. Hard disk Motherboard
Answer:
Motherboard
Explanation:
Start with a population of 500 organisms, a growth rate of 2, and a growth period to achieve this rate of 6 hours. Assuming that none of the organisms die, this would imply that this population would double in size every 6 hours. Thus, after allowing 6 hours for growth, we would have 1000 organisms, and after 12 hours, we would have 2000 organisms.
Write a program that takes these inputs and displays a prediction of the total population.
MY PROGRAM:
organisms=int(input("Enter the initial number of organisms:"))
growth=float(input("Enter the rate of growth [a real number > 1]:"))
numHours=int(input("Enter the number of hours to achieve the rate of growth:"))
totalHours=int(input("Enter the total hours of growth:"))
population = organisms
hours=1
while numHours < totalHours:
population *= growth
hours += numHours
if hours >= totalHours:
break
print(" The total population is ", population)
My program gives the correct answer for the original problems numbers, but when I run it through our test case checker it comes back as 3/4 correct.. the problem test case being [organisms 7, growth rate 7, growth period 7, total hours 7]... can't see where I'm going wrong...
Answer:
It looks like there are a few issues with your program.
First, the line hours += numHours should be hours += 1. This is because you want to increment the hours variable by 1 each time through the loop, not by the number of hours required to achieve the growth rate.
Second, you are only multiplying the population by the growth rate once per iteration of the loop, but you should be doing it every time hours is less than or equal to totalHours. You can fix this by moving the population *= growth line inside the loop's if statement, like this:
while numHours < totalHours:
if hours <= totalHours:
population *= growth
hours += 1
if hours >= totalHours:
break
Finally, you are using the variable numHours in your while loop condition, but it should be hours. You should change while numHours < totalHours: to while hours < totalHours:.
With these changes, your program should work correctly for the test case you provided. Here is the modified version of your program:
organisms=int(input("Enter the initial number of organisms:"))
growth=float(input("Enter the rate of growth [a real number > 1]:"))
numHours=int(input("Enter the number of hours to achieve the rate of growth:"))
totalHours=int(input("Enter the total hours of growth:"))
population = organisms
If you have a PC, identify some situations in which you can take advantage of its multitasking capabilities.
Situation one: using multiple monitors for tutorials on one screen and an application on another
Situation two: using virtual desktops for separating school and personal applications
Code to be written in python:
Correct code will automatically be awarded the brainliest
You had learnt how to create the Pascal Triangle using recursion.
def pascal(row, col):
if col == 1 or col == row:
return 1
else:
return pascal(row - 1, col) + pascal(row - 1, col - 1)
But there is a limitation on the number of recursive calls. The reason is that the running time for recursive Pascal Triangle is exponential. If the input is huge, your computer won't be able to handle. But we know values in previous rows and columns can be cached and reused. Now with the knowledge of Dynamic Programming, write a function faster_pascal(row, col). The function should take in an integer row and an integer col, and return the value in (row, col).
Note: row and col starts from 1.
Test Cases:
faster_pascal(3, 2) 2
faster_pascal(4, 3) 3
faster_pascal(100, 45) 27651812046361280818524266832
faster_pascal(500, 3) 124251
faster_pascal(1, 1) 1
def faster_pascal(row, col):
if (row == 0 or col == 0) or (row < col):
return 0
arr = [[0 for i in range(row+1)] for j in range(col+1)]
arr[0][0] = 1
for i in range(1, row+1):
for j in range(1, col+1):
if i == j or j == 0:
arr[i][j] = 1
else:
arr[i][j] = arr[i-1][j] + arr[i-1][j-1]
return arr[row][col]
Hey tell me more about your service. I have a school assignment 150 questions and answers on cyber security,how can I get it done?
Answer:
Explanation:
I have knowledge in a wide range of topics and I can help you with your school assignment by answering questions on cyber security.
However, I want to make sure that you understand that completing a 150 question assignment on cyber security can be time-consuming and it's also important that you understand the material well in order to do well on exams and to apply the knowledge in real-world situations.
It would be beneficial to you if you try to work on the assignment by yourself first, then use me as a resource to clarify any doubts or to check your answers. That way you'll have a deeper understanding of the material and the assignment will be more beneficial to you in the long run.
Please also note that it is important to always check with your teacher or professor to ensure that getting assistance from an AI model is in line with your school's academic policies.
Please let me know if there's anything specific you would like help with and I'll do my best to assist you.
Which computers were the first PCs with a GUI
MS-DOS
Linux
Windows
Mac
The earliest GUI-equipped PCs were Linux and Mac-based. These are the right answers to the question that was asked.
Which PCs had a graphical user interface (GUI) first?The first computer to employ a mouse, the desktop metaphor, and a graphical user interface (GUI), concepts Douglas Engelbart first introduced while at International, was the Xerox Alto, developed at Xerox PARC in 1973. It was the first instance of what is now known as a full-fledged personal computer.
When was the GUI added to Windows?Windows is based on what is known as a graphical user interface (GUI), which was created by Xerox in 1975 but was never used. The "window, icon, menu, and pointing device" (WIMP) combination will make up the majority of a typical GUI.
To learn more about GUI visit:
brainly.com/question/14758410
#SPJ1