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
Anna35 [415]
3 years ago
10

#Write a function called random_marks. random_marks should #take three parameters, all integers. It should return a #string. # #

The first parameter represents how many apostrophes should #be in the string. The second parameter represents how many #quotation marks should be in the string. The third #parameter represents how many apostrophe-quotation mark #pairs should be in the string. # #For example, random_marks(3, 2, 3) would return this #string: #'''""'"'"'" # #Note that there are three apostrophes, then two quotation #marks, then three '" pairs. #Add your function here!
Computers and Technology
1 answer:
Bezzdna [24]3 years ago
4 0

Answer:

def random_marks(apostrophe, quotation, apostrophe_quotation):

   return "'"*apostrophe + "\""*quotation + "'\""*apostrophe_quotation

   

print(random_marks(3, 2, 3))

Explanation:

Create a function called random_marks that takes apostrophe, quotation, and apostrophe_quotation as parameters. Inside the function, return apostrophe sign times apostrophe plus quotation mark times quotation plus apostrophe sign quotation mark times apostrophe_quotation.

Note that plus sign (+) is used to concatenate strings. Also, if you multiply a string with a number, you get that number of strings ("#"*3 gives ###).

Then, call the function with given parameters and print

You might be interested in
Which of the following are the rows or columns of white space created between grids?
erma4kov [3.2K]
It would be margins. none of the others are even terms for anything.
4 0
3 years ago
An athlete runs every day for five days. Write a program that computes the total distance and average distance ran by the athlet
Tamiku [17]

Answer:

// here is Hw1_q1_code.c

#include <stdio.h>

// main function

int main(void) {

// variables

float dis_mon,dis_tue,dis_wed,dis_thu,dis_fri;

printf("enter distance ran by athlete on monday:");

// read distance on monday

scanf("%f",&dis_mon);

printf("enter distance ran by athlete on tuesday:");

// read distance on tuesday

scanf("%f",&dis_tue);

printf("enter distance ran by athlete on wednesday:");

// read distance on wednesday

scanf("%f",&dis_wed);

printf("enter distance ran by athlete on thursday:");

// read distance on thursday

scanf("%f",&dis_thu);

printf("enter distance ran by athlete on friday:");

// read distance on friday

scanf("%f",&dis_fri);

// total distance

float sum=dis_mon+dis_tue+dis_wed+dis_thu+dis_fri;

// average distance

float average=sum/5;

// print the total and average

printf("total distance ran by athlete is: %f miles",sum);

printf("\naverage distance ran each day is: %f miles",average);

return 0;

}

Explanation:

Declare five variables to store distance ran by athlete on each day from monday to friday.Read the five distance.Then calculate their sum and assign to variable "sum".Find the average distance ran by athlete by dividing sum with 5 and assign to variable "average".Then print the total distance ran and average distance on each day.

Output:

enter distance ran by athlete on monday:10                                                                                            

enter distance ran by athlete on tuesday:11                                                                                          

enter distance ran by athlete on wednesday:8                                                                                          

enter distance ran by athlete on thursday:9                                                                                          

enter distance ran by athlete on friday:12                                                                                            

total distance ran by athlete is: 50.000000 miles                                                                          

average distance ran each day is: 10.000000 miles

5 0
3 years ago
Edhesive 8.5 code Practice help me pls
Hoochie [10]

Answer:

twainQuotes = ['I have never let my schooling interfere with my education.', 'Get your facts first, and then you can distort them as much as you please.', "If you tell the truth, you don't have to remember anything.", 'The secret of getting ahead is getting started.', "Age is an issue of mind over matter. If you don't mind, it doesn't matter. "]

print(twainQuotes)

twainQuotes.sort()

print(twainQuotes)

twainQuotes.insert(1,'Courage is resistance to fear, mastery of fear, not absence of fear.' )

print(twainQuotes)

Explanation:

ok

3 0
3 years ago
____ is suitable for what are called "high-volume service control applications" such as dial-in access to a corporate network.
Levart [38]

Answer: a. RADIUS

Explanation:

RADIUS as developed with the idea of allowing its users or clients to be able to authenticate to a dial-in access server. So basically it is a client server protocol and he client here is the firebox and the server is the RADIUS server.  

The authentication mechanism start by user who sends a message to the RADIUS server. Then the RADIUS server upon receiving the message accept or denies it. It accepts if the client is configured to the server.

A large amount of additional information can be sent by the RADIUS server in its Access-Accept messages with users so we can say that RADIUS is uitable for what are called "high-volume service control applications" such as dial-in access to a corporate network.

3 0
3 years ago
What is the best low end pc recording software​
julsineya [31]

Explanation:

democreator

D3DGear

nvidia shadow play etc

8 0
2 years ago
Read 2 more answers
Other questions:
  • Which individual of the following would be most likely to be directly concerned with web security?
    14·2 answers
  • An analyst is reviewing the logs from the network and notices that there have been multiple attempts from the open wireless netw
    13·1 answer
  • A list of pages within a Web site that you have visited and that usually appears at the top of a page is referred to as a(n) ___
    14·1 answer
  • Choose the best technology device for the
    12·1 answer
  • You work for a company that is growing. Originally, all the users in all departments had access to all the data in the database.
    6·2 answers
  • Machu Picchu is located in modern day _______<br><br>​
    14·2 answers
  • Victor works for a telemarketing company that is on a very tight budget. He has been tasked with finding a method for the compan
    7·2 answers
  • You are developing a Windows forms application used by a government agency. You need to develop a distinct user interface elemen
    14·1 answer
  • How would a person giving a persuasive speech use projection to make a key point?
    9·2 answers
  • Question 4 A data analyst wants to include a line of code directly in their .rmd file in order to explain their process more cle
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!