
GFG Final Quiz
Authored by Mokshith Thota
Education
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet?
def func(a, b=6, c=8):
print(a, b, c)
func(1, 2)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
def f1(a, b, c=0, d=0, e=0):
return a + b + c + d + e
print(f1(1, *(5, 6)))
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
n = int(input())
for row_num in range(0,n+1):
row_output = ""
seq_num = row_num
while seq_num > 0:
row_output = row_output + str(seq_num)
seq_num = seq_num - 1
print(row_output)
identify mistakes in program
The program doesn't have any mistakes
program doesnot have correct logic
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
n = int(input())
for i in range(n):
if i == 0:
space = (n-1) * " "
print(space + "*")
elif i == n - 1:
print(n " ")
else:
left_spaces = (n - i - 1) * " "
stars = "* " * (i + 1)
print(left_spaces+ stars)
guess the output
It will print a triangle of asterisks with n rows
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following C code?
#include <stdio.h>
int main() {
int a = 5;
int b = a = 4;
printf("%d %d\n", a, b);
return 0;
}
5 5
44
45
54
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following C code?
#include <stdio.h>
int main() {
int a = 10, b = 20, c = 30;
printf("%d ", a);
if (a = b < c)
printf("%d ", a);
else
printf("%d ", b);
return 0;
}
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
14 questions
SE LIGA 1 TRIMESTRE
Quiz
•
University
15 questions
DSA & Code Snippets
Quiz
•
University
14 questions
DEA - Lectura
Quiz
•
University
10 questions
PTS MKWU BAHASA INDONESIA
Quiz
•
University
13 questions
Finanzas Personales
Quiz
•
8th Grade - University
13 questions
2 дәріс АКТ
Quiz
•
University
10 questions
Google Slides Quiz
Quiz
•
University
10 questions
Adopción
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Education
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University