is inaccessible due to its protection level

iam trying to make a game that guesses your number and writes the number of guesses on the screen

the code is like this
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class numberwizard : MonoBehaviour {
	public Text text ; //print for 2d texts
	public Text guesstext ;
	int max= 1000 ; // maximum number
	int min= 1 ; // minimum number
	int guess; // gussing function
	int num ;// number of guessing declaared zero to add numbers  
	// Use this for initialization
	public void Start () {
		 text = new Text();
		  guesstext = new Text();
			Startgame() ;
	public void Startgame()
		max = max + 1;
	public void textprint(){
	public void nextguess() {
		//guess =(max + min)/2;
		num = 1;
		num = num +1;
		var number = Random.Range(min,max);
		guess = number  ;
		text.text = guess.ToString();
	// Update is called once per frame
	public void Update () {
	public void higher(){
		min = guess;   
	public void lower(){
		max = guess;
	public void correct(){

Your error is on line 14. You cannot call the constructor of the UI.Text object. Instead, you need to instantiate it from a prefab if you want to create a new one.

Here is the documentation on how to do that:
Creating UI elements from scripting

However, you can also drag it into the Inspector field (public Text text will show up in the Inspector) and just use the existing Text component.