Write a program in numpy to get the number of weekdays in the current month. Weekdays are working days except Saturday and Sunday
Q: Write a program that accepts a date in the form month/day/year and out- puts whether or not the date…
A: Algorithm: Check if the month, day, and year can be converted to ints Check if values are in…
Q: Write a program that finds a number positive or
A: We need to read in a number and call the function to check a number is positive or not.
Q: Write a program in kotlin to add two given numbers and print the results.
A: Required:- Write a program in kotlin to add two given numbers and print the results. approach:-…
Q: Write a program to read and print 6 temperatures for 6 days and find the average for these degrees…
A:
Q: Write a program in kotlin to find the factors of a given number and you can assume this number is…
A: Requirements:- Write a program in kotlin to find the factors of a given number and you can assume…
Q: Write a program that displays all the leap years, ten per line,from 2014 to 2114, separated by…
A: Since the Programming language is not mentioned in the question, we will answer this question in…
Q: Write a program that read N of number. Check if number 3 is existing in the numbers read?
A: Q1 python code : l = eval(input("Enter list: "))#enter the list n = int(input("Enter number to…
Q: Write a program that reads the price and the production date(month and year of an item) then prints…
A: import java.util.*;import java.io.*; public class Main{ public static void main(String[] args)throws…
Q: Write a program that accepts a number entered by the user and validates if it is odd oreven. If it…
A: Sample Response: #python3 program#accept a numbernum = int(input("Enter a number: "))#validate the…
Q: Write a program that will check and print if the person is a regular passenger, student or senior…
A: Program Code: #include<stdio.h>#include<conio.h>main(){ int ch,fare; printf("If you are…
Q: Write a program that computes and assesse the tuition fee of the students in one semester, based on…
A: Algorithm: 1. Start. 2. Read the tuition fee as tuition_fee. 3. Read payment mode (Press (1) - Cash,…
Q: Write a program that accepts age in months, calculate and print number of days for the entered age.…
A: #include <stdio.h> int main(){ int age; printf("\n Enter your age in months: ");…
Q: In this project you will write a program that will receive a date in the form of mm/dd/yyyy. The…
A: private static int determineDayOfWeek(String date) throws ParseException { String[] data =…
Q: Write a program which replaces all vowels with their corresponding numbers (e.g. a is 1, e is 2, i…
A: Algorithm : Step 1 : ask for the word from the user. Step 2 : declaring and initializing string…
Q: 9. Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of each…
A: Here let's define a function sumCube() to find sum of cube of digits.
Q: Write a program that sum up all prime numbers within the range of 0 and 1000.
A: Sample Response: #Python3 program to find teh sum of all prime numbers between 0 and 1000def…
Q: Write a program which reads two integer numbers from users and then display all prime numbers within…
A: According to the Question below the Complete Program: Program Output:
Q: 9. Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of each…
A: Since the programming language isn't mentioned, we will use the C language We will run a loop to…
Q: 3. Write a program that will calculate the exam grade of students by the formula,…
A: Code #include <stdio.h> int main(){ float…
Q: Write a program that calculates the amount of money a person would earn over a period of time if his…
A: here in given question ask for python program.
Q: Write a program to calculate the percentage of the given student in CBSE board exam his marks from…
A: here in this we have to write a program which take five input from user and find percentage
Q: Write a program to read two integers, then test if the two numbers are divisible by 5.6 at the same…
A: - The question wants us to write the code for the scenario that we are given two numbers a and b and…
Q: Write a program to read tow numbers each number consist of 2 digits and exchange the max digit in…
A: PROGRAM CODE: #include <iostream> // include header file for input output stream…
Q: Write a program which takes the user's age in years and convert it into months. 1 Year= 12 Months %D
A: Algorithm: Step1: Declare variables, Nofmonths & years to store values. Step2: Receive the user…
Q: Write a program that splits a 4-digits integer number into thousands, hundreds, tens, and ones. For…
A: Note: Answering the question in python as no language is specified. Input : Input the number.…
Q: Write a program that receives a number from a user and checks if it's float or integer. In case of…
A: First we declare the number variable, which gets input from the user. Also, we declare a variable…
Q: Write a Python program to read the salary for N employees. Your program should find and print :…
A: Given: Write a Python program to read the salary for N employees. Your program should find and print…
Q: Write a program that reads in a series of integer numbers, and determines how many positive odd…
A: Since the programming language is not mentioned, so we'll do it in python. The programming…
Q: Write a program that reads in two integers and determines and prints if the first is a multiple of…
A: Note: As no programming langauge is mentioned, therefore answering in python language. Input : Two…
Q: Write a program that reads in five integers and determines and prints the largest and the smallest…
A: Note: In this question, the coding language is not specified then we are doing this question in the…
Q: write a program that prints all multiples of 5 between 5 and 50 inclusive and then reads a number…
A: Since you have not mentioned any specific programming language, we will solve this question for you…
Q: Write a program that prints out first 40 numbers divisible by 3.
A: As you have not mentioned the programing language we are providing the program in Python language.
Q: Write a program that randomly generates an integer between 1and 12 and displays the English month…
A: We create a variable 'num' to store a random number created. We use a switch-case for each num…
Q: Write a numpy program to get the dates of today, yesterday, day before yesterday, tomorrow, day…
A: #importing numpyimport numpy #getting todays date using datetime64 function…
Q: Write a program which allocates the integers 1-8 to the squares in the figure above, subject to the…
A: The code for the given problem is written below in c++ programming language- #include…
Q: Write a program that reads text from the user and reverses the order of every number that appears in…
A: Solution:-- 1)The given question has required for the solution to be provided with the help of the…
Q: Write a program that reads an integer age of kids, finds the maximum of them, and counts its…
A: #include <iostream> using namespace std; int main(){ int…
Q: Write a program to read two integers, then test if the two numbers are divisible by (5,6) at the…
A: Write a program to input two numbers and check if both are divisible by 5 and 6 at the same time
Q: Write a program that accepts a number imput and checks if the difference between the sum of digits…
A: here we have written a program in c which accepts a Fibonacci number and check the difference…
Q: Write a program which calculate the date that 20 days after now then show the result.
A: C# DateTime.Now creates an instance of the current date. The AddDays method on DateTime will allow…
Q: Write a program that can be used to compute the average exam grade for multiple students. Each…
A: You have not specified any particular programming language so, I have provided a python code…
Q: Write a program that works out if a given year is a leap year
A: function leapYear_697(year) if year%4!=0, then not leap year if(year%4==0)…
Q: Write a program to read temperature in centigrade and determine whether it is Freezing weather or…
A: Flowchart:
Q: Write a program to read any Month Number in integer and display the number of days for this month
A: Use if else ladder to check condition for months. Syntax:- if(condition) statement else…
Q: Write a program that takes in an integer in the range 11-100 as input. The output is a countdown…
A: Program Explanation: Import the class for scanner Define a class for countdown Declare and define…
Q: Write a program in C++ Lang. to enter 30 random integer numbers. then print: 1- Even numbers. 2-…
A: Introduction of the Program: The C++ program takes 30 random numbers using the "rand()" function and…
Q: FRIDAY THE 13TH When will Friday the 13th occur in 1990? Write a program that will find all months…
A: Introduction of the Program: The C program takes a date for the year 1990 and every month of 13 and…
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- Transient PopulationPopulations are affected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population P The annual birth rate (as a percentage of the population expressed as a fraction in decimal form)B The annual death rate (as a percentage of the population expressed as a fraction in decimal form)D The average annual number of people who have arrived A The average annual number of people who have moved away M The number of years to display nYears Write a function that calculates the size of the population after a year. To calculate the new population after one year, this function should use the formulaN = P + BP - DP + A - Mwhere N is the…Implement programs involving the use of while, do..while and for loop statement. Objectives: Topics Covered: Implementing programs using loops. Description FRIDAY THE 13TH When will Friday the 13th occur in 1990? Write a program that will find all months in 1990 in which the 13th falls on a Friday. You need to know the following. 1. January 1, 1990 was on a Monday. 2. September, April, June, and November have thirty days, all the rest have 31 except for February which has 28 except in leap years when it has 29. 3. 1990 is not a leap year. Note: To make it fair for everyone, you may not use any built-in date functions from your computer language. Sample Output if Applicable Sample Run In 1990, Friday the 13th occurs in the months: APRILA supermarket is doing a sales promotion for soft drinks. If one day you buy soft drinks and bring the empty bottles the next day, they exchange each set of K empty bottles for a full one. A customer wants to make the most of this offer and therefore bought several bottles on the first day of the promotion. Now he wants to know how many bottles he will have at the end of the second day of the promotion if he use it to the fullest. Make a program to calculate this. Input The first input line contains integer T (1 ≤ T ≤ 10000), which indicates the number of test cases. In each of the following T lines come two integers N and K (1 ≤ K, N ≤ 10000), respectively the number of soft drinks bought and the number of empty bottles to gain a full. Output For each test case print the number of bottles that the customer will have on the second day, if he makes the most of the offer.
- Exercise III: Catalan numbers For n e N, denote by c, to be the number of ways to form a "mountain range" with n upstrokes (U) and n downstrokes (D) that all stay above a horizontal line. For instance: for n = 1, only UD is allowed, so c = 1; • for n = 2, only UUDD and UDUD are allowed, so c2 = 2. 1. Check that c3 = 5 by writing down or drawing all possible options. 2. Consider the power series +00 g(x) = 2 n=0 (by definition co = 1) called the generating function of the sequence (en). Justify that cn < 4" for each n, and deduce that the radius of convergence of g is at least 1/4. 3. It can be show that for r E (-1/4, 1/4), g(x) = 1+ xg(r)? and therefore 1- VI 4.x g(x) = 2.x Use this formula and the known power series of V1+ x to write the first terms of the power series expansion of g, in the form g(x) = co + c1x + c2x2 + C3x + c4x* + ·.. Show how you obtain a few terms, but you do not need to show all computations and you can use a calculator for fractions. Check that you recover co,…Problem 7: Guess the price of the car!? You will implement a variant of the number guessing game we played in lecture. In this variant, you will ask the user to guess the price of a $42,500 car. Let's assume that the player knows the price of the car is rounded to the nearest $500. If a player's guess is not exactly correct, your program will tell them they are either too high or too low. The player will get as many guesses as they need to guess the price of the $42,500 car. However they will only win the game if they used 5 or fewer guesses. Here are two examples of how the program should work for both cases: Guess the price and win the prize! Enter your guess:50000 Too high! Enter your guess:40000 Too low! Enter your guess:45000 Too high! Enter your guess:42500 You won the car! Guess the price and win the prize! Enter your guess:46000 Too high! Enter your guess:45000 Too high! Enter your guess:44000 Too high! Enter your guess:43000 Too high! Enter your guess:42000 Too low! Enter your…The following is list of 22 exam scores. Write program that calculate average of this scores and maximum score. Exam scores 64,51,97,70,65,87,100,79,85,17,71,75,48,79,98,53,77,57,83,69,78,98
- Write a program that reads from a student his/her name and his/her ID which is formed of 8 digits. The program should display the day of registration and the starting hour of registration according to the below tables. First 4 digits to the left Registration Day Monday Tuesday WEdnesday 2018 2019 2020 First digit to the right Registration IHour 4 6 10 7-8For C# (C Sharp): When an employee is hired they get a set starting salary. Every year the salary grows by 4%. In the 10th year of service an employee gets $15,000 bonus added to the current salary, but after that the salary will grow by 2% every year. Write a program fragment that takes number of years of service from a text box txtYears, and starting salary from txtStart, calculates salary for each year, and displays it in a list box IstSalary. Use data validation for the inputs to make sure they are numeric.in C# Sometimes figuring letter grades is hard. Write a program that asks for, and reads from the user, a midterm exam grade and a final exam grade. Compute the average of those two grades and ouput a letter grade based on the scale shown below. CHALLENGE PROBLEM: One of my graduate school classes modified the above calculation. This professor said that the final grade would be determined by the simple average of the midterm and the final, however, if the student scored better on the final than they did on the midterm, the professor would weight the midterm exam at 25%, and the final exam at 75% when computing the final grade. Modify your code to use this professors modification in determining letter grade. Here is the grading scale:
- Find the numbers that can be expressed as the product of two nonnegative integers insuccession and print them in increasing order. (For example, 30 is such a number as it can bewritten as the product of 5 and 6 (30=5x6), which are two numbers in succession.) The user shouldspecify a maximum value and the program should print all said numbers smaller than or equal tothat value. The program should keep a count of how many numbers were printed and shouldoutput that count, as well as the numbers. creat a git bash script for the problem aboveMost of the children in the kindergarten have been picked up by their parents, and there are only a few children left. The teacher has some candy in his hand, and now he wants to give the children a point, but he does not want the children to eat too much sugar. The teacher came up with the idea of adding 1 to the remainder of each child's age divided by 2. Enter: Number of children n(1<=n<=10) and age of n children Output: Total number of candies Sample input: 3 656 Example output: 4 | Try to write a program(C)Q2/ Complete the time expressions with for or since. half an hour a long time October last Tuesday a couple of weeks 2001 ten o'clock I was 14 three months