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
dmitriy555 [2]
3 years ago
5

Write a function named last_digit that returns the last digit of an integer. For example, last_digit(3572) should return 2. It s

hould work for negative numbers as well; last_digit(-947) should return 7.
Computers and Technology
1 answer:
Vika [28.1K]3 years ago
6 0

def last_digit(num):

   num = str(num)

   return int(num[-1])

print(last_digit(-947))

I hope this helps!

You might be interested in
What allows people to create their own radio shows over the internet?
Alex787 [66]
Broadcasting sites, greater internet freedom,. 
6 0
3 years ago
A motor is controlled by a logic circuit. The circuit has inputs (0 or 1) from three sensors
vivado [14]

Answer:

motor is controlled by a logic circuit. The circuit has inputs (0 or 1) from three sensors

R, T and W. The motor is switched off when the output from the logic circuit is 1. wym

6 0
3 years ago
A=3<br> b = 2<br> print (a ** b)<br> What is output?
Lady bird [3.3K]

Answer: ( 3**2)

Explanation: honestly I can't help you. Try google it is waiting for you with open harms.  

6 0
3 years ago
Read 2 more answers
PLEASE HELP!!<br> Would you ever try and get famous off of social media? Why or why not?
Alexxandr [17]

Answer:

Yes because u could gain a lot of money from it

Explanation:

With more money you have, the more you can give to charity, and the more you can relax

3 0
3 years ago
Read 2 more answers
How does form get its power natural gas
lana [24]

Answer:

because it does

Explanation:

7 0
3 years ago
Other questions:
  • Which of the following correctly describes the function of an IP address?
    7·1 answer
  • A(n) _____ can be used to convert digitized documents into ascii (american standard code for information interchange) text that
    6·1 answer
  • Minimalism is a major movement in postmodern art. O True O False
    14·1 answer
  • What is the decimal equivalent of the binary number 1102?
    8·2 answers
  • Given a one dimensional array arr, what is the correct way ofgetting the number of elements in arr
    15·1 answer
  • Why is it important to evaluate the website on which you plan to shop?
    13·1 answer
  • Enter key is also known as Return key. (True or false)
    13·2 answers
  • The auxiliary device used to store large volume of data and program for future is called​
    10·1 answer
  • Two types of storage memory​
    12·1 answer
  • Part of an algorithm which is repeated for fixed number of times is classified as.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!