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
Oliga [24]
3 years ago
13

Grade 10 python exercise

Computers and Technology
1 answer:
lbvjy [14]3 years ago
7 0

number = 547

nums = {1:"one", 2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine"}

print("The last digit of",number,"is",nums[number%10])

I wrote my code in python 3.8. I hope this helps.

You might be interested in
Write a program that will predict the size of a population of organisms. The program // should ask the user for the starting num
nordsb [41]

Answer:

Following are the program in the C++ Programming Language:

#include <iostream>

using namespace std;

int main() {

 float starting, average;

 int num;

 std::cout <<"Enter starting number of the organisms: ";

 while(!(std::cin >> starting)|| starting < 2){

   std::cout<<"starting number must be greater than 2\n";

   std::cout <<"Enter starting number of the organisms: ";

   std::cin.clear();

   std::cin.ignore(123,'\n');

 }

 std::cout <<"Enter the average of daily population is increase %: ";

 while(!(std::cin >> average)|| average < 0){

   std::cout<<"Average must be greater than 0\n Enter average";

   std::cin.clear();

   std::cin.ignore(123,'\n');

 }

   average *= .01;

 std::cout <<"Enter the number of days: ";

 while(!(std::cin >> num)|| num < 1){

   std::cout<<"Number of days no be less than 1\n" <<"Enterthe number of days\n";

   std::cin.clear();

   std::cin.ignore(123,'\n');

 }

 for(int i=0; i<num; i++){

   std::cout<<"population size of day"<<(i+1);

   std::cout<<": "<<starting<<std::endl;

   starting +=(starting*average);

 }

 return 0;

}

<u>Output</u>:

Enter starting number of the organisms: 4

Enter the average of daily population is increase %: 5

Enter the number of days: 4

population size of day1: 4

population size of day2: 4.2

population size of day3: 4.41

population size of day4: 4.6305

Explanation:

Here, we define header file "<iostream>" and namespace "std".

  • Then, we define the main() inside it, we set two float data type variable i.e., "starting", "average" and set an integer data type variable i.e., "num".
  • Then, we print a message and after that, we set the while loop for get input from the user in variable "starting" and pass the condition inside loop we print message than clear cin and ignore 123 then, we again do this to get  input from user in variable "average".
  • Then, we set the for loop and pass the condition inside the loop print the size of the day then print the value of "starting" after that we multiply.
  • Finally, we return 0 and close the main function.
7 0
3 years ago
Scott is an aspiring software developer. During an interview for a new job, his prospective employer asks what kind of program h
lubasha [3.4K]

Answer:

The answer is "True".

Explanation:

The public domain is a creativity that is not protected by patent law, like logos, brand names or licensing. It is not a certain creator, nor does he generally have those pieces. This is why the remark in the discussion is true unless it is permissible to anyone but no one can possess the public domain work, that's why this statement is true.

4 0
2 years ago
Data warehousing and data mining mean the same thing when applied to CRM
Nata [24]
This is false. Data warehousing is storing the data. Data mining is retrieving and analyzing data from the data warehouse.
5 0
3 years ago
Read 2 more answers
Which of the following statements is TRUE? A. A name error occurs if the variable is referenced before it is declared. B. A name
lisov135 [29]

Answer:

A is the correct answer.

8 0
2 years ago
What is the correct process for selecting an entire row in a spreadsheet?
Valentin [98]
A. Click on any cell in the row
7 0
3 years ago
Other questions:
  • Your friend is working on fixing their Homework assignment. They need a lot of help. You know all the bugs in the file, but due
    12·1 answer
  • 9. The best way to insert an existing Excel chart into a document is to A. use the Object command. B. click the Insert tab and c
    6·2 answers
  • 1. How does inertia affect a person who is not wearing a seatbelt during a collision? 
    14·2 answers
  • A token is combination of hardware and software that acts as a gatekeeper and prevents unauthorized users from accessing private
    11·1 answer
  • Matching: match each step with its correct sequence number. This question tests whether you know the order in which a CPU perfor
    14·1 answer
  • Which of the displays could be represented by a single bit?
    12·2 answers
  • 9. What command do you enter in the Explorer search box to access the Remote Admin share on the computer named Fin?
    7·1 answer
  • Write convert() method to cast double to int
    7·1 answer
  • What feature is available to add a suggestion in the margin of someone else's document?​
    15·1 answer
  • Define the terms network, LAN, WAN, and Internet.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!