Skip to content

Commit 2f4d252

Browse files
Add Missing Question and NCC problem
Signed-off-by: Chandra Prakash S <[email protected]>
1 parent afb7984 commit 2f4d252

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

Session-3/marvelstudios.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
"""
1+
"""Question description
2+
Marvel Studios is known for the production of the Marvel Cinematic Universe films, based on characters that appear in Marvel Comics publications. Marvel counts among its characters such well-known superheroes as Spider-Man, Iron Man, Captain America, the Hulk, Thor, Wolverine, Ant-Man, the Wasp, Black Widow, Captain Marvel, Black Panther, Squirrel Girl, Doctor Strange, the Scarlet Witch, She-Hulk, the Vision, Psylocke, Tigra, Ghost-Spider, the Falcon, the Winter Soldier, Ghost Rider, Quake, Blade, Daredevil, Ms. Marvel, the Punisher and Deadpool. Superhero teams exist such as the Avengers, the X-Men, the Fantastic Four and the Guardians of the Galaxy as well as supervillains including Doctor Doom, Magneto, Thanos, Loki, Green Goblin, Kingpin, Diamondback, Red Skull, Ultron, the Mandarin, MODOK, Doctor Octopus, Kang, Dormammu, Venom and Galactus. Marvel decided to create a new story. Can you suggest them that the character names which will be present in that film to make a film as block buster?
3+
Constraints
4+
Input Format: First line represents number of names involved. Second line onwards the character names.
5+
Output Format: Display the character names in alphabetical order.
26
"""
37
# Read the number of names
48
n = int(input())

Session-3/ncc.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""Question description
2+
In our institution celebrates the independence day. Our NCC team forms a group to perform the march past in the sports ground. Can you help the NCC leader to make the pattern to perform the march past in a particular formation.
3+
Constraints
4+
Input Format:
5+
First line represent the number of rows needed For e.g., 5
6+
Second line onwards you should enter the alphabets.
7+
For e.g.,
8+
a
9+
b
10+
c
11+
d
12+
e
13+
"""
14+
15+
n = int(input()) # Number of rows
16+
letters = [input() for _ in range(n)] # List of letters
17+
# Loop through each row
18+
for i in range(n):
19+
row = [] # Initialize the row list
20+
# Loop through each letter up to the current row number
21+
for j in range(i+1):
22+
row.append(letters[j] + ' ') # Add the letter and a space to the row list
23+
# Add the remaining spaces to the end of the row
24+
for k in range(n-i-1):
25+
row.append('') # Add two spaces to the row list
26+
print(''.join(row)) # Print the row as a string, joining the letters and spaces with no separator

0 commit comments

Comments
 (0)