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
adell [148]
3 years ago
5

In Python 3, write a decorator function that has the following property:

Computers and Technology
1 answer:
kicyunya [14]3 years ago
8 0

Answer:

Python code is explained below

Explanation:

# decorator.py starts

def uppercase(fcn):

def wrapper():

original = fcn;

modified = str(fcn).upper() ;

return modified;

return wrapper();

# decorator.py ends

# greet.py starts

import decorator  #to generate the decorator

def greetings():  #invokes the greetings function for output

print("Hello");

print(decorator.uppercase(greetings));

# greet.py ends

You might be interested in
Write a program that echos back any inputted integer greater than 1, and exits when a 0 is entered. Your program should use a co
denpristay [2]

Answer:

MIPS Code:

.data

newline: .asciiz "\n" #newline variable

.text

MAINLOOP:

li $v0, 5 #syscall to get user interger and store in $v0

syscall

add $a0, $zero, $v0 #moving the user input to $a0 from $v0

beq $a0, 0, EXIT #branching to EXIT when $a0 is 0

li $v0, 1 #syscall to print integer in $a0

syscall

li $v0, 4 #syscall to print newline

la $a0, newline

syscall

j MAINLOOP #jumping to MAINLOOP

EXIT:

Sample Output:

6

6

7

7

3

3

0

7 0
3 years ago
Which part of the cpu accepts data?
V125BC [204]

The answer is the Processor register.

5 0
3 years ago
I have to make a online presentation, which program is the best
LiRa [457]
If you want an online presentation, I think you mean by a website.
Best thing you can find is Google Slides.
if you want a program,
LibreOffice is your best bet. It is completely free and it is for Linux, Windows and possibly Mac.
4 0
3 years ago
Read 2 more answers
If your computer will not turn on, What is something you can would you use to diagnose the problem?
inysia [295]
3. See if its plugged in
3 0
3 years ago
Read 2 more answers
Write the working of dot matrix printer?<br><br>no links<br>​
lbvjy [14]

The working of dot matrix printer is provided in the picture.

4 0
3 years ago
Other questions:
  • g The reciprocal Fibonacci constant ψ is defined by the infinite sum: ψ=∑n=1 [infinity] 1 Fn Where Fn are the Fibonacci numbers
    7·1 answer
  • How does hardware differ from software
    9·1 answer
  • What is the difference between First Person Shooters and Construction Simulations?
    12·2 answers
  • Consider an SRS for a system to manage grades at a typical University:
    14·1 answer
  • When using a graphics editing program, which option allows you to adjust the space around an image?
    15·1 answer
  • What are some examples of objects by which you can browse in the select browse option
    6·1 answer
  • What is a good project I can do for Artificial Intelligence? It has to be some type of Technology that covers Artificial Intelli
    14·1 answer
  • Who wants 100 points? comment buh. i don't rlly care buh.
    15·2 answers
  • A _____ shows how data moves through an information system but does not show program logic or processing steps.
    6·1 answer
  • what is a simulation? a) simulation is the process of creating dashboards in excel. b) simulation is the process of complex form
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!