List Indexing - 3
This Program name is List Indexing - 3. Write a Python program to List Indexing - 3, it has two test cases
The below link contains List Indexing - 3 question, explanation and test cases
https://docs.google.com/document/d/1F2ws8-9vz96_0wpYR82MqW1wejDjS2gf/edit?usp=sharing&ouid=104486799211107564921&rtpof=true&sd=true
We need exact output when the code was run
Create and Print List -3
This Program name is Create and Print List -3. Write a Python program to Create and Print List -3, it has two test cases
The below link contains Create and Print List -3 question, explanation and test cases
https://docs.google.com/document/d/1XFwFFMgfxj4_JbeCW_qXmh3-KnC2LtTp/edit?usp=sharing&ouid=104486799211107564921&rtpof=true&sd=true
We need exact output when the code was run
Trapezium Order
you are given an integer N . print N rows starting from 1 in the trapexium order as shown in the output of the below examples .
Input
the input contains an integer N
OUTPUT
the output should have N lines
each of the N lines should have space -seperated integers as per the trapezium order
CHECK THE LINK BELOW FOR EXACT OUTPUT
https://docs.google.com/document/d/1rMdPEY_1fttuydfFQLeJHmX_eMa66awj84hW2pnAdyI/edit
For Apple store services and apps(like games, videos, etc ): you can gain access if you are15years old or less and your parent has an Apple ID. If you are 16 years old or more you need to have your own Apple ID.
Write a program that uses short circuit logic to tell someone if they are legal to gain access to Apple store services. First ask them how old they are, whether they have an Apple ID or not, and whether their parent has an Apple ID or not.
The sum of the first n positive integers can be computed by the formula
sum(1..n) = 1 + 2 + 3 + 4 + · · · + n = n(n + 1)/2
Write a short Python program that computes the sum of the first 100 positive integers and prints it to the screen, using format specifiers when printing instead of converting each item to a string. Use variables to represent the 1, the 100, and the result of the computation. Your program must compute the 5050 value. You cannot just print the result to the screen. You must compute it first from the 100. The goal is for the output to look exactly the same.The output is as shown below:
sum(1..100) = 5050
Eligibility Criteria - 4
Given a student has scored M marks in Maths, P marks in Physics and C
marks in Chemistry. Write a program to check if a student is eligible for admission in a professional course. If any one of the below conditions is satisfied then the student is eligible.
1) M >= 60, P >= 50, C >= 45 and M + P + C >= 180.
2) Total in M and P >= 120 or Total in C and P >= 110.
The first line is an integer M
The second line is an integer p
The third line is an integer C
The output should be a single line containing True , if it satisfies the given conditions, False in all other cases
Given M = 72, P = 65, C = 51 , the scores of this student satisfies the first condition
M >= 60, (72 >= 60)
P >= 50 (65 >= 50)
C >= 45 (51 >= 45)
M + P + C >= 180 (72 + 65 + 51 >= 180)
So, the student is eligible.
Sample Input 1
72
65
51
Sample Output 1
True
Sample Input 2
70
70
Sample Output 2
False
Sample Input 3
60
60
40
Sample Output 3
True
Years, Weeks & Days
Given N number of days as input, write a program to convert N. number of days to years (Y)
weeks (W) and days (D)
Note:
The input contains single integer N
Print space-separated integers Y, W and D
Given N = 1329
The value can be written as
1329 = 3 years + 33 weeks + 3 days
So the output should be
3 33 3
.
Sample Input 1
1329
Sample Output 1
3
33
3
Sample Input 2
Sample Output 2
Elements in the Range
You are given three numbers. Check if any of the numbers exist in the range from 10 to 20 (including 10 and 20).
The first, second, and third lines of input are integers.
The output should be either
True or False
Given
a = 2, b = 4, c = 16 , 16 is in the range between 10 and 20.
So the output should be True
Sample Input 1
2
4
16
Sample Output 1
True
Sample Input 2
2
4
6
Sample Output 2
False
You are given N number of inputs. Print the maximum of them after each input.