ez python
harder python
c++
file handling
JAVA 🔥
100

what does print() in python do?

print to the terminal


100

This Python keyword is used to create your own error messages

What is raise?

100

// whats wrong with this code:

#include <iostream>

int main() {

cout << "hi";

}

using cout without:

using namespace std;

!

100

This mode in Python file handling is used when you want to read a file and is represented by the letter 'r'

What is read mode?

100

does the first public class thingy have to be the file name?

YES


200

declare a variable called name and assign it with the value of john

code: 

name = "john"

200

This special method in Python classes starts with double underscores and runs automatically when creating a new object

What is __init__?

200

In C++, what punctuation mark must appear at the end of most programming statements?

What is a semicolon (;)?

200

This command is always important to use when you're done working with a file in Python

What is file.close()?

200

Every Java class name must begin with this type of letter

What is a capital/uppercase letter?

300

This symbol is used to create comments in Python

what is #

300

what does exec() do

execute a string in python

300

These two symbols (<<) in C++ are called this operator when used with cout

What is the insertion operator?

300

in python, im gonna open a file in read mode. But im doing it on programiz!!!! what will happen?

Segmentation Fault


300

whats wrong about this code

public class Calculator {    public static void main(String[] args) {        int number1 = 10        int number2 = 20;        System.out.println("The sum is:" + number1 + number2)    } }

it is any of these answers

1. MISSING SEMICOLON(S)!!!

2. you cant add string to number

400

In Python, how do you make a list?

[]

400

HOW TO MAKE PYTHON NOT MAKE __PYCACHE__

# one of these:

#1. python:

import sys

sys.dont_write_bytecode

#2. bash:

export PYTHONDONTWRITEBYTECODE = 1


400

This header file must be included to use cout and cin in C++

What is iostream?

400

This built-in Python function turns each line of a file into a list item you can work with

What is file.readlines()?

400

This is the correct way to create a String variable in Java

What is String variableName = 'text'?

500

what if i do 

if False:

    pass

the if will never execute because False will never equal True

500

This Python concept uses the '@' symbol and modifies function behavior without changing the function itself

What is a decorator?

500

This special function in C++ runs automatically when the program starts

What is main()?

500

Using this statement with file handling means you don't need to close the file manually

What is 'with open()' statement?

500

This special word in Java means a variable belongs to the class itself, not to any specific object

What is static?

M
e
n
u