Android development

Programming With Python Practical 7

Programming With Python Practical 7 Question 1 Create a tuple and find the minimum and maximum number from it. minmax.py tup=(1,2,3,5,56,9,8,6,4) largest=tup[0] smallest=tup[0] for i in tup: if(i>largest): largest=i for i in tup: if(i<smallest): smallest=i print("Largest number is :",largest) print("Smallest number is :",smallest) Output Question 2 Write a Python program to find the repeated items […]

Programming With Python Practical 7 Read More »

Programming With Python Practical 6

Programming With Python Practical 6 Question 1 Write a Python program to sum all the items in a list. sum.py list=[10,20,30,50,90,80,6,54] sum=0 for i in list: sum=sum+i print("Sum = ",sum) Output Question 2 Write a Python program to multiplies all the items in a list. multiply.py list=[1,2,3,5,9,8,6,4] result=1 for i in list: result=result*i print("Multiplication =

Programming With Python Practical 6 Read More »

Programming With Python Practical 5

Programming With Python Practical 5 Question 1 Print the following patterns using loop. pattern1.py for i in range(1,5): for j in range(1,i+1): print("*",end="t") print() Output pattern2.py for i in(1,2,3,2,1): for k in range(3-i,0,-1): print(end="t") for j in range(1,2*i): print("*",end="t") print() Output pattern3.py for i in range(1,5): for k in range(1,i): print(end="t") for j in range(8,2*i-1,-1):

Programming With Python Practical 5 Read More »

Programming With Python Practical 4

Programming With Python Practical 4 Question 1 Write a program to check whether a number is even or odd. evenodd.py num=int(input("Enter a number: ")) if(num%2==0): print("Number is even") else: print("Number is odd") Output Question 2 Write a program to find out absolute value of an input number. absolute.py num=int(input("Enter a number: ")) ab=abs(num) print("Absolute value

Programming With Python Practical 4 Read More »

Mobile Application Development Practical 32

Mobile Application Development Practical 32 Question 1 Write a program to locate user’s current location. AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:dataExtractionRules="@xml/data_extraction_rules" android:fullBackupContent="@xml/backup_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/Theme.Practical31" tools:targetApi="31"> <meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyAAl7T5IB74VSYRkOVs1F25Vv_EtKJKddA" /> <activity android:name=".MapsActivity" android:exported="true" android:label="@string/title_activity_maps"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />

Mobile Application Development Practical 32 Read More »

Mobile Application Development Practical 31

Mobile Application Development Practical 31 Question 1 Write a program to locate user’s current location. AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:dataExtractionRules="@xml/data_extraction_rules" android:fullBackupContent="@xml/backup_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/Theme.Practical31" tools:targetApi="31"> <meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyAAl7T5IB74VSYRkOVs1F25Vv_EtKJKddA" /> <activity android:name=".MapsActivity" android:exported="true" android:label="@string/title_activity_maps"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />

Mobile Application Development Practical 31 Read More »

Mobile Application Development Practical 30

Mobile Application Development Practical 30 Question 1 Write a program to send email. activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginRight="20dp" android:layout_marginLeft="20dp" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Android Email" android:gravity="center" android:textSize="20dp" android:layout_marginTop="20dp" android:textStyle="bold"/> <EditText android:id="@+id/sendto" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:layout_marginTop="50dp" android:hint="Enter email address here" /> <EditText android:id="@+id/sub" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10"

Mobile Application Development Practical 30 Read More »

Mobile Application Development Practical 29

Mobile Application Development Practical 29 Question 1 Write a program to send and receive sms. activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="30dp" android:layout_marginRight="30dp" android:layout_marginTop="30dp" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Android SMS" android:textSize="20dp" android:textStyle="bold" android:layout_marginBottom="30dp" android:gravity="center"/> <EditText android:id="@+id/mobileno" android:layout_width="match_parent" android:layout_height="50dp" android:ems="10" android:hint="Enter Mobile Number" /> <EditText android:id="@+id/msg" android:layout_width="match_parent" android:layout_height="70dp"

Mobile Application Development Practical 29 Read More »

Mobile Application Development Practical 28

Mobile Application Development Practical 28 Question 1 Write a program to create the login form with necessary validations like length of username and password, empty text fields, count of unsuccessful login attempts. Display the login uccessful /Unsuccessful toastmessage. activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="30dp" android:layout_marginRight="30dp" android:layout_marginTop="50dp"

Mobile Application Development Practical 28 Read More »

Mobile Application Development Practical 27

Mobile Application Development Practical 27 Question 1 Write a program to create the login form and display login successful/ Unsuccessful toastmessage. activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="30dp" android:layout_marginRight="30dp" android:layout_marginTop="50dp" android:orientation="vertical"> <EditText android:id="@+id/uname" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:hint="Enter Username" /> <EditText android:id="@+id/pass" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:inputType="textPassword" android:hint="Enter Password"

Mobile Application Development Practical 27 Read More »