Def transfer(bank, log_in, usera, userb, amount): ''' in this function, you will try to make a transfer between two user accounts. bank is a dictionary where the key is the username and the value is the user's account balance. log_in is a dictionary where the key is the username and the value is the user's log-in status. amount is the amount to be transferred between user accounts (usera and userb). amount is always positive. what you will do: - deduct the given amount from usera and add it to userb, which makes a transfer. - you should consider some following cases: - usera must be in the bank and his/her log-in status in log_in must be true. - userb must be in log_in, regardless of log-in status. userb can be absent in the bank. - no user can have a negative amount in their account. he/she must have a positive or zero balance. return true if a transfer is made. for example:

Answers

Answer 1

Using the knowledge in computational language in python this code will be described for bank is a dictionary where the key is the username and the value is the user's account balance.

Writing code in python:

def transfer (bank, log_in, userA, userB, amount):

if userA in bank and log_in[userA]:

 if userB in log_in:

   if amount <= bank [userA]:

     bank [userA] -= amount

     bank[userB] += amount

     return true

 return false

 bank= {"Bradon": 115.5, "Patrick": 18.9, "Sarah": 827.43, "Jack": 45.0, "James": 128.87}

 log_in= {"Bradon": False, "Jack": False, "James": False, "Sarah": False}

 transfer(bank, log_in, "Bradon", "Jack", 100)

See more about python at brainly.com/question/18502436

#SPJ1

Def Transfer(bank, Log_in, Usera, Userb, Amount): ''' In This Function, You Will Try To Make A Transfer

Related Questions

What will be the output, if any, when the user clicks the right mouse button?

from tkinter import
def clicked(event):
print("That hurt.")
widget = Button(None, text='Button')
widget.pack()
widget.bind('', clicked)
widget.mainloop()

O an error statement
O That hurt.
O no output
O Button

Answers

The output, if any, when the user clicks the right mouse button is (b) That hurt

How to determine the output?

The flow of the program implies that:

When the user clicks the button, the program prints "That hurt" without the quotes.

This action is on the third line of the program

Hence, the output, if any, when the user clicks the right mouse button is (b) That hurt

Read more about programs at:

https://brainly.com/question/16397886

#SPJ1

Where should the VPN concentrator be installed?

On the cloud
Outside of the network
On the network edge using a firewall
On the network edge without a firewall

Answers

c, using a firewall make sures no viruses enter your device while setting up the vpn

Answer:

or this?

Explanation:

the vpn is this it?

Consider the following method: public int mystery(int n) { if(n > 6) { return 1 mystery(n - 1); } return n % 3; } What is the value of mystery(10)

Answers

Answer:

Ans1--- The output is 9 Explanation--- mystery(5)=mystery(4)+2 mystery(4)=mystery(3)+2 mystery(3)=mystery(2)+2 mystery(2)=2+1=3

Write a Java expression that converts the value of 'y' into an integer, and assigns the value to 'x'.

Answers

[tex]\huge{\purple{\underline{\underline{\mathfrak{\red{\bigstar answer:: \bigstar}}}}}}[/tex]

int y = (int) y;

int x = y;

Hope it helps..♪

Summary on how drones can help manage the environment

Answers

Answer:

Well, I do know that they can help water plants they can also use sprays and other things that help the environment.

Explanation:

I learned this in my PLTW.

Pls help me po:{

I need the answer lang po talaga , pls:{

Answers

Answer:

for cutting it's scissors for measuring it's the tiny measurement spoonlikes for mixing it's the blender and preparatory

What type of websites, which let users share personal stories and photos, became popular in the 2000s?.

Answers

Answer:

MMORPGS was a type of website that let users share their stories and pics across the world wide web

Explanation:

how does a paper prototype minimize constraints when compared to a digital one

Answers

A regular prototype minimizes constraints if compared to a paper one because possible problems in use can be identified easily.

What is a prototype?

This refers to the initial model of a product designed to test the features of the model before it is released to the market.

What are the differences between digital and paper prototypes?

Online protoypes are often time-saving, however, because some features of the prototype cannot be tested, a regular protoype is much better to identify possible problems in design or use.

Learn more about prototipes in: brainly.com/question/4622383

#SPJ1

Complete the following sentences using each of the words provided ONCE only. KEYBOARD DESKTOP STORE PRINTER COMPUTER MOUSE MONITOR CD Bay PRINTER TOWER CASE CENTRAL PROCESSINGENIT is an electronic device that retrieves, and processes shows you what is going on in the computer. is the first image you see on your screen when the computer is is used for telling the computer what to do. is used for typing documents. is used for putting documents on paper. you can insert a CD or Compact Disc. is is box inside and shaped 1) A 2) The 3) The data. switched on. 4) The 5) The 6) The 7) In the 8) The it​

