-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
79 lines (65 loc) · 2.53 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
from util import *
import replit
from time import sleep
from util import *
print(dim + red + "Welcome to..." + reset)
sleep(0.5)
replit.clear()
print(red + "Welcome to..." + reset)
sleep(0.5)
replit.clear()
print(dim + red + "Welcome to..." + reset)
sleep(0.5)
replit.clear()
sleep(2)
slowPrint(flash + green + "An " + blue + "@HENRYMARTIN4 and @elipie " + green +
"Production" + reset)
sleep(0.5)
replit.clear()
print(flash + green + dim + "An " + blue + "@HENRYMARTIN4 and @elipie " +
green + "Production" + reset)
sleep(0.5)
replit.clear()
sleep(0.5)
slowPrint(blue + "The official " + red + "Java Jokers" + green +
" Java Tutorial!" + reset)
print("\n")
slowPrint("Lesson 1 - A basic Java App"+reset)
slowerPrint(
"Any Java app will begin with a CLASS. A class is an object. When you create a Java file, you must name it. The name of the file will be the class's name. ")
slowPrint("Sample Code(remember this!):")
print(green)
slowerprintfromfile("snippets/basicclass.java")
print(green)
input("Press enter to continue")
print(reset)
slowerPrint("Next, inside the file, we need to declare a function called \"Main\", with one parameter, for the command line parameters. This is the code that is run when you run your file. So far, our code looks like this(our file name is Main):")
print(blue)
slowerprintfromfile("snippets/basicclass.java")
print(reset)
slowerPrint("The last two curly brackets (curly brackets are: " + blue + "{" +reset + " or " + blue + "}" + reset +") are defining the end of our function and our class.")
print(green)
input("Press enter to continue ")
print(reset)
while True:
inp = input("")
if inp == "class Main{}":
print(green+"Correct!"+reset)
break
else:
print(red+"Incorrect. The correct answer was: ")
print(blue+"class Main{}"+reset)
slowPrint("____________________________________________________")
sleep(0.5)
slowerPrint("Lesson 2 - Printing text to the console")
slowerPrint("To start, follow lesson 1 to create a new class. Then, in the middle, in place of the comment placed earlier, we place a function call for the function \"System.out.println\".\nThen, you can pass in the text that you would like to print. The result code looks like this:\n")
print(green)
input("Are you ready to continue(enter if yes)")
print(reset)
print(blue)
slowerprintfromfile("snippets/helloworld.java")
print(reset)
input("Press enter if you are ready to continue.")
slowerprintfromfile("snippets/vartutorial.txt")
# Henrys if tutorial
slowerprintfromfile("snippets/iftutorial.txt")