Basics of Android homework Help at TutorEye

Best Homework Help For Basics of Android

Our experts are available 24/7 to help you with Basics of Android

Top Questions

5.In this problem and the next one, we’re going to make a very simple spam checker program by just looking ...

ooking at how likely a given email is to be spam based on the words it contains. In particular, in this problem we’re going to count how often words are present in spam emails within some set of training data (which here means a set of emails that have already been marked as spam or not spam manually). We have already started to write a function spam_score(spam_file, not_file, word), which takes in two filenames, along with a target word (a lowercase string). Both filenames refer to text files which must be in the same directory as hw07.py (we’ve provided several such files in hw07files.zip). The text files contain one email per line (really just the subject line to keep things simple) - you can assume that these emails will be a series of words separated by spaces with no punctuation. The first file contains emails that have been identified as spam, the second contains emails that have been identified as not spam. Since you haven’t learned File I/O yet, we’ve provided code that opens the two files and puts the data into two lists of strings (where each element is one line - that is, one email). You then must complete the function, so that it returns the spam score for the target word. The spam score is an integer representing the total number of times the target word occurs across all the spam emails, minus the total number of times the word occurs in not-spam emails. Convert all words to lowercase before counting, to ensure capitalization does not throw off the count.
View More

Basics of Android: 

 

Android is an Operating System that is primarily designed for touchscreen mobile devices which include smartphones and tablets. It is based on the Linux kernel and was developed by Open Handset Alliance which was commercially sponsored by Google.

 

Basics of Android Sample Questions:

 

 

Question 1: The broadcast receiver has a time limit of how many seconds in Android?

 

A) 5

B) 10

C) 15

D) 20

 

Answer: 10

Explanation: The operation must be performed by the broadcast receiver otherwise AND will occur.

 

Get the full solution!

 

 

Question 2: Which of the following features should be considered by developers while creating an Android Application?

 

A) Device Features 

B) Screen Size

C) Platform Version

D) All of these


Answer: All of these

Explanation: Below mentioned features should be considered by developers while creating an Android Application:
Device Features 
Screen Size
Platform Version
Input Configuration, etc

 

 

Get the full solution!

 

 

Question 3: Is it possible in android to have an activity without any UI?

 

A) Yes

B) No

C) Depends on compiler

D) None of these


Answer: Yes

Explanation: It is possible in android to have an activity without any UI. It would not be visible but it would add some functionalities in the background.

 

Get the full solution!


 

Question 4: Which of the following correctly describes threads in Android?

 

A) Dispatchable independent unit

B) Background activity

C) Services

D) None of these


Answer: Dispatchable independent unit

Explanation: Threads in android are dispatchable independent units. It handles background services and functionalities. Moreover, they are concurrent executable units.

 

 

Get the full solution!


 

Question 5: Which of the following is not a method of Base Adapter?

 

A) getItem()

B) getList()

C) getCount()

D) None of these

 

Answer: None of these

Explanation: Base Adapter has the following methods:
getItem()
getList()
getCount()
getView()

 

 

Get the full solution!


 

Question 6: Which of the following is not a part of the Android activity life cycle?

 

A) onStart()

B) onDestroy()

C) onResume()

D) None of these


Answer: None of these

Explanation: Following are part of android life cycle:
onCreate()
onStart()
onResume()
onPause()
onStop()
onRestart()
onDestroy()

 

 

Get the full solution!


 

Question 7: Which of the following kernel is used in Android?

 

A) MAC

B) Windows

C) Linux

D) None of these

 

Answer: Linux

Explanation: Android is based on customized Linux Kernel. It is also known as the heart of the android architecture which is present at the root of android architecture. 

 

Get the full solution!


 

Question 8: Open Handset Alliance was announced in which year?

 

A) 2005

B) 2006

C) 2007

D) None of these

 

Answer: 2007

Explanation: Open Handset Alliance was announced in 2007 by Google.

 

 

Get the full solution!

 


Question 9: Which of the following layer is topmost in android architecture?

 

A) Applications Framework

B) Application Layer

C) Linux Kernel

D) None of these


Answer: Applications Framework

Explanation: Applications Framework consists of Android APIs, resources, locations, package managers, etc. It provides a number of classes and interfaces for the development of the android applications. 

 

Get the full solution!


 

Question 10: Which of the following is the Android’s built-in database?

 

A) MySQL

B) Oracle 

C) MongoDB

D) SQLite

 

Answer: MySQL

Explanation: SQLite is a relational database and is open source. It provides various features to android devices which include storing, manipulating, and accessing data. Performing database setup is not required as it is embedded in android by default.

 

Get the full solution!

 

 

Computer Science Question Answers Pages


 

Programming in C and C Plus Plus Programming in Java Internet Programming
Screen Readers Android Programming Programming in Python C Sharp Programming