Answers

Answer:

Explanation:

Monitor is an electronic device that retrieves, and processes shows you what is going on in the computer.

Desktop is the first image you see on your screen when the computer is is used for telling the computer what to do.

keyboard

is used for typing documents. Printer is used for putting documents on paper. CD Bay you can insert a CD or Compact Disc. is is box inside and shaped

Declaring a member as ____ in the base class provides access to that member in the derived classes but not to anyone else. a. public b. protected c. private d. constant

Answers

When a member is declared as b. protected in the base class, it provides access to that member in the derived classes but not to anyone else.

What is a derived class?

A derived class can be defined as a type of class that inherits the information or members of a base (parent) class such as a car in a syntax.

Basically, a public class is accessible to everybody while a private class can only be accessed by users within the declared class. Also, a constant is a class whose value remains unchanged.

In Computer programming, when a member is declared as protected in the base class, it ultimately provides access to that member only in the derived classes but not to other members or anyone else.

Read more on data types here: brainly.com/question/20264183

#SPJ1

Convert the folllowing binary number to decimal:00101

Answers

Answer:

5

Explanation:

Each digit in binary is worth double the amount compared to the number to the right of it. This means the rightmost number is 1, the second rightmost is 2, the third rightmost is 4, and so on.

If a digit has a 1 in the place, you add however much it is worth to the decimal count.

For example, this number has a 1 in the third rightmost. The third place here means a 4, so we add 4 to the count. It also has a 1 in the rightmost place, so we add 1 to the count.

Any digit with 0 is simply there to hold the place and can be ignored.

A bit confusing but hopefully you understand


Which statement best describes one reason why assembly language is easier
to use than machine language?

Answers

Answer:

machine language uses binary code and assembly language uses mnemonic codes to write a program.

Explanation:

In a nutshell, machine language uses binary code, which is almost impossible for humans to decipher, whereas assembly language uses mnemonic codes to write a program. Mnemonic codes make it simpler for humans to understand or remember something, and so make the language a bit easier for humans to use than machine code.

Which of the following choices is evidence that present-day vertebrates shared common ancestors?
They all have hearts and feet.

They display similar embryo development and share common genes that control development.

They have many bone structures that are unique to each species.

They all thrive in a single
ecosystem.

Answers

Answer:

B/Second

Explanation:

They display similar embryo development and share common genes that control development.

2
select the correct answer.
which part connects the cpu to the other internal parts of a computer?
o a.
alu
ob.
bus
o c.
control unit
od.
memory unit
oe.
register

Answers

Answer:

the control center

Explanation:

hope this helps :)

please make me brainliest\

What are three key components of effective computer games?
A. An obstacle or enemy that makes the game challenging
B. A continuously updating point score
C. A set of rules that is fair and transparent
D. A goal that you must reach or achieve to "win"
SUBMIT

Answers

The key components of effective computer games are:

An obstacle or enemy that makes the game challenging A set of rules that is fair and transparent. A goal that you must reach or achieve to "win"

What is computer game?

A computer games is known to be a game that a person often plays through the use of a computer and it is called a video game.

Note therefore, that The key components of effective computer games are:

An obstacle or enemy that makes the game challenging A set of rules that is fair and transparent. A goal that you must reach or achieve to "win"

Learn more about computer games  from

https://brainly.com/question/16104941

#SPJ1

Assume x represents an integer number, what is the highest index value in the following array? byte[] values = new byte[x]; Group of answer choices

Answers

Answer:

You forgot to add a group of choices, however assuming this programming language uses 0-based indexes the answer would be x - 1

Explanation:

Zero based index languages have array indexes starting at 0. When you create that array, you use x to define the amount of elements, however due to the array starting at the index 0, the arrays highest index would be x - 1 instead of x.

To write, test and run your JavaScript code, you need ..................

Answers

ANSWER:

To write a JavaScript code, you need a web browser and either a text editor or an HTML editor.

If you accidently looked up a link, and the same link keeps popping up everywhere, how do you stop it? On a phone.​

Answers

Answer:

u go to your settings and stop notification

Answer:

On your Android phone or tablet, open the Chrome app Chrome · Go to a webpage. · To the right of the address bar, tap More More and then · Tap Site settings.

3. What of the following is the main components of computer system?
a. CPU, Input unit, Output Unit, Memory Unit
b. CPU, Memory, System bus, Input, Output, Pen drive
c. Modem, Keyboard, Word Processor, Printer, Screen
d. Memory, Video Card, Monitor, Software, Hardware.

