PRG1 - Day 4 starter
Quiz
•
Computers
•
University
•
Easy
Steve Rich
Used 5+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is output?
// JavaScript
console.log(examResults.steve[0]);
# Python
print(exam_results['steve'][0])
[ 99, 98, 95 ]
99
[ ]
Undefined / Error
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
JS: What does trim() do?
Python: What does .strip() do?
It extracts a substring from a string.
It removes all characters from a string.
It converts a string to title case.
It trims whitespace from the beginning and end of a string.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How can you convert a string to lowercase?
Python: .to_lower()
JS: toLower()
Py: .make_lower()
JS: makeLower()
Py: .convert_lower()
JS: convertLower()
Py: .lower()
JS: toLowerCase()
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which method can be used to split a string into an array of substrings based on a specified delimiter?
.slice()
.concat()
.join()
.split()
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is output?
Py: print(98 in exam_results["violet"])
JS: console.log(examResults.violet.includes(98));
True
False
Error
98
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python & JS, can a variable name (also known as an 'identifier') start with a number? e.g. 5rings
Yes
No
Sometimes
Only in certain versions
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this code do?
JS: bigMac.Fat = 30;
Py: big_mac['Fat'] = 30
Sets the fat content of a Big Mac to 30.
Deletes the fat content of a Big Mac.
Calculates the calories of a Big Mac.
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result?
// JavaScript
bigMac['Calories'] = 300;
# Python
big_mac['Calories'] = 300
The calories for a Big Mac is updated to 300
Nothing. It already exists.
A second Calories option is added.
An error message is displayed.
Similar Resources on Wayground
10 questions
Layered Network Models
Quiz
•
University
10 questions
ML Course Activity-II
Quiz
•
University
10 questions
Daily Quiz (28.12.2020)
Quiz
•
5th Grade - Professio...
10 questions
NEO LMS Training
Quiz
•
University
10 questions
2021_DASPRO_PERTEMUAN2
Quiz
•
University
10 questions
Quiz 1
Quiz
•
University
9 questions
مراجعة الفصل الثاني (مقدمة تطبيقات الحاسب)
Quiz
•
University
10 questions
Chapter 2 Java Basic2
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
22 questions
FYS 2024 Midterm Review
Quiz
•
University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
12 questions
1 Times Tables
Quiz
•
KG - University
20 questions
Disney Trivia
Quiz
•
University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University