1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Archy [21]
3 years ago
5

2.3 Code Practice: Question 1

Computers and Technology
1 answer:
Shtirlitz [24]3 years ago
7 0

Answer:

a=int(input("Enter a numerator: "))

b=int(input("Enter a divisor: "))

quotient=a/b

remainder=a%b

print("Quotient is: " + str(int(quotient)))

print("Remainder is: " + str(int(remainder)))

Explanation:

Hope this helps lovely :)

You might be interested in
write an application to presell a limited number of cinema tickets. each buyer can buy as many as 4 tickets. No more than 100 ti
Rus_ich [418]

Answer:

The program for this question can be given as:

Program:

import java.util.*;  //import package

public class TicketSeller  //define class

{

public static void main(String ar[])  //main method

{

int totalTickets=100,userCount=0,remainingTickets=100,numTickets; // varaibale

try           //try block

{

Scanner ob= new Scanner(System.in);  //input by user

System.out.println("Total Tickets:"+totalTickets);

while(remainingTickets!=0)          //loop

{

System.out.print("Enter no of Tickets to buy:");      //message.

numTickets=ob.nextInt(); //taking input

if(numTickets<=4)         //conditional statements.

{

if(remainingTickets>=numTickets)

{

remainingTickets=remainingTickets-numTickets;              //calculate remainingTickets

userCount++;

System.out.println("remaining tickets : "+remainingTickets+" user :"+userCount);      

}

else

{

System.out.println("Invalid Input");

}

}

else

{

System.out.println("Invalid Input");

}

}

}

catch(Exception e)            //catch block.

{

}

}

}

Output:

Total tickets:100

Enter no of Tickets to buy: 4

Remaining tickets : 96 User :1

Enter no of Tickets to buy: 4

Remaining tickets : 92 User :2

Enter no of Tickets to buy: 4

Remaining tickets : 88 User :3

.

.

.

Enter no of Tickets to buy: 4

Remaining tickets : 0 User :25

Explanation:

In the above Program firstly we import the package for the user input. Then we declare the class that is (TicketSeller) given in question. In this class we declare the main method in the main method we declare the variable that is totalTickets, userCount, remainingTickets and numTickets .Then we use the exception handling. we use this for providing the validation from the user side that users don't insert value less the 4. In the exception handling, we use the multiple catch block with try block. Then we input from the user and calculate the values and in the last, we print all the values.

8 0
2 years ago
When determining the amount of RAM necessary for a computer you wish to purchase, what should you consider?
Igoryamba

Answer:

"The type of the software which a user wants to use" is a consideration point for the amount of ram while purchasing the computer system.

Explanation:

  • The Ram is primary memory, which is used when the system is in on mode. When there is less amount of Ram, then the user of the computers can not able to run multiple programs or runs that type of program which consumes more memory.
  • And if there is a high amount of RAM memory, then the user can run multiple programs at the same time or can run that program which takes more memory.
  • So when any user wants to decide about the Ram, then he can by deciding the type of software, which he wants to use. How much that software can use the memory.
8 0
2 years ago
The beginning statement of a loop is called a declaration.<br> True<br> False
Ilya [14]
It is true the reason why it is true is
4 0
2 years ago
Read 2 more answers
HELP GENIUS Rank :))) DoNT answer If you don't know
RideAnS [48]

An instance in my life where I rendered services was when I worked in a grocery store.

The roles of entrepreneur include:

  • Allocating employees duties.
  • Improving standard of living.
  • Taking risks.

The three challenges that a young entrepreneur faces today include:

  • Financial instability.
  • Conflicts with education.
  • Lack of business skills.

The top three characteristics of an entrepreneur include:

  • Innovation.
  • Confidence
  • Risk taking

<h3>Who's an entrepreneur?</h3>

It should be noted that a entrepreneur is an individual who owns business and take risks.

The roles of entrepreneur include allocating employees duties, improving standard of living, and taking risks

Learn more about entrepreneur on:

brainly.com/question/353543

#SPJ1

3 0
7 months ago
Design and write a class that implements an ordered list type using a linked list, and a program that exercises and tests the cl
-Dominant- [34]

Answer:

A

Explanation:

7 0
2 years ago
Other questions:
  • What is the fundamental problem producers and consumers face?
    12·1 answer
  • Functions that are built-in into PHP to perform some standard operations.
    15·1 answer
  • A user is unable to install virtualization software on a Windows 8.1 computer. The user verified the host has sufficient RAM, pl
    6·1 answer
  • Solve the following equations and check your result 1) 3x=2x+18​
    5·2 answers
  • create a boolean variable called sucess that will be true if a number is between -10 and 10 inclusively python
    11·1 answer
  • What is the name given to a collection of related fields such as ID number,name and address?
    12·1 answer
  • Why is the most important factor for investors always the quality of the venture's leadership team
    12·1 answer
  • NAND is logically complete. Use only NAND gates to constructgate-level circuits that compute the
    7·1 answer
  • Write a method that takes a RegularPolygon as a parameter, sets its number of sides to a random integer between 10 and 20 inclus
    10·1 answer
  • When copper wires are bundled together, they are susceptible to ____________, a form of interference where the signals leak out
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!