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
(Financial application: compound value) Suppose you save $100 each month into savings account with an annual interest rate of 5%
Nostrana [21]

Solution:

initial = float(eval(input('Enter the monthly saving amount: ')))

x = (1 + 0.00417)

month_one = initial * x

month_two = (initial + month_one) * x  

month_three = (initial + month_two) * x  

month_four = (initial + month_three) * x

month_five = (initial + month_four) * x  

month_six = (initial + month_five) * x  

print('The sixth month value is: '+str(month_six))  

Don't forget the saving amount, and initialize the balance with that amount. Inside the loop, work out and add the interest and then add the saving amount for the next month.

balance = 801

for month in range(6):

  balance = balance * (1.00417)

print(balance)

7 0
3 years ago
When would it be necessary to shoot in 4K according to the presentation?
Nataly_w [17]

Answer:

because it provides you a lot of storage and the post production equipment to handle it and it is used to do big projects

Explanation:

so l know this much it is correct please mark me brainllest

6 0
2 years ago
Type the correct answer in the box. Spell the word correctly. Which framework can be used to develop cross-platform applications
kaheart [24]

Answer:

Xamarin

Explanation:

Xamarin framework can be used to develop cross-platform applications.

5 0
3 years ago
Read 2 more answers
You have important data on your hard drive that is not backed up and your Windows installation is so corrupted you know that you
love history [14]

Answer:

Make every attempt to recover the data

Explanation:

If your decide to format the drive, use system restore or reinstall the windows OS you may end up loosing all your data so the best option is to try as much as you can attempting to recover the data because the data might or definitely will be lost while using other options you think are available.

8 0
3 years ago
Which of the following, when used in conjunction with hyperlinks, can be useful for easily navigating a Word document? : *
Valentin [98]
Caption is a best answer i hope its work
7 0
2 years ago
Other questions:
  • Suppose an array with six rows and eight columns is stored in row major order starting at address 20 (base 10). If each entry in
    8·1 answer
  • Traceability of requirements is helpful in the followingexcept
    5·1 answer
  • Which PowerPoint options can users customize?
    9·1 answer
  • ________ uses the signals transmitted over the phone to access the database, retrieve account information and input data. Group
    11·1 answer
  • How long does it take to be placed in a class on flvs?
    14·1 answer
  • Green Field county stadium is planning to conduct a cricket match between two teams A and B. A large crowd is expected in the st
    6·1 answer
  • What is the difference between a rack and a tower?
    8·1 answer
  • Cash cows are always in
    7·1 answer
  • What will the following code display? int numbers[4] = { 99, 87 }; cout << numbers[3] << endl; a. 87 b.0 d. 34. What
    12·1 answer
  • Which key must be pressed in addition to clicking on a hyperlink for it to be followed?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!