Answers

Answer:

CPU, input unit, Output unit, memory unit

It’s A. CPU, input unit, output unit, memory unit.

Which option identifies the programming paradigm selected in thr following scenario? A student is writing a science fiction story that deals with artificial intelligence. He wants to be realistic. He decides to add computer terms to the story that pertain to his storyline.

A. Java
B. Python
C. Perl
D. Ruby

Answers

Answer:

java

Explanation:

Java es rápido, seguro y fiable. Desde ordenadores portátiles hasta centros de datos, desde consolas para juegos hasta computadoras avanzadas, desde teléfonos móviles hasta Internet, Java está en todas partes. Si es ejecutado en una plataforma no tiene que ser recompilado para correr en otra. Java es, a partir de 2012, uno de los lenguajes de programación más populares en uso, particularmente para aplicaciones de cliente-servidor de web

Write a recursive, string-valued method, reverse, that accepts a string and returns a new string consisting of the original string in reverse. For example, calling reverse with the string goodbye returns the string eybdoog.Reversing a string involves:

Answers

The program is an illustration of recursive functions in Python;

Recursive functions are functions executed from within itself

The python program

The program written in python, where comments are used to explain each action is as follows:

#This defines the function

def revStr(myStr):

   #This returns an empty string if the string is empty

   if myStr == "":

       return myStr

   #If otherwise, this returns the reversed string recursively

   else:

       return revStr(myStr[1:]) + myStr[0]

Read more about python recursions at:

https://brainly.com/question/19089783

#SPJ1


in which part of the scratch interface does a programmer combine code blocks to build the program?

a. sprite info pane
b. block palette
c. stage
d. scripts area

Answers

Answer:

D

Explanation:

The sprite info pane is for an overview over your sprites and their visibility, coordinates, etc.

The block palette is where you select blocks from.

The stage is where your figures move and do stuff.

The scripts area is where you combine blocks from the palette together.

There are numerous strict and steadfast rules when it comes to composition.

answers:
true
false

Answers

Answer:

false

Explanation:

none ¯\_(ツ)_/¯

Please help quick!! 20 points

a table is a ___ of rows and columns that provides a structure for presenting data.

Answers

Answer:

vertical and horizontal

Java Write a program that reads a person's first and last names separated by a space, assuming the first and last names are both single words. Then the program outputs last name, first name. End with newline. Example output if the input is: Maya Jones Jones, Maya

Answers

Java Write a program that reads a person's first and last names separated by a space, assuming the first and last names are both single words are CODE- //SpaceReplace.java import java. util.Scanner.

What is Java?

Developers use Java to assemble packages in laptops, information centers, recreation consoles, clinical supercomputers, molecular phones, and different devices. Java is the world's 0.33 maximum famous programming language, after Python and C – consistent with the TIOBE index, which evaluates programming language popularity.

CODE-//SpaceReplace.java import java.util.Scanner;public elegance SpaceReplace }.Maya Jones Jones, Maya Program completed with go out code zero Press ENTER to go out console. <CODE-//QuitScreen.java import java.util.Scanner;//Create a category QuitScreen.Public elegance Quit Screen the principle function public static void main(String[] args)in step with the letter to quit and the //numPresses.System.out.println("Press the "+letterToQuit+" key "+numPresses+" instances to quit.");   //Return, return;  }//End of the primary function.}//End of the elegance QuitScreen.

Read more about the Java :

https://brainly.com/question/25458754

#SPJ1

Answer:

import java.util.Scanner;

public class SpaceReplace {

  public static void main(String[] args) {

     Scanner scnr = new Scanner(System.in);

     String firstName;

     String lastName;

     firstName = scnr.next();

     lastName = scnr.next();

     

     System.out.println(lastName + ", " + firstName);

  }

}

Explanation:

Differentiate between types of JavaScript object. Grade 9

Answers

Answer:

Object.

Date.

Array.

String.

Number.

Boolean

The destination transmission control protocol (TCP) process has set a 1,000-byte receive buffer window. The source TCP sequence number starts at 23,100 and sends the following segments, in order: Segment 1-200 bytes; Segment 2-300 bytes; Segment 3-200 bytes; and Segment 4-300 bytes. The last acknowledgment the source received was sequence number 23,600 saying the receive buffer can now hold 800-300 byte streams. The retransmission timer for sequence number 23,600 has expired, so what will the source TCP do next

Answers

Because the retransmission timer for sequence number 23,600 has expired, the source TCP will trigger a process that resends segments 3 and 4.

