Write a program that reads the name, the gender (F/M) and age of the user and checks if he can go for military service or no. If the user is a male and age above 18 then he can go for military service otherwise no. Sample Run 1: Enter your name: Ahmad Enter your age: 19 Enter your gender: M Ahmad is 19 years old and can go military. Sample Run 2: Using java Enter your name: Rami Enter your age: 15 Enter your gender: M Rami is 15 years old and can not go military. Sample Run 3: Enter your name: Mona Enter your age: 16 Enter your gender: F Mona is 16 years old and can not go military. Sample Run 3: Enter your name: Nada Enter your age: 21 Enter your gender: F | Nada is 21 years old and can not go military.
Q: A square number is an integer number whose square root is also an integer. For example 1, 4, 81 are ...
A: The code is given below.
Q: To illustrate, what is the difference between sequential and random access devices?
A: 1) Sequential and Random access are two concepts have applications on both data files and data stora...
Q: What does address space imply in a memory block?
A: We are going to learn what is address space in a memory block.
Q: Why is it important to normalize features before clustering? Select one: a. Unnormalized features c...
A: Normalization is used for elimination of redundant data and it also ensures that good quality cluste...
Q: onsole application to print alphabets from a to z.
A: Given: Create a VB.NET Console application to print alphabets from a to z.
Q: Before sending it to the lecturer for review, I'd like to submit a PowerPoint presentation for doubl...
A: Introduction: Despite the fact that the American Psychological Association's guide does not include ...
Q: In what instances you should store your files in CD or DVD? Computer science
A: Introduction: In what instances you should store your files on CD or DVD? Information and documents ...
Q: How is contingency planning implemented?
A: How is contingency planning implemented?
Q: What exactly is a query?
A: Query Query means a request for data or information. These data or information will be retrieved fr...
Q: Based on your understanding of IRQ levels, do you feel that if you press a key on the keyboard while...
A: Introduction: An IRQ (interrupt request) value is a spot on the computer where it may anticipate a s...
Q: hy is it important for a computer scientist to understand networking
A: Lets see the solution.
Q: Discuss the importance of basic visual application in creating a calculator.
A: The answer is given below.
Q: Assume I have a highly sensitive non-confidential communication to transmit to a buddy, and my goal ...
A: Introduction: A digital signature, a mathematical technique used to validate the message's authent...
Q: What is a computer's structural definition?
A: The computer structure, in general, is divided into five main parts, which are as follows − Input d...
Q: In Java, please comment and comment with output please This programming assignment involves learn...
A: The below program is written in Java and complete code is provided below:
Q: hat steps are involved in creating a software function? Computer science
A: What steps are involved in creating a software function?
Q: What is the distinction between file structure and storage structure, and how should it be defined?
A: Storage structure is The memory that is allocated or assigned to a variable or a constant that is st...
Q: Short answer What is the use of Synchronization Cubicle in simulator? Computer science
A: Introduction: Tunneling works:- A tunnel is a system, or simply a channel or line, for the transfe...
Q: Why is networking expertise required of a computer scientist?
A: Computer science: A computer scientist has studied computer science, which is the study of the theor...
Q: What is the advantage of creating a structure within a structure?
A: advantages of creating a structure within a structure with one example given below
Q: 2. Use Armstrong's axioms to prove the union rule: Ifαβ and α Y, then α-βy.
A: 2. The union rule to be proved using Armstrong's axioms are : If α → β and α → γ, then α → βγ. The ...
Q: What are the three types of requirement in human-centred design?
A: Introduction: Design thinking is a process, mindset, and approach to solving complex problems. It i...
Q: It is critical to determine why graphics processing units are employed (GPUs).
A: Intro It is vital to establish the purposes for which graphics processing units are used (GPUs).
Q: How did cloud storage come to be?
A: Intro Cloud storage is a term utilized in software engineering to depict the spread of information ...
Q: Define the term learning agents and discuss the application of learning agents in education
A: Given: We have to discuss the term learning agents and discuss the application of learning agents ...
Q: What exactly is DBMS? Make a list of its benefits and drawbacks.
A: DBMS is abbreviated as a database management system. It is a series of programs that maintain the da...
Q: What does transaction serializability imply?
A: Basics SQL is an area explicit language utilized in programming and intended for overseeing inform...
Q: What is the difference between a subsystem and a logical subdivision, and why is it important?
A: Introduction: A storage unit divides its various logical volumes into groups to make setting easier....
Q: python code Given a Python list, remove all occurrence of 20 from the list.
A: Let's see the code below
Q: In a manufactory, the daily production is managed using an algorithm in which the basic operation ta...
A: Dear Student, Here we first need to find out the count of the basic operation in the algorithm Coun...
Q: The program has four steps: Read the size of an integer array, followed by the elements of the arra...
A: The code is given below.
Q: What are the three primary functions of database management?
A: A database management system is a software product that allows managing, manipulation, creation, ret...
Q: Use the python CSV module's csv.DictReader() approach to read the data from the file. Read the tab-s...
A: The programming language Scheme is multi-paradigm. It's a Lisp dialect that allows you to write in b...
Q: What exactly is a consistent database state, and how does it come about?
A: Solution A database constitutes a set of data relevant to some real-world aspect. For a certain miss...
Q: What is Linux used for, and how does it operate on mobile phones?
A: Introduction: Android is undeniably one of the most popular Linux-based technologies of all time, an...
Q: Design a PDA for Language L = {0"im2(n+m) | m,n>=0 }.
A:
Q: C++ I want to create a program that reads a text file, but when it reaches a string of words that i...
A: Answer: C++ Source Code: Line by Line: Method 1: #include <iostream>#include <fstream>#i...
Q: 1. On a balance scale, two spools and one thimble balance eight buttons. Also, one spool balances on...
A: Note:-As per rules, I am entitled to answer the first question only. 1. S=spools T=thimble B=buttons...
Q: Given a real number a and a nonnegative integer n, find a,using recursion a, = 2* a+a2, for n22 n-1 ...
A: Your python program is given below as you required with an output.
Q: Briefly describe the interface and implementation. How are the many components of designed software ...
A: Introduction: The interface is that part of a class that is accessible to the outside, namely what i...
Q: Briefly describe Dots per Inch technology.
A: Dot Per Inch is is the technology which is used to measure the sharpness and the resolution of the p...
Q: Consider a project and map it both without and with architecture included. What effect it will have ...
A: Intro The matching of strategic needs with architectural choices is specified by software architect...
Q: Consider two-dimensional vector data where the data items do not overlap. Is it possible to convert ...
A: Introduction: Raster data is represented by a regular grid of points. The x and y coordinates for ea...
Q: computer science - When a stalemate is found, those who are unable to go forward are given the requ...
A: Introduction: We must now recover from a stalemate that has been discovered. There are generally two...
Q: Code: #!/usr/bin/env python2.7 import sys def verify(submission): processed = [ ] if len(...
A: The code contains comment for understanding. Code: import sys def verify(submission): processed...
Q: In c++ how can i create a code which checks that the cost of certain items added together has exceed...
A: The answer to the following question:-
Q: Short answer Why and how should dynamic scoping be used? Computer science
A: INTRODUCTION: Dynamic scoping is a concept from programming languages rarely used in practice. The s...
Q: If the marks obtained by a student in 5 subjects are input through the keyboard, find out the aggreg...
A: /*If the marks obtained by a student in five different subjects are input through the keyboard,find ...
Q: Where is the supertype of the object stored?
A: Introduction: description, examples, and explanation of the supertype entity in the data model
Q: What exactly is a multidimensional array and how does it function?
A: Introduction: Rows and columns represent the two dimensions in a matrix. The row index and the colum...
Step by step
Solved in 3 steps with 4 images
- Write an application that asks a user to type an even number or the sentinel value 999 to stop. When the user types an even number, display the message “Good job!” and then ask for another input. When the user types an odd number, display an error message, "x is not an even number", and then ask for another input. When the user types the sentinel value 999, end the program. import java.util.*; public class EvenEntryLoop { public static void main (String args[]) { // Write your code here } }Write a Java program that asks the user to enter his age to test if he can participate in a race or not. The age should be greater than 18 and less than 45. If the user entered a correct number, the program will display "You can Join us!", otherwise it will display "Sorry, incorrect number!". Sample run l: Enter the age, it must be between 18 and 45 inclusive: 32 32: You can join us Sample run 2: Enter the age, it must be between 18 and 45 inclusive: 10 10: Sorry, incorrect number Sample run 3: Enter the age, it must be between 18 and 45 inclusive: 50 50: Sorry, incorrect numberWrite an Java application that determines whether a phrase entered by the user is a palindrome. A palindrome is a phrase that reads the same backward and forward without regarding capitalization or punctuation. For example, “Dot saw I was Tod”, “Was it a car or a cat I saw?”, and “Madam, I’m Adam” are palindromes. Display the appropriate feedback: You entered a palindrome or You did not enter a palindrome. import java.util.*; public class Palindrome { public static void main(String[] args) { // Write your code here } }
- Write a Java program that prompts the user to enter the grades and their weight of three Exams. The program calculates and displays the final grade. Hint: Use the following formula: [Grade of Exam 1]* [Weight of Exam 1]% + [Grade of Exam 2]* [Weight of Exam 2] % + [Grade of Exam 3] * [Weight of Exam 3]% Sample Run: Enter the grade of Exam I and its weight: 75 20 Enter the grade of Exam II and its weight: 60 30 Enter the grade of Exam III and its weight: 85 50 The final grade is 75.5In PyCharm, write a program that prompts the user for their name and age. Your program should then tell the user the year they were born. Here is a sample execution of the program with the user input in bold: What is your name? Amanda How old are you? 15 Hello Amanda! You were born in 2005 import datetimename = input("What is your name? ")age = int(input("How old are you? "))year = datetime.datetime.now().yearprint("Hello " +name + " you were born in "+str((year-age))) this is my code but it is only displaying in PyCharm "what is your name?" I feel something is wrongWrite a program that will calculate car insurance premium using Java!!! Steps to write a program: First things first, your program should ask customer to provide a name, so display a message: "Enter your name". Then ask user about ownership of US driver license. Display message: "Do you have a US driver license?". If user doesn't have a US driver license - display warning message: "Invalid data!" and stop the program (_use System.exit(0) after displaying warning message to stop the program_). Then ask user to provide a zip code. If zip code equals to 20910 or 20740, add $60 to the premium (an amount to be paid for an insurance policy). If zip code equals to 22102 or 22102 , add $30 to the premium. Otherwise add $50 to the premium. Then ask user about car ownership. Display message: "Is this vehicle Owned, Financed, or Leased?". If car is owned, add $10 to the premium, otherwise add $20 to the premium. Then ask user about car usage. Display message: **"How is this vehicle primarily…
- Java program At a certain university, students have to submit their exams online. The administration decides that for each minute of late submission, 5 points are deducted. Write a program that asks the user for his initial grade and the late submission time (in minutes), and then displays the final result. Sample Run 1: Enter your initial grade: 82 Enter the late submission time (in minutes): 6 Your final grade is 52 Sample Run 2: Enter your initial grade: 115 Grades should be between 0 and 100 Sample Run 3: Enter your initial grade: 43 Enter the late submission time (in minutes): 10 Your final grade is 0 Sample Run 4: Enter your initial grade: 72 Enter the late submission time (in minutes): -2 Time should be positiveIn Java program, this is the output of this program Enter MICHAEL JORDAN's grade in Physics101: 99Enter KOBE BRYANT's grade in Physics101: 90Enter LEBRON JAMES's grade in Physics101: 85 Enter MICHAEL JORDAN's grade in Algebra101: 90Enter KOBE BRYANT's grade in Algebra101: 85Enter LEBRON JAMES's grade in Algebra101: 99 Enter MICHAEL JORDAN's grade in Programming 2: 75Enter KOBE BRYANT's grade in Programming 2: 74Enter LEBRON JAMES's grade in Programming 2: 71 Which student would you like to check? [1] Michael Jordan [2] Kobe Bryant [3] Lebron James [0] Exit Student Name: Lebron JamesGrade Physics101: Algebra101: Programming 2:General Weighted Average: Passed:Create a JAVA program Write a program that reads total marks of 5 students and give their grades according to the following table. (Can we use switch?) Total mark Grade Equal or above 90 A Between 80 and less than 90 B Between 70 and less than 80 C Between 60 and less than 70 D Less than 60 F
- Write a program that prompts a student to enter a Java score. If thescore is greater or equal to 60, display “you pass the exam”; otherwise, display “youdon’t pass the exam”. Your program ends with input -1. Here is a sample run: Enter your score: 80 ↵EnterYou pass the exam.Enter your score: 59 ↵EnterYou don't pass the exam.Write an java application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average. import java.util.*; public class QuizScoreStatistics { public static void main (String args[]) { // Write your code here } }in Java Write a program that establishes two savings accounts with saver1 having account number10002 with an initial balance of $2,000, and saver2 having account 10003 with an initialbalance of $3,000. Set a common rate of interest at 5% per year. At the end of each month,update the balance by adding one month’s interest to the balance, so that the balancecompounds monthly. Print an output that displays the month number and the account numberand the balance for each of the two accounts. Use month 0 to display the initial balances, month1 to display the balances after the first month’s interest, and so on. At the end of the year,display the total balance for both accounts combined, like this:Output:Monthly balances for one year with 0.05 annual interest:Month Account # Balance Account # Balance----- --------- ------- --------- ------- 0 10002 2000.00 10003 3000.00 1 10002 2008.33 10003 3012.50 2 10002 2016.70 10003 3025.05 3 10002 2025.10 10003 3037.66 4 10002 2033.54 10003 3050.31 5…