Database level is the method for combining permissions from different database objects.
What is database?The types of access given to particular secureables are called permissions. Permissions are given to SQL Server logins and server roles at the server level. They are assigned to database users and database roles at the database level.The three sorts of permissions that files and directories can have are read, write, and execute: A file's or directory's contents can be viewed by someone having read permission. The contents of a file can be changed by someone with write rights, including by adding, removing, or modifying file contents.The right or permission to access a named object in the recommended way, such a table access authorization. A specific user's connection to the database may be permitted by privileges.To learn more about database refer to:
https://brainly.com/question/518894
#SPJ1
Database level is the method for combining permissions from different database objects.
What is database?Permissions are the many sorts of access that are granted to specific secureables. At the server level, permissions are assigned to SQL Server logins and server roles. At the database level, they are assigned to database users and database roles.Read, write, and execute are the three types of permissions that files and directories can have. Anyone with read permission can view the contents of a file or directory. Anyone with write access can edit, add, or remove data from a file, among other file-related operations.the capability or authorization to make a recommended access to a named object, like a table access authorization. Privileges may allow a specific user's connection to the database.To learn more about database refer to:
brainly.com/question/518894
#SPJ1
Meaning of learning application software, meaning of Achitertoral /Engineering application software , meaning of Entertainment application software
Computer software is referred as a programming code executed on a computer processor. It can be machine-level code or written code for an operating system.
Meaning of given terms:
Learning application software: It can help you in gaining new skills, provide you with proper instructions and even make you continuously learn in different criteria and subjects.
It makes the study more easy , quicker as well as provide continuous assessment to children.
It include Moodle, Blackboard learn etc
Architectural software : It can help in designing, visualizing various formats of given work. From planning homes, to mansions it can provide and turn vision into reality.
It includes AUTOCAD, Sketchup
Entertainment Software: It provides amusement and opportunities for leisure activities. It help in relaxing, enjoying and escaping from the different situations.
It includes Netflix, amazon and Kodi.
Therefore every term has been described.
To learn more about Software from the given link
https://brainly.com/question/24970491
#SPJ13
Consider this program on the picture attached:
(a) In what programming language is this program implemented?
(b) Why is this program correct? In other words, how does it work?
(c) In what way is the program poorly designed?
Match each benefit of participating in a professional network to the appropriate scenario.
1. building the professional network
2. preparing for interviews
3. upgrading knowledge
A. Miriam joins a group for employees of the company where she is interning.
B. Imelda reads about new technologies in the computer programming industry.
C. Rolf researches a company on a professional networking website.
Professional network Scenario
1 A
2 C
3 B
How to categorize professional networks with the scenario?
Scenario: A. Miriam joins a group of employees of the company where she is interning.
Professional network: 1. building the professional network
Scenario: C. Rolf researches a company on a professional networking website.
Professional network: 3. upgrading knowledge
Scenario: B. Imelda reads about new technologies in the computer programming industry.
Professional network: 2. preparing for interviews
Hence based on the appropriate scenario I have matched accordingly
To know more information on professional networks and related things, please follow the link below:
https://brainly.com/question/2083119
#SPJ1
Knowledge Review 3
Which of the following are characteristics of the core capabilities? (Select all that apply.)
The above three are the characteristics of core capabilities.
What is National Response Framework?
The National Response Framework (NRF) is a guide to how the nation responds to all types of disasters and emergencies.
What are the main components of the National Response Framework?
Response doctrine is comprised of five key principles:
engaged partnershiptiered responsescalable, flexible, and adaptable operational capabilitiesunity of effort through the unified commandreadiness to act.To know more about NRF:
https://brainly.com/question/13107467
#SPJ13
6.6 code practice question 2? 4 adjacent circles one
We have to create a program that draws an image of concentric circles with the help of canvas and frame using python.
Codding strucute of the given problem:
import simplegui
def draw_handler(canvas):
canvas.draw_circle((200, 130), 90, 5, "Green")
canvas.draw_circle((200, 130), 70, 5, "Green")
canvas.draw_circle((200, 130), 50, 5, "Green")
canvas.draw_circle((200, 130), 30, 5, "Green")
canvas.draw_circle((200, 130), 10, 5, "Green")
frame = simplegui.create_frame('Circle', 600, 600)
frame.set_canvas_background("White")
frame.set_draw_handler(draw_handler)
frame.start()
To know more about Python, visit: https://brainly.com/question/26497128
#SPJ1
Consider this program on the picture attached:
(a) In what programming language is this program implemented?
(b) Why is this program correct? In other words, how does it work?
(c) In what way is the program poorly designed?
Answer:
a) Javascript
b) The program works because it iterates through an array and logs each array element into the console
c) It is poorly designed because depending on the array element value, the program will have to wait that many milliseconds before it logs and move on to the next element. This isn't good because the program may take a long time to execute if the array contains elements with large values.
Can someone help me out with a code. Code's in python write a function that returns the longest common prefix of two strings. For example, the longest
common prefix of distance and disinfection is dis. The header of the method is:
def prefix(s1, s2)
If the two strings have no common prefix, the method returns an empty string.
Write a main function that prompts the user to enter two strings and displays their common
prefix.
here's what I have currently but its not working.
def longestCommonPrefix(self, arr):
arr.sort(reverse = False)
print(arr)
n= len(arr)
str1 = arr[0]
str2 = arr[n-1]
n1 = len(str1)
n2 = len(str2)
result = ""
j = 0
i = 0
while(i <= n1 - 1 and j <= n2 - 1):
if (str1[i] != str2[j]):
break
result += (str1[i])
i += 1
j += 1
return (result)
Just 10 lines of code.
from functools import reduce
list = []
def compare():
calc = [reduce(lambda a, b: a if a == b else None, x) for x in zip(*list)] + [None]
return list[0][:calc.index(None)]
list.append(input("Enter the first string: "))
list.append(input("Enter the second string: "))
print(compare())
When purchasing software or downloading music and games online, how can you make legal choices? Use details to support your answer.
When purchasing software or downloading music and games online, the ways that you make legal choices are to make sure that depending on the place you're downloading the music from. Make sure that the service has obtained permission to be distribution of the music and as such it's legal. Otherwise, it is said to be illegal.
Is it legal to download music for personal use?The majority of music and film content found on download or file-sharing websites is copyrighted. Downloading any copyrighted music or films is prohibited. A lawsuit for financial damages that might cost you hundreds or even thousands of dollars could be brought against you if you download or share a copyrighted song or movie.
Note that copyright statute guards that music, making it illegal to duplicate and distribute it without the consent of individuals who have an interest in it. In other words, if someone downloads a song without paying for it, they have probably engaged in copyright infringement.
Learn more about downloading music from
https://brainly.com/question/28358289
#SPJ1
Answer:
When purchasing software or downloading music and games online, the ways that you make legal choices are to make sure that depending on the place you're downloading the music from. Make sure that the service has obtained permission to be distribution of the music and as such it's legal. Otherwise, it is said to be illegal.
Explanation:
Networks can use protocols and apply them to (____) and (____) to allow information to be passed from one machine to another in a common format.
Networks can use protocols and apply them to (formatting) and (processing) to allow information to be passed from one machine to another in a common format.
What are protocols and why do we need them?A common language for computers would be network protocols. Although the software and hardware used by the computers in a network may be very dissimilar, the use of protocols allows them to communicate with one another.
Therefore, Data, network, transport, and application layers are just a few of the many protocols that make up the Transmission Control Protocol/Internet Protocol (TCP/IP) suite and thus, A protocol is a common set of guidelines for formatting and processing data in networking. Computers can talk to one another thanks to protocols.
Learn more about Networks from
https://brainly.com/question/1027666
#SPJ1
model sees communication occurring in five key parts
19. The
20
means the systematic application of scientific or other organized knowledge to practical task
21. The model that shows our communication is influenced by environmental, cultural and personal
factors
22. Shannon Weaver model was proposed in the year
23. Fourth generation computers used
24. Auto Gasoline pump is an example of a
25.
26.
27.
28.
29.
30. A server may run several
31. The first mechanical computer designed by Charles Babbage uses,
32.
33. The first generation of computer uses
34
computer
computer are mainly used in the fields of science and engineering
provides us with necessary diversion
available for educational purposes other than the teacher
are the means of communication
is when two persons communicate with each other.
controls educational technology in every way.
is the order in which the content should be taught for the best teaming within a grade?
is a distortion in a message which affects the flow of communication
refers to the facilities used for motion pictures, television, computer, sounds?
35.
36. Aristotle model proposed in the year
37. The first computer designed by Charles Babbage was called
38. Communication result in sharing of
and
39. A Supercomputer is the very
40.
41. A typical modern computer uses
42
and
is the operation of data per giving instruction
type of computer for processing data
chips
computer are used in scientific calculations, for nation defense and radar systems
43. The person who is responsible in the integration of technology in classroom instruction is-
44. A server run several
45. These are types in the classifications of the computer according to size, Except
46 Second generation computers used.
47.
48. The acronomy SNS stands for
is used to send individual or group messages
49. These are example of Barriers in communication, Except
50. Computer cannot do anything without a
PRI
∃
Identification where Information Technology is not present to support business processes
Identification where Information Technology is not present to support business processes is one that Lacking an IT implementation Plan.
What is the importance of information technology planning?The accomplishment of the organization's strategic goals and objectives can be helped by this planning.
Note that the strategic IT plan should include changes that will be required to the organization's information and communications infrastructure as well as the relevance of technology to each of the organization's strategic business goals.
Therefore, business process would find it difficult to run efficiently without fully functional computers and access to emails and data.
Learn more about business processes from
https://brainly.com/question/14476382
#SPJ1
Give some examples of when either breaking the rules or following the rules lead to greater good
Answer:
Sometimes breaking a rule can lead to a positive outcome, especially if the rule prevents the positive. But on the other hand, following the rules, can also lead to the greater good, if the rule doesn't prevent the good from happening.
Explanation:
You are starting a new data project. What is one of the best sources to help you begin? in excel
a, Technical Documentation
b, Queries
c, The database
d, Existing reports
Technical Documentation is one of the best sources to help you begin in excel. Thus, option A is correct.
What is excel?Excel is a software tool for creating and distributing spreadsheets, built by Microsoft.
Data analysts and some other customers could make that information simple to examine as content is loaded or altered by grouping items employing tools like Excel.
Technical documentation is a catch-all word for the various types of data produced to explain the performance, use, or construction of a given good, platform, or application.
Therefore, option A is the correct option.
Learn more about excel, here:
https://brainly.com/question/3441128
#SPJ1
4. Answer the following. a. Write the steps to create new presentation from Blank Presentation. How
Create new presentation from a Blank Presentation using PowerPoint by following these steps:
Launch PowerPoint.Select New from the left pane.Select an option:
Choose Blank Presentation to start from scratch when creating a presentation.Choose one of the templates to use a ready-made design.To see PowerPoint tips, click Take a Tour, and then click Create.With PowerPoint on your PC or on any device, you can:
Make a presentation from scratch or from a template.Text, images, art, and videos can all be added.Using PowerPoint Designer, choose a professional design.Include transitions, animations, and movement.Save your presentations to OneDrive so you can access them from your computer, tablet, or phone.Share and collaborate with others, no matter where they are.To learn more about powerpoint presentations, visit: https://brainly.com/question/23714390
#SPJ9
Sammy’s Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrella to tourists. Modify your Application as follows: Using Python
Modify the getinput() function that accepts the user information so that it prompts for a customer name, first name and last name. Store in two separate variables.
Add data validation to the account number so that only a 4 character string is allowed. The first character must be an A. You will need to use a while loop here because you do not know how many times the user will enter an invalid Account Number. You will have two conditions for the while loop: while the length of the account number variable does not equal 4 or while the account number variables does not start with the letter "A".
Add a phone number input to the getinput(). Make sure that the phone number is 7 digits. Use a while loop that keeps asking the user to enter the phone number until it is seven digits.
Return all values from the getinput() function -- there will be 5 of them.
Modify the main() function so that the line that calls the getinput() function stores all 5 returned values in separate variables.
Modify the main() function so that the values returned from the getinput() function are passed to the calculatefotal() function.
Modify the header of the calculatetotal() function so that is accepts 5 parameters ( the account number, the number of minutes, the first name, the last name , and the telephone number.
Modify the function that calculates the total and displays all the information, so that it displays the Contract Number, first and last names, and the Phone Number. The Phone Number should be displayed in the ###-#### format. You can the slice function to do this.
Includes comments at the top to identify file name, project and a brief description.
For further documentation, include comment for each section of code.
Sample Run:
ACCOUNT NUMBER:, A234 (program keeps prompting until a 4 character, starting with an A
Name Sally Douglass
123 – 4567 (formatted in the module that displays the result)
Minutes rented: 115
Whole hours rented: 1
Minutes remaining: 55
Rental cost: $ 80
Coupon good for 10% Off!
This is my original code base on the instruction how do I add the new code to the case
# Main function calls other functions
def main():
display()
a,x=getinput()
calculatetotal(x,a)
# function to display logo
def display():
#Display the Sammy’s logo
print("-------------------------------------------------------------")
print("+ +")
print("+ “SAMMY’S MAKES IT FUN IN THE SUN +")
print("+ +")
print("+ +")
print("-------------------------------------------------------------")
# function to receive input from user
def getinput():
# Request the minutes rented and store in variable
contract_number = (input("Enter the account number"))
rented_minutes = int(input("Enter the number of minutes it took to rent: "))
while (rented_minutes<60 or rented_minutes>7200):
rented_minutes = int(input("Try again"))
return rented_minutes,contract_number
# function to calculate hours, minutes remaining and cost
def calculatetotal(acc,mins):
# Calculate number of whole hours
whole_hours = mins//60
# Calculate the number of minutes remaining
remaining_min = mins % 60
# Calculate the cost as hours * 40 + minutes remaining times 1
#Calculation from smallest to greater by getting the smallest number
cost = whole_hours*40+ min(remaining_min*1, 40)
# >Display minutes, whole hours, minutes remaining, and cost with labels
# Print all values
print(("ACCOUNT NUMBER:"),acc)
print("Minutes Rented:",mins)
print("Whole Hours:",whole_hours)
print("Minutes Remaining:",remaining_min)
Answer:
figure it out
Explanation:
How do I do this coding project?
import java.util.*;
class prog
{
public useProperGrammar( String text)
{
int i;
char ch;
String p;
for(i=0;i<text.length();i++)
{
ch = text.charAt(i);
if(ch=='2')
{
p = text.replace('2','to');
}
}
System.out.println("Corrected text:" +p);
}
}
Please compile it before putting to use since I haven't done any compiling work.
Using the knowledge of the computational language in JAVA it is possible to write a code that write a functions that countain a string using the function signature.
Writting the code:import java.util.*;
class prog
{
public useProperGrammar( String text)
{
int i;
char ch;
String p;
for(i=0;i<text.length();i++)
{
ch = text.charAt(i);
if(ch=='2')
{
p = text.replace('2','to');
}
}
System.out.println("Corrected text:" +p);
}
}
See more about JAVA at brainly.com/question/18502436
#SPJ1
C++ Perform the task specified by each of the following statements:
a) Write the function header for function zero that takes a long integer array parameter bigIntegers and does not return a value.
b) Write the function prototype for the function in part (a).
c) Write the function header for the function add1AndSum that takes an integer array parameter oneTooSmall and returns an integer.
d) Write the function prototype for the function described in part (c).
Using the knowledge in computational language in C++ it is possible to write the code that write the function header for function zero that takes a long integer array parameter bigIntegers and does not return a value.
Writting the code:a) void zero (long bigIntegers[], int size) //function header
{
//Body of function
}
b) void zero (long [], int); //function prototype
c) int add1AndSum (int oneTooSmall[], int size)//function header
{
//Body of function
}
d) int add1AndSum (int [], int); //function prototype
See more about C++ at brainly.com/question/29225072
#SPJ1
*IN JAVA*
Write a program whose inputs are four integers, and whose outputs are the maximum and the minimum of the four values.
Ex: If the input is:
12 18 4 9
the output is:
Maximum is 18
Minimum is 4
The program must define and call the following two methods. Define a method named maxNumber that takes four integer parameters and returns an integer representing the maximum of the four integers. Define a method named minNumber that takes four integer parameters and returns an integer representing the minimum of the four integers.
public static int maxNumber(int num1, int num2, int num3, int num4)
public static int minNumber(int num1, int num2, int num3, int num4)
import java.util.Scanner;
public class LabProgram {
/* Define your method here */
public static void main(String[] args) {
/* Type your code here. */
}
}
The program whose inputs are four integers is illustrated:
#include <iostream>
using namespace std;
int MaxNumber(int a,int b,int c,int d){
int max=a;
if (b > max) {
max = b;}
if(c>max){
max=c;
}
if(d>max){
max=d;
}
return max;
}
int MinNumber(int a,int b,int c,int d){
int min=a;
if(b<min){
min=b;
}
if(c<min){
min=c;
}
if(d<min){
min=d;
}
return min;
}
int main(void){
int a,b,c,d;
cin>>a>>b>>c>>d;
cout<<"Maximum is "<<MaxNumber(a,b,c,d)<<endl;
cout<<"Minimum is "<<MinNumber(a,b,c,d)<<endl;
}
What is Java?Java is a general-purpose, category, object-oriented programming language with low implementation dependencies.
Java is a popular object-oriented programming language and software platform that powers billions of devices such as notebook computers, mobile devices, gaming consoles, medical devices, and many more. Java's rules and syntax are based on the C and C++ programming languages.
Learn more about program on:
https://brainly.com/question/26642771
#SPJ1
Which string method returns true if the character is an uppercase letter?
letter =input("Enter a letter: ")
Oisupper(letter)
Oletter.isUpper()
Oletter.isupper()
OisUpper(letter)
Answer:
Oletter.isupper()
Explanation:
isupper is all lowercase and it is a method that belongs to a string, so it is letter.isupper()
Answer: letter.isupper()
Explanation:
How many subnets and host per subnet are available from network 192.168.43.0 255.255.255.224?
It should be noted that the number of subnets and hosts available from network 192.168.43.0 255.255.255.224 is 8 and 32, respectively. Only 30 of the 32 hosts are generally functional.
What is a host in computer networking?A network host is a computer or other device that is connected to a computer network. A host can serve as a server, supplying network users and other hosts with information resources, services, and applications. Each host is given at least one network address.
A computer network is a group of computers that share resources on or provided by network nodes. To communicate with one another, computers use common communication protocols over digital links.
So, in respect to the above response, bear in mind that we may compute the total number of: by putting the information into an online IPv4 subnet calculator.
8 subnets; and30 hosts available for 192.168.43.0 (IP Address) and 255.255.255.224 (Subnet)
Learn more about hosts:
https://brainly.com/question/14258036
#SPJ1
What should be entered to make the loop below print
55
60
65
x = 50
while (x < 65):
x = x + ____
print (x)
What should be entered to make the loop below print the output 55, 60, 65 is "5". Hence the complete code is:
x = 50
while (x < 65):
x = x + 5
print (x)
What is a loop in coding?A loop is a set of instructions in computer programming that is repeatedly repeated until a given condition is met. Typically, a process is performed, such as retrieving and modifying data, and then a condition is verified, such as whether a counter has reached a predetermined number.
Loops are control structures that are used to repeat a segment of code a certain number of times or until a specific condition is fulfilled.
Learn more about loop:
https://brainly.com/question/14390367
#SPJ1
Why is the I/O subsystem called a subsystem?
The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.
What is an IO subsystem?The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.
Between input handlers and input devices (such as a keyboard, mouse, joystick, and so on), the Input subsystem serves as an abstraction layer. The input devices provide input events by capturing inputs from user activities or from external sources. For instance, pressing a key causes an input event.
The kernel, an I/O subsystem based on the hardware and device-driver infrastructure, offers a number of functions including scheduling, caching, spooling, device reservation, and error handling. Additionally, the I/O subsystem is in charge of safeguarding itself against rogue programmes and malevolent users.
To learn more about i/o sub system refer to:
https://brainly.com/question/4274507
#SPJ1
The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.
What is an IO subsystem?The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.Between input handlers and input devices (such as a keyboard, mouse, joystick, and so on), the Input subsystem serves as an abstraction layer. The input devices provide input events by capturing inputs from user activities or from external sources. For instance, pressing a key causes an input event.The kernel, an I/O subsystem based on the hardware and device-driver infrastructure, offers a number of functions including scheduling, caching, spooling, device reservation, and error handling. Additionally, the I/O subsystem is in charge of safeguarding itself against rogue programmers and malevolent users.To learn more about I/O subsystem refer to:
https://brainly.com/question/20331489
#SPJ1
Please help! AP CSP problem.
Answer:
a is the correct answer ok
which country did poker originate from?
Poque, a game that dates back to 1441 and that was supposedly invented in Strasbourg, seems to be the first early evidence of the French origin of the game. Poque in particular used a 52-card deck
France/French
You are reorganizing the drive on your computer. You move several files to a new folder located on the same partition. When you move the files to the new folder,
what happens to their permissions?
Businesses frequently use a VPN to provide remote workers with access to internal software and data or to establish a single shared network among numerous office locations.
What is a VPN, and why do businesses use them?An encrypted connection between user devices and one or more servers is established by a virtual private network (VPN), a service that provides Internet security. A VPN can safely link a user to the internal network of a business or to the Internet at large. Businesses frequently use a VPN to provide remote workers with access to internal software and data or to establish a single shared network among numerous office locations. The ultimate objective in both situations is to keep web traffic, especially traffic with proprietary data, off the public Internet.To Learn more about VPN refer to:
https://brainly.com/question/16632709
#SPJ9
Businesses frequently use a VPN to provide remote workers with access to internal software and data or to establish a single shared network among numerous office locations.
What is a VPN, and why do businesses use them?An encrypted connection between user devices and one or more servers is established by a virtual private network (VPN), a service that provides Internet security.A VPN can safely link a user to the internal network of a business or to the Internet at large.Businesses frequently use a VPN to provide remote workers with access to internal software and data or to establish a single shared network among numerous office locations. The ultimate objective in both situations is to keep web traffic, especially traffic with proprietary data, off the public Internet.To Learn more about VPN refer to:
brainly.com/question/16632709
#SPJ9
how do you think the internet and social media will impact global communities in the next five years?
I do think that the internet and social media will impact global communities in the next five years as it will bring about huge growth in the nations economy and also more improvement in the healthcare system.
What is social media, and how does it affect the neighborhood?In actuality, social media can be advantageous for society. People may connect and their relationships may become deeper as a result. Student learning and development are also encouraged by social media. Additionally, it can help firms grow their clientele and increase their revenue.
Therefore, Future communication will be based on the framework established by what is currently referred to as social media, but it will look very different. By 2033, the amount of data that will be accessible to everyone as well as its ability to influence decisions will have undergone the most significant change.
Learn more about social media from
https://brainly.com/question/3653791
#SPJ1
Which of the following is the outline of all the stages games go through when
being developed?
(1 point)
production cycle
design cycle
scientific method
alpha stages
Product Cycle is all the stages games go through when being developed.
What's product cycle?
The product cycle is the period of time from the morning of processing to the finished product during which stocks( raw accoutrements , accoutrements ,semi-finished corridor, and finished factors) live in the manufacturing process. It takes up some of the manufacturing time and comprises of processing and halting phases.
Product cycle for developing a game :
Stage 1 of the game development process :
Although each step in the game development process is important, the original planning cycle has a direct impact on all posterior cycles. It's critical to begin the process of creating a computer game by gathering details about the willed end product, similar as technological specifications.
Stage 2 The product :
The product stage, which is broken down into multiple internal stages, is the stage that takes the longest and requires the topmost labor.
Stage 3 Quality control :
A game of any complexity needs to be tested to insure that it's error-free and bug-free. This is due to the fact that a single issue can have a negative impact on both the stoner experience and the overall enjoyment of a game. As a result, functional,non-functional, and beta testing are constantly carried out.
Stage 4 Launch :
The final stage of game product is the product debut, which is largely anticipated by all. But the story does not end with launch. Indeed after a game is finished, there are generally still enough bugs and faults, thus the game development platoon keeps adding new features and perfecting the game coincidently with its release. At the same time, testers gather the first stoner feedback to help inventors make significant adaptations.
Stage 5 Post-production :
Fixes and upgrades need to be continually covered after a game is released on the request to insure that it's stable and performing as intended. Studios should immaculately release updates constantly to cleave to the evolving specialized specifications of platforms.
Learn more about production cycle of game developement click here:
https://brainly.com/question/26006886
#SPJ1
Python programming using def function
Give the user a math quiz where they have
to subtract 2-digit integers. Present them
like this: 67 - 55.
Each time, tell the user whether they are
correct or incorrect. Continue presenting
problems to them until they enter a zero to
quit. At the end print the number right,
the number wrong, and the percent right.
Explanation:
For this program we'll need to know a couple concepts which are: while loops, user input, variables, converting strings to integers, and basic arithmetic operators, if statements, and the random module.
So let's first just declare the basic function, we can call this "main", or something a bit more descriptive, but for now I'll name it "main".
def main():
# code will go here
main()
so now from here, we want to initialize some variables. We need to somehow keep track of how many they get correct and how many they've answered.
These two numbers may be the same, but at times they will be different from each other, so we'll need two variables. Let's just call the variable tracking how much have been answered as "answered" and the variable tracking how much are correct as "correct".
These two will initially be zero, since the user hasn't answered any questions or gotten any correct. So now we have the following code
def main():
correct = 0
answered = 0
main()
Now let's use a while loop, which we break out of, once the user inputs zero. This may be a bit tricky if we use a condition since we'll have to ask for input before, so let's just use a while True loop, and then use an if statement to break out of it at the end of the loop.
Now we want to generate two numbers so we can use the random module. To access the functions from the random module you use the import statement which will look like this "import random". Now that you have access to these functions, we can use the randint function which generates random numbers between the two parameters you give it (including those end points). It says two digits, so let's use the endpoints 10 and 98, and I'll explain later why I'm limiting it to 98 and not 99.
The reason we want to limit it to 98 and not 99, is because it's possible for the two randomly generated numbers to be equal to each other, so the answer would be zero. This is a problem because the zero is used to quit the program. So what we can do in this case, is add one to one of the numbers, so they're no longer equal, but if they're equal to 99, then now we have a three digit number.
Now onto the user input for simplicitly, let's assume they enter valid input, all we have to do is store that input in a variable and convert it into an integer. We can immediately convert the input into an integer by surrounding the input by the int to convert it.
we of course want to display them the equation, and we can either do this through string concatenation or f-strings, but f-strings are a bit more easier to read.
So let's code this up:
import random
def main():
correct = 0
answered = 0
while True:
num1 = random.randint(10, 98)
num2 = random.randint(10, 98)
if num1 == num2:
num2 += 1
userInput = int(input(f"{num1} - {num2}"))
main()
from here we first need to check if they entered zero and if so, break out of the loop. If they didn't enter zero, check if the userInput is equal to the actual answer and if it is, then add one to correct and finally add one to answered regardless of whether their answer is correct or not.
Outside the loop to display how much they got correct we can use an f-string just like we did previously. Since sometimes we'll get a non-terminating decimal, we can use the round function so it rounds to the nearest hundreth.
So let's code this up:
import random
def main():
correct = 0
answered = 0
while True:
num1 = random.randint(10, 98)
num2 = random.randint(10, 98)
if num1 == num2: # the answer would be zero
num2 += 1 # makes sure the answer isn't zero
userInput = int(input(f"{num1} - {num2}"))
if userInput == 0: # first check if they want to stop
break
if userInput == (num1 - num2):
correct += 1
answered += 1
print(f"Correct: {correct}\nIncorrect: {answered - correct}\nPercent: {round(correct/answered, 2)}")
main()
and that should pretty much be it. The last line is just some formatting so it looks a bit better when displaying.
This is related to coding. I just have no idea how to do this coding project.
class brainly
{
public String repeatString(String str, int n)
{
for(n=1;n<=3;n++)
{
System.out.print(str);
}
}
}
Using the knowledge of the computational language in JAVA it is possible to write a code that write a method that takes a string and a int and return to the string.
Writting the code:public String repeatString(String str, int n)
{
String text = "";
for (int i = 0; i < n; i++)
{
text = text + str;
}
return text;
}
See more about JAVA at brainly.com/question/18502436
#SPJ1