What is TCP/IP?

A term in Computer Networking Protocol, it stands for Transmission Control Protocol/Internet Protocol.

It serves the function of indicating how data is transported over the internet by ensuring that there is communication from end to end.

This end-to-end communication process is able to spot how such data can be sectionalized into packets, addressed, routed, transmitted and how it is received when it gets to the terminal point.

Learn more about TCP at:
https://brainly.com/question/17387945
#SPJ1

Color, font, and images are all important aspects of good ________.
A. contrast
B. coordination
C. design
D. planning

Answers

Color, font, and images are all important aspects of good  design. Check more about design below.

What is the Principles of Design?

A Good design is one that has to have a good understanding of how design works.

Note that the color, contrast and others are very important part of creating good designs and as such, Color, font, and images are all important aspects of good  design.

Learn more about Color from

https://brainly.com/question/911645

#SPJ1

Human interest stories usually focus on:

OA. celebrities and politicians.

OB. a worldwide catastrophic event.

OC. animals in danger.

D. people's triumphs and struggles.

Answers

The human interest stories are found to be made focused on the people's triumphs and struggles. Thus, option D is correct.

What are stories?

Stories are the given as the part of the narrative tale comprising the events and the experiences presented with the sequence of words. The  stories can be fictional and nonfictional.

The humans found the stories that are related to the struggles and have the connections with the people's triumphs to be more focused. Thus, option D is correct.

Learn more about the stories, here:

https://brainly.com/question/11300469

#SPJ1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

Write a program that draws an 8 8 chess board, with alternating gray and white squares. You can use the SetTextColor and Gotoxy procedures from the Irvine32 library

Answers

Using the knowledge in computational language in C code it is possible to write a customized chess code.

Writting the C code as:

Wait      PROTO

Write     PROTO

CrLf          PROTO

Delay         PROTO

Clrscr        PROTO

PROTO times:byte, color:dword

PROTO times:byte, color:dword

ROTO color:dword

PROTO color:dword

UpdateColor   PROTO

See more about C code at brainly.com/question/15301012

#SPJ1

Other Questions
Use the listing method to represent the following set. {x | x I, x 3}....,0,1,2,34,5,6,7...3,4,5,6.... In 1950, approximately how many U.S. households owned a television? a. The american government has set a standard for advancing the cause of human rights since the end of the cold war. what difficulty does the united states face in the future as it seeks to secure human rights in a global community? Discuss criticisms of separation of powers Julia is in charge of buying clothing in bulk for a sporting goods store. The table shows the unit prices of the items she intends to buy.Unit Prices of Clothing Items for a Sporting Goods StoreItemUnit PriceT-shirts$7.50Shorts$9.00Windbreakers$12.25If she will buy 35 T-shirts, 45 pairs of shorts, and 25 windbreakers, what will be her total cost?$958.75$973.75$1,021.25$1,038.75 A) all values at which h has a local maximum B ) all local maximum values of h Base your answer to question 31 on both documents 1 and 2 and on your knowledge of social studies. cause - refers to something that contributes to the occurence of an event, the rise of an idea, or the bringing about of a development. effect refers to what happens as a consequence (result, impact, outcome) of an event, an idea, or a development. 31. identify and explain a cause-and-effect relationship associated with the historical developments in documents 1 and 2. be sure to use evidence from both documents 1 and 2 in your response. [1] Complete the cross: Aa x Aa what is the genotypic ratio? Find the surface area if the regular pyramid In which microscope we can obtain 2D images and how? What type of galaxy is shown here? Irregular barred spiral elliptical spiral The quadratic functiond=-9x + 40 models askateboarder's distance, infeet, from the bottom of a hillx seconds after the skateboarderstarts moving down the hill.After how many seconds is theskateboarder 4 ft from thebottom of the hill? A) 3s B) 4s C) 2s D) 3.5sPlease help!! Also if you could explain that would be great! Tysm! Mr. Franco's class wants to raise at least $750 for a fundraiser. Let r be the amount of money, in dollars, the class raised.help ASAP.. none hsbisneienbjsnsidns ueheijejeie idhdidnis idndidjd idjdi you have any question for christians ask anything at all you can ask nything A gas has a volume of 0.550 l at a temperature of -55.0 c. what will the volume be if the temperature is increased to 30.0 c and the pressure remains constant? Please help me with this ANSWER QUICKLY I NEED IT RN!!!!!! EMERGENCY!!! what is a commission that deals with human rights and violation Which sentence is consistently iambic?A.Ballerinas performed.orB.Bizarre pursuits are fun.