Skip to content

jayasurya00098/python-programming-challenges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

python-programming-challenges

This repository consists of python programming challenges with its solutions.

beginner problems

Question 1:
- Problem Description: Write a program to print all Natural numbers from 1 to N where you have to take N as input from user.
- Problem Constraints: 1 <= N <= 1000000
- Input Format: A single line representing N
- Output Format: N space separated integers from 1 to N.

**Example**
Input:
5
Output: 
1 2 3 4 5
Question 2:
- Problem Description: Given an integer N, print N stars in a single line. For example if N = 5 then pattern will be like: 
```*****```
- Problem Constraints: 2 <= N <= 100
- Input Format: Single line input contains a single integer N.
- Output Format: Output N stars in a single line.

**Example**
Input:
3
Output:
***
Question 3:
- Take an integer N as input, print the corresponding stair pattern for N.
For example if N = 4 then stair pattern will be like:
*
**
***
****
- Problem Constraints: 1 <= N <= 100
- Input Format: Single line input contains a single integer N.
- Output Format: Output the stair pattern corresponding to the given N.

**Example**
Input:
3
Output:
*
**
***
Question 4:
- Take T (number of test cases) as input. For each test case, take integer N as input and Print the count of digits of that number.
No of digits for number 0 is considered as 1.
- Problem Constraints: 
- 1 <= T <= 100
- 0 <= N <= 100000000
- Input Format:
- The first line is the number T which denotes the total number of test cases.
- Next T lines contain an integer N for which you have to print the number of digits.
- Output Format: 
- For T different Numbers, Print the number of digits in separate lines.

**Example**
Input:
- 2
- 100
- 10101
Output:
- 3
- 5

About

This repository consists of few programming challenges with its solutions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages